| | |
| | | import config from "../js/config" |
| | | |
| | | |
| | | let clearStorage = false; |
| | | let timer = null; |
| | | const request = (params) => { |
| | | let fullUrl = `${config.requestCtx}${params.url}` |
| | | let token = wx.getStorageSync(config.tokenKey) ? wx.getStorageSync(config.tokenKey) : '' |
| | |
| | | backUrl: urlargs |
| | | } |
| | | currentUrl = JSON.stringify(currentUrl) |
| | | wx.reLaunch({ |
| | | url: urlargs ? '/pages/index/index?backUrl=' + encodeURIComponent(currentUrl) : '/pages/index/index' |
| | | }) |
| | | // 不去首页登录,直接调用公共登录方法 |
| | | // wx.reLaunch({ |
| | | // url: urlargs ? '/pages/home/home?backUrl=' + encodeURIComponent(currentUrl) : '/pages/home/home' |
| | | // }) |
| | | } |
| | | } else { |
| | | wx.showToast({ |
| | |
| | | icon: 'none' |
| | | }) |
| | | reject(res.data.message) |
| | | wx.login({ |
| | | success: (res) => { |
| | | console.log(res) |
| | | }, |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |