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 d15f3f04
authored
Jun 10, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新配置
1 parent
f34b9b91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
src/config/index.js
src/setup/qiankun.js
src/config/index.js
View file @
d15f3f0
...
@@ -11,14 +11,15 @@
...
@@ -11,14 +11,15 @@
let
cfg
=
require
(
'./conf.js'
)
let
cfg
=
require
(
'./conf.js'
)
import
{
Http
}
from
'glsx-common'
import
{
Http
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
false
)
{
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
:
'setting'
,
mockUrl
:
'https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
return
new
Http
().
get
(
'https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config'
)
return
common
.
utils
.
getConfig
(
params
)
// return new Http().get('https://oss-config.test.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)
}
}
export
const
config
=
{
export
const
config
=
{
...
...
src/setup/qiankun.js
View file @
d15f3f0
...
@@ -27,7 +27,7 @@ let routes = []
...
@@ -27,7 +27,7 @@ let routes = []
let
router
=
null
let
router
=
null
let
instance
=
null
let
instance
=
null
export
async
function
bootstrap
({
name
,
id
,
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
export
async
function
bootstrap
({
name
,
id
,
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
response
,
request
,
sign
,
secret
,
request_common
,
request_config
,
request_car
,
sign_common
}
=
await
fetchConfig
()
const
{
response
,
request
,
sign
,
secret
,
request_common
,
request_config
,
request_car
,
sign_common
}
=
await
fetchConfig
(
common
)
console
.
log
(
request
)
console
.
log
(
request
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$messenger
=
messenger
...
@@ -66,4 +66,4 @@ function subscribe({ messenger }) {
...
@@ -66,4 +66,4 @@ function subscribe({ messenger }) {
messenger
.
subscribe
(
v
=>
{
messenger
.
subscribe
(
v
=>
{
console
.
log
(
`监听到子应用
${
v
.
from
}
发来消息:`
,
v
)
console
.
log
(
`监听到子应用
${
v
.
from
}
发来消息:`
,
v
)
})
})
}
\ No newline at end of file
\ No newline at end of file
}
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