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 c5732cf6
authored
Jul 13, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
服务配置
1 parent
80ba389a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
src/config/index.js
src/setup/qiankun.js
src/config/index.js
View file @
c5732cf
...
@@ -4,20 +4,21 @@
...
@@ -4,20 +4,21 @@
* @Author: limin
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-0
6-13 13:57:26
* @LastEditTime: 2023-0
7-13 11:55:55
*/
*/
// 根据环境引入不同配置 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
}
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)
// }
// }
return
new
Http
().
get
(
'https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config'
)
let
params
=
{
moduleName
:
'home'
,
mockUrl
:
'https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
return
common
.
utils
.
getConfig
(
params
)
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
}
}
export
const
config
=
{
export
const
config
=
{
...
...
src/setup/qiankun.js
View file @
c5732cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13
* @Date: 2022-07-22 18:15:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-0
5-30 14:38:23
* @LastEditTime: 2023-0
7-13 12:04:30
* @FilePath: \scrm-micro-home\src\setup\qiankun.js
* @FilePath: \scrm-micro-home\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -28,7 +28,7 @@ let routes = []
...
@@ -28,7 +28,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_merchant
,
request_gpt
,
sign_common
,
scene
,
cavansObj
}
=
await
fetchConfig
()
const
{
response
,
request
,
sign
,
secret
,
request_common
,
request_merchant
,
request_gpt
,
sign_common
,
scene
,
cavansObj
}
=
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