Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
新用户无法认证的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
alexju committed Aug 24, 2020
1 parent 43f3cd7 commit 3c860e5
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions pages/auth/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,32 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
// onLoad: function (options) {
// let that = this
// if (options.mode == "yunschool") {
// wx.login({
// success(res1) {
// if (res1.code) {
// setTimeout(() => {
// that.setData({
// url: "https://ucpay.ncut.edu.cn/open/user/oauth/index?redirect=" + Requests.baseUrl + "/auth&appid=31b1e992583074382&state=" + res1.code,
// show: 1
// })
// }, 2000)
// } else {
// console.log('登录失败!' + res1.errMsg)
// }
// }
// })
// } else if (options.mode == "wechat") {
// if (Requests.token == null) {
// Requests.refreshToken(() => {})
// }
// that.setData({
// show: 2
// })
// }
// },
onLoad: function (options) {
let that = this
if (options.mode == "yunschool") {
wx.login({
success(res1) {
if (res1.code) {
setTimeout(() => {
that.setData({
url: "https://ucpay.ncut.edu.cn/open/user/oauth/index?redirect=" + Requests.baseUrl + "/auth&appid=31b1e992583074382&state=" + res1.code,
show: 1
})
}, 2000)
} else {
console.log('登录失败!' + res1.errMsg)
}
}
})
} else if (options.mode == "wechat") {
if (Requests.token == null) {
Requests.refreshToken(() => {})
}
that.setData({
show: 2
})
}
},

tapButton: function (e) {
Requests.put({
Expand Down

0 comments on commit 3c860e5

Please sign in to comment.