Commit 3bf8caab by 李嘉林

feat: pl、pp换位置

parent aee3070d
...@@ -201,16 +201,18 @@ wx.onAppRoute(res => { ...@@ -201,16 +201,18 @@ wx.onAppRoute(res => {
let whetherToForceLogin = mpApp.globalData.shopInfo && mpApp.globalData.shopInfo.whetherToForceLogin || 0 let whetherToForceLogin = mpApp.globalData.shopInfo && mpApp.globalData.shopInfo.whetherToForceLogin || 0
log.info("wx.onAppRoute", res, mpApp.globalData.shopInfo, whetherToForceLogin, wx.getStorageSync('sessionid'), res.path != "pages/login/main"); log.info("wx.onAppRoute", res, mpApp.globalData.shopInfo, whetherToForceLogin, wx.getStorageSync('sessionid'), res.path != "pages/login/main");
console.log(res,mpApp.globalData.shopInfo,whetherToForceLogin,wx.getStorageSync('sessionid'),res.path !="pages/login/main",'---------wx.onAppRoute') console.log(res,mpApp.globalData.shopInfo,whetherToForceLogin,wx.getStorageSync('sessionid'),res.path !="pages/login/main",'---------wx.onAppRoute')
console.log('判断->', whetherToForceLogin == 1, !wx.getStorageSync('sessionid'), res.path !="pages/login/main", res.query.backpath != "/login/wxRegister")
if (whetherToForceLogin == 1 && !wx.getStorageSync('sessionid') && res.path !="pages/login/main" && res.query.backpath != "/login/wxRegister") { if (whetherToForceLogin == 1 && !wx.getStorageSync('sessionid') && res.path !="pages/login/main" && res.query.backpath != "/login/wxRegister") {
let backUrl = `/pages/home/main`; let backUrl = `/${res.path}${serialize(res.query) ? ('?' + serialize(res.query)) : ''}`;
console.log('onAppRoute-backUrl->', backUrl)
const url = `/pages/login/main?back=${encodeURIComponent( const url = `/pages/login/main?back=${encodeURIComponent(
backUrl backUrl
)}&hideBack=1`; )}&hideBack=1`;
// TODO 暂时注释 // TODO 暂时注释
// console.log('强制登录->', 2) console.log('强制登录->', 2)
// wx.navigateTo({ wx.reLaunch({
// url: url url: url
// }); });
} }
new Promise((resolve) => { new Promise((resolve) => {
if (!spokesmanId) { if (!spokesmanId) {
...@@ -242,9 +244,9 @@ wx.onAppRoute(res => { ...@@ -242,9 +244,9 @@ wx.onAppRoute(res => {
}).then(() => { }).then(() => {
let trackPageViewQuery = { let trackPageViewQuery = {
title: '', title: '',
location: res.path, location: `${res.path}${serialize(res.query)?('?'+serialize(res.query)):''}`,
// path: fromPath.substring(0, fromPath.length - 5), // path: fromPath.substring(0, fromPath.length - 5),
path: `${res.path}${serialize(res.query)?('?'+serialize(res.query)):''}`, path: res.path,
sales: spokesmanId || "", sales: spokesmanId || "",
userId: userId || "", userId: userId || "",
lsdcode: getStoreInfo().offlineShopCode, lsdcode: getStoreInfo().offlineShopCode,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment