| | |
| | | } from './api/index' |
| | | import CustomHook from 'spa-custom-hooks'; |
| | | let globalData = { |
| | | token: wx.getStorageSync('token'), |
| | | // token: wx.getStorageSync('token'), |
| | | token: '', |
| | | primary: '#B08771', |
| | | bottomLift: '' |
| | | } |
| | |
| | | if (WindowInfo.safeArea.top > 20) { |
| | | this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom |
| | | } |
| | | }, |
| | | onShow(op) { |
| | | // 授权登录 |
| | | var userId = null |
| | | if (op.query.scene) { |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | this.globalData.token = token |
| | | // if (op.query.scene) { |
| | | // let temp = op.query.scene.split('_') |
| | | // wx.navigateTo({ |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | onShow(options) { |
| | | const token = wx.getStorageSync('token') || '' |
| | | if(token){ |
| | | if (options.query.scene) { |
| | | let temp = options.query.scene.split('_') |
| | | wx.navigateTo({ |
| | | url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`, |
| | | }) |
| | | } |
| | | } |
| | | // const token = wx.getStorageSync('token') || '' |
| | | // if(token){ |
| | | // if (options.query.scene) { |
| | | // let temp = options.query.scene.split('_') |
| | | // wx.navigateTo({ |
| | | // url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`, |
| | | // }) |
| | | // } |
| | | // } |
| | | } |
| | | }) |
| | | CustomHook.install({ |