Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8ddfc418
authored
Feb 22, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
判断配置
1 parent
0ffbc998
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
src/config/index.js
src/config/index.js
View file @
8ddfc41
...
@@ -17,9 +17,21 @@ export const fetchConfig = function(isEnv = false) {
...
@@ -17,9 +17,21 @@ export const fetchConfig = function(isEnv = false) {
Object
.
assign
(
request
,
{
timeout
})
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
cfg
)
return
Promise
.
resolve
(
cfg
)
}
}
return
new
Http
({
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}).
get
(
'http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=setting'
).
then
(
res
=>
res
.
data
)
//
return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=setting').then(res =>res.data)
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
// return new Http().get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=setting-kyq').then(res => res.data)
// return new Http().get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=setting-kyq').then(res => res.data)
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
return
new
Http
()
.
get
(
'http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=setting'
)
.
then
(
res
=>
{
return
res
.
data
})
.
catch
(
err
=>
{
return
new
Http
().
get
(
'https://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config'
)
})
}
else
{
return
new
Http
().
get
(
'https://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config'
)
}
}
}
export
const
config
=
{
export
const
config
=
{
install
(
vue
,
cfg
)
{
install
(
vue
,
cfg
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment