jiarubanji(e){
var that=this
console.log(e.currentTarget.dataset.id)
that.setData({
url1:e.currentTarget.dataset.id
})
console.log(that.data.url1)
db.collection('class').where({_id:e.currentTarget.dataset.id}).get().then(res=>{
console.log(res)
console.log(res.data[0].classname)
that.setData({
classname: res.data[0].classname
})
console.log(that.data.classname)
})
db.collection('yonghu').doc(that.data.url1).updata({
data:{
classname:that.data.classname
},
success: function(res) {
console.log(res.data)
}
})
}
update updata 马马虎虎
在线等 挺急的