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
Hide 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 => {
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
,
...
...
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