Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-inventory
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 ff52aeff
authored
May 04, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
配置服务修改
1 parent
c0027c0f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
src/config/index.js
src/setup/qiankun.js
src/config/index.js
View file @
ff52aef
...
@@ -11,14 +11,14 @@
...
@@ -11,14 +11,14 @@
let
cfg
=
require
(
'./conf.js'
)
let
cfg
=
require
(
'./conf.js'
)
import
{
Http
,
utils
}
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
(
common
)
{
// 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
:
'inventory'
,
mockUrl
:
'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/purchase/config'
,
env
:
'test'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
let
params
=
{
moduleName
:
'inventory'
,
mockUrl
:
'https://oss-config.glsx.com.cn/mock/643e06c7ea3da3a974f54357/purchase/config'
,
env
:
'test'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
return
utils
.
getConfig
(
params
)
return
common
.
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)
}
}
...
...
src/setup/qiankun.js
View file @
ff52aef
...
@@ -12,7 +12,7 @@ let instance = null
...
@@ -12,7 +12,7 @@ let instance = null
Vue
.
use
(
ElementUI
)
Vue
.
use
(
ElementUI
)
Vue
.
use
(
GLTable
)
Vue
.
use
(
GLTable
)
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
response
,
request
,
sign
,
secret
,
sign_common
,
request_common
}
=
await
fetchConfig
()
const
{
response
,
request
,
sign
,
secret
,
sign_common
,
request_common
}
=
await
fetchConfig
(
common
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
Vue
.
prototype
.
$globalState
=
globalState
...
...
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