调用云函数出错
发布于 6 年前 作者 junpan 6276 次浏览 来自 问答

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)

}

})

1 回复

建议把this.data._openid放在外面定义一下,顺便打印一下你的openid是否正确

回到顶部