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

更新操作有问题

updata: function() {

    db.collection('user').doc("1acf1de95e17027d002234c36049da1c").updata({

      data: {

        age: 21

      }

    }).then(res => {

      console.log(res);

    }).catch(err => {

      console.log(err);

    })

  },

VM4123:1 thirdScriptError
db.collection(...).doc(...).updata is not a function; [Component] Event Handler Error @ pages/cloud/cloud#bound updata
TypeError: db.collection(...).doc(...).updata is not a function
    at ye.updata (http://127.0.0.1:44659/appservice/pages/cloud/cloud.js:25:67)
    at Object.r.safeCallback (WAService.js:1:1125173)
    at WAService.js:1:1317978
    at r (WAService.js:1:1249680)
    at WAService.js:1:1249802
    at WAService.js:1:420977
    at n (http://127.0.0.1:44659/appservice/__dev__/asdebug.js:1:28029)
    at e.exports.<anonymous> (http://127.0.0.1:44659/appservice/__dev__/asdebug.js:1:28398)
    at http://127.0.0.1:44659/appservice/__dev__/asdebug.js:1:1968
    at Array.forEach (<anonymous>)

正在回答

1 回答

应该是update,不是updata,拼写错误

http://img1.sycdn.imooc.com//5e17d77100013ab417821094.jpg

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

更新操作有问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信