wx.cloud.callFunction({
name: 'search',
data: {
y:y,
m:m,
openid:this.data._openid
},
success: res => {
console.log('[云函数] [login] user openid: ', res)
this.setData({
income:res.income,
expense:res.expense,
flag: true
})
},
fail: err => {
console.error('[云函数] [login] 调用失败', err)
}
})
微信小程序开发问题解答
微信小程序开发者回答:
建议把this.data._openid放在外面定义一下,顺便打印一下你的openid是否正确
本文网址:http://www.91bianli.com/weixinxiaochengxu/5721.html