Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
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
Chao Sun
CFFP-HB
Commits
efcdf574
Commit
efcdf574
authored
Jun 17, 2025
by
yuzhenWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复没有登录状态
parent
b3e070b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
pages/orderStatus/orderStatus.vue
+1
-0
util/router.js
+7
-0
No files found.
pages/orderStatus/orderStatus.vue
View file @
efcdf574
...
@@ -133,6 +133,7 @@
...
@@ -133,6 +133,7 @@
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'data'
][
'token'
]);
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'data'
][
'token'
]);
uni
.
setStorageSync
(
'cffp_userId'
,
options
.
userId
);
uni
.
setStorageSync
(
'cffp_userId'
,
options
.
userId
);
uni
.
setStorageSync
(
'isLogin'
,
'1'
);
uni
.
setStorageSync
(
'isLogin'
,
'1'
);
uni
.
setStorageSync
(
'loginType'
,
'codelogin'
)
uni
.
setStorageSync
(
'isH5'
,
1
);
uni
.
setStorageSync
(
'isH5'
,
1
);
this
.
courseList
()
this
.
courseList
()
}
}
...
...
util/router.js
View file @
efcdf574
...
@@ -14,6 +14,13 @@ export default function initApp(){
...
@@ -14,6 +14,13 @@ export default function initApp(){
uni
.
addInterceptor
(
'navigateTo'
,
{
uni
.
addInterceptor
(
'navigateTo'
,
{
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke
(
e
)
{
invoke
(
e
)
{
if
(
!
uni
.
getStorageSync
(
'loginType'
)){
uni
.
clearStorageSync
();
uni
.
setStorageSync
(
'loginType'
,
'visitor'
)
uni
.
redirectTo
({
url
:
'/components/login/login'
})
}
if
(
uni
.
getStorageSync
(
'cffp_userId'
)){
if
(
uni
.
getStorageSync
(
'cffp_userId'
)){
api
.
queryInfo
({
userId
:
uni
.
getStorageSync
(
'cffp_userId'
)}).
then
(
res
=>
{
api
.
queryInfo
({
userId
:
uni
.
getStorageSync
(
'cffp_userId'
)}).
then
(
res
=>
{
if
(
!
res
[
'success'
]){
if
(
!
res
[
'success'
]){
...
...
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