Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-home
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 84f949e3
authored
Mar 22, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改配置
1 parent
8bc22e7f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
package.json
src/config/index.js
package.json
View file @
84f949e
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
"babel-polyfill"
:
"^6.26.0"
,
"babel-polyfill"
:
"^6.26.0"
,
"core-js"
:
"^3.4.4"
,
"core-js"
:
"^3.4.4"
,
"el-tree-transfer"
:
"^2.2.6"
,
"el-tree-transfer"
:
"^2.2.6"
,
"glsx-common"
:
"^
1.4
.6"
,
"glsx-common"
:
"^
2.0
.6"
,
"glsx-components"
:
"^1.5.2"
,
"glsx-components"
:
"^1.5.2"
,
"glsx-table"
:
"^1.0.9"
"glsx-table"
:
"^1.0.9"
},
},
...
...
src/config/index.js
View file @
84f949e
...
@@ -9,16 +9,18 @@
...
@@ -9,16 +9,18 @@
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
// let request = require('@/http/request.js')
let
cfg
=
require
(
'./conf.js'
)
let
cfg
=
require
(
'./conf.js'
)
import
{
Http
}
from
'glsx-common'
import
{
Http
,
utils
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// if (isEnv) {
// if (isEnv) {
// let { request } = cfg
// let { request } = cfg
// Object.assign(request, { timeout })
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// return Promise.resolve(cfg)
// }
// }
let
params
=
{
moduleName
:
'home'
,
mockUrl
:
'https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config'
,
env
:
'test'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
return
utils
.
getConfig
(
params
)
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
return
new
Http
({
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}).
get
(
'http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home'
).
then
(
res
=>
res
)
//
return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=home').then(res => res)
}
}
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