Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马旭烽
jinfa-admin
Commits
2cfb8c6a
Commit
2cfb8c6a
authored
Feb 16, 2022
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改网关
parent
3e8c4bda
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
env.js
env.js
+2
-2
pullRemoteRouterList.js
scripts/pullRemoteRouterList.js
+1
-0
global.d.ts
src/global/config/global.d.ts
+1
-1
request.ts
src/utils/request.ts
+8
-1
No files found.
env.js
View file @
2cfb8c6a
...
...
@@ -168,9 +168,9 @@ module.exports = {
// 阿里云demo站更新
"v2-ali-demo"
:
{
SITE_ID
:
'1'
,
BACK_GATEWAY
:
'http://lingxi-scm-gateway.shushangyun.com
:13880
'
,
BACK_GATEWAY
:
'http://lingxi-scm-gateway.shushangyun.com'
,
USE_ROUTE_CONFIG
:
true
,
SOCKET_URL
:
'ws://lingxi-scm-gateway.shushangyun.com
:13880
'
,
SOCKET_URL
:
'ws://lingxi-scm-gateway.shushangyun.com'
,
YAPI_URL
:
'http://10.0.0.25:4000/'
}
}
scripts/pullRemoteRouterList.js
View file @
2cfb8c6a
...
...
@@ -77,6 +77,7 @@ async function batchAxiosHttps() {
asyncHttpQueue
[
item
][
subItem
]
=
null
}
}
catch
(
err
)
{
console
.
log
(
err
)
httpErrorQueue
.
push
({
...
serviceConfig
[
item
][
subItem
],
...
err
.
response
.
data
})
}
}
...
...
src/global/config/global.d.ts
View file @
2cfb8c6a
...
...
@@ -32,7 +32,7 @@ export interface SiteInfo {
name
:
string
;
logo
:
string
;
siteUrl
:
string
;
symbol
?:
any
;
symbol
:
string
;
}
export
interface
Global
{
...
...
src/utils/request.ts
View file @
2cfb8c6a
import
{
extend
,
ResponseError
,
OnionOptions
,
RequestOptionsInit
,
ResponseInterceptor
,
OnionMiddleware
,
Context
,
RequestMethod
}
from
'umi-request'
;
import
responseCode
from
'@/constants/responseCode'
import
{
IRequestError
,
IRequestSuccess
}
from
'..'
;
import
{
history
}
from
'umi'
import
{
getLocale
,
history
}
from
'umi'
import
{
message
}
from
'antd'
import
{
getAuth
,
removeAuth
,
removeRouters
}
from
'./auth'
;
import
{
isDev
}
from
'@/constants'
;
...
...
@@ -44,6 +44,12 @@ const defaultHeaders = {
'source'
:
'99'
}
const
requestLanguageMaps
=
{
'zh-CN'
:
'zh'
,
'en-US'
:
'en'
,
'ko-KR'
:
'ko'
,
}
/**
* 配置request请求时的默认参数, 底层使用fetch进行请求
*/
...
...
@@ -59,6 +65,7 @@ baseRequest.interceptors.request.use((url: string, options: RequestOptionsInit):
// 判断是否有权限
const
{
userId
,
memberId
,
token
}
=
getAuth
()
||
{}
const
headers
=
{
'Accept-Language'
:
requestLanguageMaps
[
getLocale
()
as
any
],
...
options
.
headers
,
userId
,
memberId
,
...
...
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