wx.request传参不能直接使用app.globalData里的数据么
wx.request({
url: ‘https://xxxxxx’,
data: {
‘encryptedData’: encodeURIComponent(e.detail.encryptedData),
‘iv’: e.detail.iv,
‘sessionKey’: app.globalData.userInfo.workspace.session_key
},
method: ‘POST’, // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
header: {
‘content-type’: ‘application/json’
},
我后面试着从服务器打印 发现sessionKey 没值
可是我console.log(app.globalData.userInfo.workspace.session_key);确是有值的