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
0c9baf4f
Commit
0c9baf4f
authored
Jul 25, 2023
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码落地页
parent
aa72c08c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
55 deletions
+46
-55
src/pages/wxArticle/index.vue
+46
-55
No files found.
src/pages/wxArticle/index.vue
View file @
0c9baf4f
...
...
@@ -66,77 +66,68 @@ export default {
* scene=sso 第三方需要登录的页面
* login=1 jwt需要登录(临时方案)
*/
let
link
=
""
;
if
(
options
.
scene
)
{
//扫码
let
data
=
await
this
.
getParams
(
options
.
scene
);
if
(
data
.
sso
)
{
let
link
=
data
.
link
;
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"getMixId"
)
==
'1'
)
{
//第三方跳转加mixid
link
=
forUrlAddKey
(
decodeURIComponent
(
link
),{
mixid
:
this
.
$store
.
state
.
mixid
})
}
if
(
!
wx
.
getStorageSync
(
"sessionid"
))
{
link
=
data
.
link
;
}
}
else
if
(
options
.
link
)
{
link
=
options
.
link
;
}
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"getMixId"
)
==
'1'
)
{
//第三方跳转加mixid
link
=
forUrlAddKey
(
decodeURIComponent
(
link
),{
mixid
:
this
.
$store
.
state
.
mixid
})
}
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"scene"
)
==
'dynamicForm'
)
{
link
=
decodeURIComponent
(
link
)
}
console
.
log
(
link
,
'--------------------------57'
)
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"scene"
)
==
"sso"
)
{
if
(
!
wx
.
getStorageSync
(
"sessionid"
))
{
// appraisalTwo:道可二级详情页面,之前进入道可项目所有页面都需登录,现在进入二级可不登录
if
(
!
link
.
includes
(
"appraisalTwo"
))
{
wx
.
redirectTo
({
url
:
`../login/main?scene=sso&isEncode=1&back=
${
link
}
`
,
});
}
else
{
this
.
getSsoBcakUrl
(
decodeURIComponent
(
link
).
replace
(
/
\/\?(
.+
?)
#
\/
/
,
'/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'
));
}
}
}
else
if
(
options
.
link
)
{
let
link
=
options
.
link
;
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"getMixId"
)
==
'1'
)
{
//第三方跳转加mixid
link
=
forUrlAddKey
(
decodeURIComponent
(
link
),{
mixid
:
this
.
$store
.
state
.
mixid
})
}
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"scene"
)
==
'dynamicForm'
)
{
link
=
decodeURIComponent
(
link
)
}
console
.
log
(
link
,
'--------------------------57'
)
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"scene"
)
==
"sso"
)
{
if
(
!
wx
.
getStorageSync
(
"sessionid"
))
{
// appraisalTwo:道可二级详情页面,之前进入道可项目所有页面都需登录,现在进入二级可不登录
if
(
!
link
.
includes
(
"appraisalTwo"
))
{
wx
.
redirectTo
({
url
:
`../login/main?scene=sso&isEncode=1&back=
${
link
}
`
,
});
}
else
{
this
.
setLink
(
decodeURIComponent
(
link
));
}
}
else
{
this
.
getSsoBcakUrl
(
decodeURIComponent
(
link
).
replace
(
/
\/\?(
.+
?)
#
\/
/
,
'/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'
));
}
}
else
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"login"
)
!=
"1"
)
{
//判断是否需要带token
if
(
decodeURIComponent
(
link
).
indexOf
(
'setToken={token}'
)
>
-
1
)
{
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
getSsoBcakUrl
(
decodeURIComponent
(
link
).
replace
(
/
\/\?(
.+
?)
#
\/
/
,
'/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'
))
}
else
{
let
url
=
`/pages/login/main?scene=sso&isEncode=1&back=
${
link
}
`
;
wx
.
navigateTo
({
url
});
}
}
else
{
this
.
setLink
(
decodeURIComponent
(
link
));
}
}
else
{
this
.
getSsoBcakUrl
(
decodeURIComponent
(
link
).
replace
(
/
\/\?(
.+
?)
#
\/
/
,
'/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'
));
}
}
else
if
(
getUrlKey
(
decodeURIComponent
(
link
),
"login"
)
!=
"1"
)
{
//判断是否需要带token
if
(
decodeURIComponent
(
link
).
indexOf
(
'setToken={token}'
)
>
-
1
)
{
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
setLink
(
forUrlAddKey
(
decodeURIComponent
(
link
),
{
token
:
wx
.
getStorageSync
(
"sessionid"
),
jwt
:
1
,
})
);
this
.
getSsoBcakUrl
(
decodeURIComponent
(
link
).
replace
(
/
\/\?(
.+
?)
#
\/
/
,
'/?token=${token}&scene=sso&toAppid=qOAhsauSaagQlxYdGbJL#/'
))
}
else
{
let
url
=
""
;
if
(
link
.
includes
(
'formDesignDetail'
)){
url
=
`/pages/login/main?scene=sso&back=
${
encodeURIComponent
(
link
)}
`
}
else
{
url
=
`/pages/login/main?scene=sso&back=
${
link
}
`
}
let
url
=
`/pages/login/main?scene=sso&isEncode=1&back=
${
link
}
`
;
wx
.
navigateTo
({
url
,
url
});
}
}
else
{
this
.
setLink
(
decodeURIComponent
(
link
));
}
}
else
{
if
(
wx
.
getStorageSync
(
"sessionid"
))
{
this
.
setLink
(
forUrlAddKey
(
decodeURIComponent
(
link
),
{
token
:
wx
.
getStorageSync
(
"sessionid"
),
jwt
:
1
,
})
);
}
else
{
let
url
=
""
;
if
(
link
.
includes
(
'formDesignDetail'
)){
url
=
`/pages/login/main?scene=sso&back=
${
encodeURIComponent
(
link
)}
`
}
else
{
url
=
`/pages/login/main?scene=sso&back=
${
link
}
`
}
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