账单查询

This commit is contained in:
limqhz
2023-02-08 16:59:00 +08:00
parent 1f5580c0f3
commit 668a387554
13 changed files with 98 additions and 93 deletions

View File

@@ -21,24 +21,11 @@ Page({
wx.login({
success (res) {
if (res.code) {
let param = {
appid:'wxb1f499f0a173865b',
secret:'833eefaf9206337d6c2d643f94baef7b',
js_code: res.code,
grant_type: 'authorization_code'
};
//发起网络请求
wx.request({
url: 'https://api.weixin.qq.com/sns/jscode2session',
data: param,
success: function(x) {
app.$api.loginAccount({"openId":x.data.openid}).then(t=>{
wx.setStorageSync("userId",t.data)
that.setData({
noLogin : false
})
})
}
app.$api.loginAccount({"wxCode":res.code}).then(t=>{
wx.setStorageSync("userId",t.data)
that.setData({
noLogin : false
})
})
} else {
console.log('登录失败!' + res.errMsg)