Object
返回这样的 但是 data 的9 隐藏了 “uid”: “9”,
代码是这样的
wx.getUserInfo({
success: function(res) {
wx.request({
url: ‘https://xcx.epanda.cc/index.php/Xcx/Signdecode’,
data: {data:res.encryptedData,key:mes.data.session_key,vi:res.iv},
method: ‘GET’, // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
header: {
‘content-type’: ‘application/json’
},
success: function(env){
console.log(env)
// success
var uid = env.data
// wx.setStorage({
// key:“uid”,
// data:uid
// })
that.setData({
uid:uid
})
},
fail: function() {
// fail
},
complete: function() {
// complete
}
})
}
})
}