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
8f144141
Commit
8f144141
authored
Apr 17, 2023
by
wenyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APP热更新接口添加到白名单中(不需要校验token与登录状态)
parent
9b52c127
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
manifest.json
+1
-1
util/interceptor.ts
+3
-2
No files found.
manifest.json
View file @
8f144141
...
...
@@ -2,7 +2,7 @@
"name"
:
"CFFP财富中心"
,
"appid"
:
"__UNI__ED34740"
,
"description"
:
""
,
"versionCode"
:
10
3
,
"versionCode"
:
10
4
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
"app-plus"
:
{
...
...
util/interceptor.ts
View file @
8f144141
import
{
baseURL
,
apiURL
,
cffpURL
}
from
"../environments/environment"
;
// 白名单,不需要携带token就允许被访问的接口
const
whiteApiList
=
[
`
${
apiURL
}
/authorize/obtainToken`
,
`
${
apiURL
}
/authorize/checkToken`
,
`
${
cffpURL
}
/user/loginVerification`
];
const
whiteApiList
=
[
`
${
apiURL
}
/authorize/obtainToken`
,
`
${
apiURL
}
/authorize/checkToken`
,
`
${
cffpURL
}
/user/loginVerification`
,
`
${
apiURL
}
/appVersion/checkIsUpdate`
];
export
const
interceptor
=
()
=>
{
uni
.
addInterceptor
(
'request'
,
{
// 请求拦截器
invoke
(
args
)
{
//
console.log('请求拦截器',args.url);
//
console.log('请求拦截器',args.url);
// 加载loading
// uni.showLoading({
// title: '加载中...'
...
...
@@ -56,6 +56,7 @@ export const interceptor = () => {
// uni.redirectTo({
// url:'/components/login/login'
// })
uni
.
removeStorageSync
(
'isLogin'
);
uni
.
switchTab
({
url
:
'/pages/index/index'
})
...
...
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