lll
liukangdong
2024-08-05 2da083225417ef7007842b84e7276242faeb0e35
wechat_jiaxuan/app.js
@@ -4,7 +4,8 @@
} from './api/index'
import CustomHook from 'spa-custom-hooks';
let globalData = {
  token: wx.getStorageSync('token'),
  // token: wx.getStorageSync('token'),
  token: '',
  primary: '#B08771',
  bottomLift: ''
}
@@ -24,6 +25,8 @@
    if (WindowInfo.safeArea.top > 20) {
      this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom
    }
  },
  onShow(op) {
    // 授权登录
    var userId = null
    if (op.query.scene) {
@@ -85,6 +88,7 @@
            }
          })
        } else {
          this.globalData.token = token
          // if (op.query.scene) {
          //   let temp = op.query.scene.split('_')
          //   wx.navigateTo({
@@ -134,17 +138,15 @@
        }
      })
    }
  },
  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({