为了账号安全,请及时绑定邮箱和手机立即绑定

当我将数据放在“ distribuidora”字段上时,我的表没有更新

当我将数据放在“ distribuidora”字段上时,我的表没有更新

料青山看我应如是 2021-05-11 05:05:58
我的问题是我的表没有为我的字段“ Distribuidora”更新,但是其余字段的更新却完美无缺。这是我的代码,也许我在数据库中失败了,但是我尝试了所有我的Mongodb分销商代码是:        takingstats.find({ distributor: distributorAux }, { projection: {         _id: 0 } }).sort({ rank: -1 }).toArray((err, takingArray) => {            if(takingArray.length>=1){               return res.send(takingArray);             }if(takingArray.lenght==1){               return res.send(takingArray[0]);             }else{                return res.sendStatus(404);            }        });我的JS / Angular代码:      $scope.busqueda = function() {      $http.get(API + "?" + $scope.valor + "=" +         $scope.valor2).then(function(response) {            if(response.data.length>1){               $scope.takingstats = response.data;                console.log("Data received: " +         JSON.stringify(response.data, null, 2));            }else{                $scope.takingstats = [response.data];                console.log("Data received: " +         JSON.stringify(response.data, null, 2));            }      }).catch(function(response) {          if (response.status == 404) {              alert("Película no encontradas para dichos " +         $scope.valor);          };          $scope.estado = response.status;      });;  };返回数据,但表不会更新该数据
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 154 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号