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
291aa394
Commit
291aa394
authored
Jul 21, 2021
by
张卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化道可分享功能
parent
3fe47975
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/pages/wxArticle/index.vue
+4
-3
No files found.
src/pages/wxArticle/index.vue
View file @
291aa394
...
@@ -30,8 +30,6 @@ export default {
...
@@ -30,8 +30,6 @@ export default {
},
},
async
onLoad
(
options
)
{
async
onLoad
(
options
)
{
this
.
link
=
''
;
this
.
link
=
''
;
console
.
log
(
options
,
"第三方页面"
);
/**
/**
* scene=sso 第三方需要登录的页面
* scene=sso 第三方需要登录的页面
* login=1 jwt需要登录(临时方案)
* login=1 jwt需要登录(临时方案)
...
@@ -69,7 +67,7 @@ export default {
...
@@ -69,7 +67,7 @@ export default {
//判断是否需要带token
//判断是否需要带token
if
(
decodeURIComponent
(
link
).
indexOf
(
'setToken={token}'
)
>
-
1
)
{
if
(
decodeURIComponent
(
link
).
indexOf
(
'setToken={token}'
)
>
-
1
)
{
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
setLink
(
decodeURIComponent
(
link
).
replace
(
'setToken=
$
{token}'
,
'token='
+
wx
.
getStorageSync
(
"sessionid"
)));
this
.
setLink
(
decodeURIComponent
(
link
).
replace
(
'setToken={token}'
,
'token='
+
wx
.
getStorageSync
(
"sessionid"
)));
}
else
{
}
else
{
let
url
=
`/pages/login/main?scene=sso&back=
${
link
}
`
;
let
url
=
`/pages/login/main?scene=sso&back=
${
link
}
`
;
wx
.
navigateTo
({
wx
.
navigateTo
({
...
@@ -105,7 +103,10 @@ export default {
...
@@ -105,7 +103,10 @@ export default {
}
else
{
}
else
{
url
=
res
.
webViewUrl
;
url
=
res
.
webViewUrl
;
}
}
console
.
log
(
removeUrlKey
(
url
,
[
"token"
]),
777777777
)
if
(
url
.
indexOf
(
'setToken={token}'
)
==
-
1
)
{
url
=
removeUrlKey
(
url
,
[
"token"
]);
url
=
removeUrlKey
(
url
,
[
"token"
]);
}
//分享页面去掉登录态
//分享页面去掉登录态
if
(
url
.
indexOf
(
"sessionid"
)
>
-
1
)
{
if
(
url
.
indexOf
(
"sessionid"
)
>
-
1
)
{
url
=
url
.
split
(
"?"
)[
0
]
+
"?mixid="
+
this
.
shopId
;
url
=
url
.
split
(
"?"
)[
0
]
+
"?mixid="
+
this
.
shopId
;
...
...
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