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
02f99356
Commit
02f99356
authored
Apr 28, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
道客兼容
parent
5a480118
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
src/pages/login/index.vue
+6
-0
src/pages/wxArticle/index.vue
+8
-2
No files found.
src/pages/login/index.vue
View file @
02f99356
...
...
@@ -65,6 +65,7 @@ export default {
test_isHaveUnion
:
""
,
test_unionId
:
""
,
fromType
:
''
,
//来源类型 mini:小程序跳转到当前登录页
scene
:
''
//场景
};
},
created
()
{},
...
...
@@ -96,6 +97,7 @@ export default {
},
onLoad
(
options
)
{
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
//mpvue 的混合周期 使用小程序生命周期数据未初始化
options
.
scene
&&
(
this
.
scene
=
options
.
scene
)
if
(
options
.
back
)
{
this
.
backPath
=
options
.
back
;
}
...
...
@@ -313,6 +315,10 @@ export default {
wx
.
navigateBack
({
delta
:
1
});
}
else
if
(
this
.
scene
==
'sso'
)
{
wx
.
redirectTo
({
url
:
`../wxArticle/main?link=
${
this
.
backPath
}
`
,
});
}
else
{
wx
.
reLaunch
({
url
:
`../index/main?from=login&backpath=
${
...
...
src/pages/wxArticle/index.vue
View file @
02f99356
...
...
@@ -25,8 +25,14 @@ export default {
}
},
onLoad
(
options
){
console
.
log
(
decodeURIComponent
(
options
.
link
),
'地址'
)
this
.
link
=
decodeURIComponent
(
options
.
link
)
if
(
options
.
scene
==
'sso'
&&
!
wx
.
getStorageSync
(
"sessionid"
))
{
wx
.
redirectTo
({
url
:
`../login/main?scene=sso&back=
${
link
}
`
});
}
else
{
console
.
log
(
decodeURIComponent
(
options
.
link
),
'地址'
)
this
.
link
=
decodeURIComponent
(
options
.
link
)
}
},
methods
:
{
//加载成功
...
...
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