<movable-area class="area" >
<movable-view direction="horizontal" class="view" >{{userMessage.nickName}}</movable-view>
<navigator url="{{'/pages/detail/detail? userId=' + userMessage._id}}" open-type="navigate">
<image src="{{userMessage.userPhoto}}" />
</navigator>
<view class="delete" >删除</view>
</movable-area>
为什么这样获取不到id呢?
lifetimes: {
attached: function() {
db.collection('users').doc(this.data.messageId).field({
userPhoto:true,
nickName:true
}).get().then((res)=>{
this.setData({
userMessage: res.data
})
})
}
}
这是报错
VM2036 WAService.js:2 Error: errCode: -1 | errMsg: collection.doc:fail docId must not be empty; at collection.doc api;
拼接有问题