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
8b680255
Commit
8b680255
authored
Jul 01, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
道可问题
parent
d9acdf7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
src/pages/wxArticle/index.vue
+15
-2
No files found.
src/pages/wxArticle/index.vue
View file @
8b680255
...
...
@@ -45,6 +45,8 @@ function forUrlAddKey2(url, params) {
return
urlHost
}
}
const
app
=
getApp
();
const
{
log
}
=
app
;
export
default
{
data
()
{
return
{
...
...
@@ -57,6 +59,7 @@ export default {
},
async
onLoad
(
options
)
{
console
.
log
(
options
,
'--------------------options'
)
log
.
info
(
"--------------------options"
,
options
)
this
.
link
=
''
;
/**
* scene=sso 第三方需要登录的页面
...
...
@@ -141,9 +144,10 @@ export default {
}
else
{
url
=
res
.
webViewUrl
;
}
console
.
log
(
forUrlAddKey2
(
url
,
[
"token"
]),
777777777
)
// forUrlAddKey2(url, ["token"])
console
.
log
(
url
,
'++++++++++++++++++'
,
decodeURIComponent
(
url
).
replace
(
/
\/\?(
.+
?)
#
\/
/
,
'/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'
),
777777777
)
if
(
url
.
indexOf
(
'setToken={token}'
)
==
-
1
)
{
url
=
forUrlAddKey2
(
url
,
[
"token"
]
);
url
=
decodeURIComponent
(
url
).
replace
(
/
\/\?(
.+
?)
#
\/
/
,
'/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'
);
}
//分享页面去掉登录态
if
(
url
.
indexOf
(
"sessionid"
)
>
-
1
)
{
...
...
@@ -203,6 +207,15 @@ export default {
this
.
setLink
(
res
.
data
.
data
);
}
else
{
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
});
if
(
res
.
data
.
msg
==
"登录人信息错误"
)
{
// 跳转登录页
let
backUrl
=
link
.
split
(
"?"
)[
0
];
let
ossLink
=
link
.
split
(
"?"
)[
1
]
+
'?'
+
link
.
split
(
"?"
)[
2
];
let
url
=
`/pages/login/main?scene=sso&isEncode=1&back=
${
backUrl
}
&ossLink=
${
encodeURIComponent
(
ossLink
)}
`
;
wx
.
navigateTo
({
url
});
}
}
});
},
...
...
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