Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-sop
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 bda7dc67
authored
Jun 12, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
切换配置服务
1 parent
82610398
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
package.json
src/config/index.js
package.json
View file @
bda7dc6
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"autoprefixer"
:
"^8.0.0"
,
"autoprefixer"
:
"^8.0.0"
,
"core-js"
:
"^3.6.4"
,
"core-js"
:
"^3.6.4"
,
"dayjs"
:
"^1.10.5"
,
"dayjs"
:
"^1.10.5"
,
"glsx-common"
:
"^
1.4.9
"
,
"glsx-common"
:
"^
2.1.0
"
,
"lib-flexible"
:
"^0.3.2"
,
"lib-flexible"
:
"^0.3.2"
,
"postcss-loader"
:
"^6.2.0"
,
"postcss-loader"
:
"^6.2.0"
,
"sha1"
:
"^1.1.1"
,
"sha1"
:
"^1.1.1"
,
...
...
src/config/index.js
View file @
bda7dc6
/*
/*
* @Descripttion:
* @Descripttion:
* @version:
* @version:
...
@@ -7,20 +8,20 @@
...
@@ -7,20 +8,20 @@
* @LastEditTime: 2021-06-30 11:23:25
* @LastEditTime: 2021-06-30 11:23:25
*/
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// 根据环境引入不同配置 process.env.VUE_APP_ENV
import
{
utils
,
Http
}
from
'glsx-common'
let
config
=
require
(
'./conf.js'
)
let
config
=
require
(
'./conf.js'
)
let
timeout
=
30000
//超时时间
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
if
(
isEnv
)
{
// if (isEnv) {
let
{
request
}
=
config
// let { request } = config
Object
.
assign
(
request
,
{
timeout
})
// Object.assign(request, { timeout })
return
Promise
.
resolve
(
config
)
// return Promise.resolve(config)
// }
}
let
params
=
{
moduleName
:
'scrm-wx-work-sop-config'
,
mockUrl
:
'https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-sop-config'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
// /**测试mock*/ return window.fetch('https://oss-config.dev.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-sop-config', {}).then(res => res.json())
return
utils
.
getConfig
(
params
)
/**生产mock*/
return
window
.
fetch
(
'https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-sop-config'
,
{}).
then
(
res
=>
res
.
json
())
}
}
export
const
cfg
=
{
export
const
cfg
=
{
install
(
vue
,
config
)
{
install
(
vue
,
config
)
{
vue
.
prototype
.
$config
=
config
vue
.
prototype
.
$config
=
config
}
}
}
}
\ 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