老师,我在电脑调试的时候没报错,可是到手机调试就报错了,能不能帮我分析一下,谢谢
错误如下:
thirdScriptError
errCode: -1 | errMsg: collection.doc:fail docId must not be empty; at collection.doc api; ; [Component] Event Handler Error @ pages/message_modification/message_modification#bound send
Error: errCode: -1 | errMsg: collection.doc:fail docId must not be empty; at collection.doc api;
at new u (WAService.js:1:381944)
at d (WAService.js:1:382443)
at Object.t.returnAsFinalCloudSDKError (WAService.js:1:382624)
at c.doc (WAService.js:1:269966)
at ye.send (weapp:///pages/message_modification/message_modification.js:50:47)
at Object.r.safeCallback (WAService.js:1:1087050)
at WAService.js:1:1279147
at r (WAService.js:1:1211447)
at WAService.js:1:1211569
at WAService.js:1:392893
错误显示的JS代码为:
db.collection('personal_information').doc(app.globalData.id).update({
// data 传入需要局部更新的数据
data: {
name: this.data.list.name
}
请问你的这个问题怎么解决的,我也遇到了相似问题,想请教一下
errCode: -1 | errMsg: collection.doc:fail docId must not be empty; at collection.doc api; ;at "pages/detail/detail" page lifeCycleMethod onLoad function
Error: errCode: -1 | errMsg: collection.doc:fail docId must not be empty; at collection.doc api;
从错误信息上看,message_modification.js文件第50行,doc后面的参数为空,请检查这个参数为空是什么原因造成的,就能够解决该问题了。