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
2c192a7d
Commit
2c192a7d
authored
Mar 08, 2024
by
zeyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加接口白名单
parent
4d277e41
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
environments/environment.ts
+1
-1
util/interceptor.ts
+1
-1
No files found.
environments/environment.ts
View file @
2c192a7d
...
@@ -19,7 +19,7 @@ const config = {
...
@@ -19,7 +19,7 @@ const config = {
stage
,
stage
,
prod
prod
}
}
let
env
=
'
dev
'
;
let
env
=
'
prod
'
;
// if (process.env.NODE_ENV === 'development') {
// if (process.env.NODE_ENV === 'development') {
// env = 'dev';
// env = 'dev';
// }else if (process.env.NODE_ENV === 'production') {
// }else if (process.env.NODE_ENV === 'production') {
...
...
util/interceptor.ts
View file @
2c192a7d
import
{
baseURL
,
apiURL
,
cffpURL
}
from
"../environments/environment"
;
import
{
baseURL
,
apiURL
,
cffpURL
}
from
"../environments/environment"
;
// 白名单,不需要携带token就允许被访问的接口
// 白名单,不需要携带token就允许被访问的接口
const
whiteApiList
=
[
`
${
apiURL
}
/authorize/obtainToken`
,
`
${
apiURL
}
/authorize/checkToken`
,
`
${
cffpURL
}
/user/loginVerification`
,
`
${
apiURL
}
/appVersion/checkIsUpdate`
,
const
whiteApiList
=
[
`
${
apiURL
}
/authorize/obtainToken`
,
`
${
apiURL
}
/authorize/checkToken`
,
`
${
cffpURL
}
/user/loginVerification`
,
`
${
apiURL
}
/appVersion/checkIsUpdate`
,
`
${
cffpURL
}
/accessLog/accessLogSave`
,
`
${
cffpURL
}
/user/powerQuery`
,
`
${
cffpURL
}
/user/wxLogin`
];
`
${
cffpURL
}
/accessLog/accessLogSave`
,
`
${
cffpURL
}
/user/powerQuery`
,
`
${
cffpURL
}
/user/wxLogin`
,
`
${
cffpURL
}
/certificate/officialWebsiteDetail`
];
export
const
interceptor
=
()
=>
{
export
const
interceptor
=
()
=>
{
uni
.
addInterceptor
(
'request'
,
{
uni
.
addInterceptor
(
'request'
,
{
...
...
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