-
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
qinmingyuan edited this page Aug 17, 2021
·
3 revisions
POST /wechat/program_users
wx.request({
url: 'https://test.one.work/wechat/program_users',
data: {
code: res.code,
appid: 'wxcdcb0fa80cf4c2c9'
},
method: 'POST',
success(res) {
console.log(res)
// 将 auth_token 存入 session
wx.setStorageSync('auth_token', res.data.auth_token)
}
})
wx.request({
url: 'https://test.one.work/wechat/program_users/mobile',
data: {
iv: e.detail.iv,
encryptedData: e.detail.encryptedData,
auth_token: wx.getStorageSync('auth_token')
},
method: 'POST'
})
wx.request({
url: 'https://test.one.work/wechat/program_users/info',
data: {
userInfo: res.userInfo,
auth_token: wx.getStorageSync('auth_token')
},
method: 'POST'
})