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
5e4eafe4
Commit
5e4eafe4
authored
Mar 23, 2023
by
wenyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 如果接口返回errorCode=T001,massage=Token校验未通过,直接跳转到登录页面
2. 登录时把Token放缓存中 3. APP上架小米时,不能有“此功能暂未开放”提示
parent
7a905025
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
components/bootpage/bootpage.vue
+3
-2
pages/product/product.vue
+6
-3
util/interceptor.ts
+7
-2
No files found.
components/bootpage/bootpage.vue
View file @
5e4eafe4
...
...
@@ -120,8 +120,9 @@
api
.
loginVerification
(
params
).
then
((
res
)
=>
{
if
(
res
[
'success'
]){
this
.
userId
=
String
(
res
[
'data'
][
'userId'
]);
uni
.
setStorageSync
(
'isLogin'
,
'1'
)
uni
.
setStorageSync
(
'loginType'
,
'pwlogin'
)
uni
.
setStorageSync
(
'isLogin'
,
'1'
);
uni
.
setStorageSync
(
'loginType'
,
'pwlogin'
);
uni
.
setStorageSync
(
'uni-token'
,
res
.
data
[
'token'
]);
// uni.navigateTo({
// url:'/pages/orderConfirm/orderConfirm?userId=' + this.userId
// })
...
...
pages/product/product.vue
View file @
5e4eafe4
...
...
@@ -33,7 +33,8 @@
data
()
{
return
{
currentPage
:
'product'
,
remList
:
[{
remList
:
[
/* {
link:'',
icon: '../../static/SFP/Slice63.png',
text: 'SFP智能财策'
...
...
@@ -43,16 +44,18 @@
icon: '../../static/SFP/Slice65.png',
text: '产品库'
},
*/
{
link
:
'/pages/product/finance-calculator'
,
icon
:
'../../static/SFP/Slice64.png'
,
text
:
'金融计算器'
},
}
/* ,
{
link:'',
icon: '../../static/SFP/Slice62.png',
text: '法律工具'
}
}
*/
]
}
},
...
...
util/interceptor.ts
View file @
5e4eafe4
...
...
@@ -49,9 +49,14 @@ export const interceptor = () => {
},
// 响应拦截器,可以对数据进行预处理
success
()
{
success
(
args
)
{
// uni.hideLoading()
// console.log(args);
//console.log(args);
if
(
args
&&
args
.
data
&&
args
.
data
.
errorCode
&&
"T001"
==
args
.
data
.
errorCode
){
uni
.
redirectTo
({
url
:
'/components/login/login'
})
}
},
fail
()
{
// console.log('interceptor-fail', err)
...
...
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