云开发两个CloudID,本地调试偶尔出现数据混乱
本地调试 同时提交userInfo和weRunData两个CloudID,云函数接收到的userInfo和weRunData数据有时候是错的
let reqData = {} wx.getUserInfo({ withCredentials: true , lang: '' , success: function (userInfoRes) { reqData[ 'userInfo' ] = wx.cloud.CloudID(userInfoRes.cloudID) wx.getWeRunData({ success: function (weRunRes) { console.log(weRunRes) reqData[ 'weRunData' ] = wx.cloud.CloudID(weRunRes.cloudID) wx.cloud.callFunction({ name: 'xxx' , data: reqData, success: function (e) { console.log(e) } }) }, fail: function (weRunRes) { }, complete: function (weRunRes) { }, }) }, fail: function (userInfoRes) { }, complete: function (userInfoRes) { }, }) |
结果