Commit 3bf8caab by 李嘉林

feat: pl、pp换位置

parent aee3070d
......@@ -201,16 +201,18 @@ wx.onAppRoute(res => {
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");
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") {
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(
backUrl
)}&hideBack=1`;
// TODO 暂时注释
// console.log('强制登录->', 2)
// wx.navigateTo({
// url: url
// });
console.log('强制登录->', 2)
wx.reLaunch({
url: url
});
}
new Promise((resolve) => {
if (!spokesmanId) {
......@@ -242,9 +244,9 @@ wx.onAppRoute(res => {
}).then(() => {
let trackPageViewQuery = {
title: '',
location: res.path,
location: `${res.path}${serialize(res.query)?('?'+serialize(res.query)):''}`,
// path: fromPath.substring(0, fromPath.length - 5),
path: `${res.path}${serialize(res.query)?('?'+serialize(res.query)):''}`,
path: res.path,
sales: spokesmanId || "",
userId: userId || "",
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