云函数调用为什么不会调用到success fail??
function getUserOpenID() {
wx.cloud.callFunction({
name: 'getUserOpenID',
data: {},
success(res) {
console.log('success : ' + res)
//return res.openid
},
fail(err) {
console.error('getUserOpenID fail : ' + err)
//return null
},
complete() {
console.log('callFunction complete')
}
})
console.log('callFunction end')} 云开发的控制台显示调用成功,但是log里只有‘callFunction end’ [图片] success: function success: res=>这几个回调写法都试过,也没有用