Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
3bf8caab
Commit
3bf8caab
authored
Jul 05, 2024
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: pl、pp换位置
parent
aee3070d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/main.js
+9
-7
No files found.
src/main.js
View file @
3bf8caab
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment