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=>这几个回调写法都试过,也没有用
异步的问题,换成async/await就行了。