Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
data-view
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 0328208d
authored
Jun 30, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改mock
1 parent
de088d7e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
src/config/env.development.js
src/config/index.js
src/main.js
src/config/env.development.js
View file @
0328208
...
@@ -11,7 +11,7 @@ module.exports = {
...
@@ -11,7 +11,7 @@ module.exports = {
envVersion
:
'trial'
,
envVersion
:
'trial'
,
title
:
'广汇汽车服务'
,
title
:
'广汇汽车服务'
,
request
:
{
request
:
{
baseURL
:
'http://
scrm.dev.glsx.com.cn
'
,
// 本地测试项目地址,
baseURL
:
'http://
192.168.3.126:8081
'
,
// 本地测试项目地址,
// 设置超时时间
// 设置超时时间
timeout
:
180000
,
timeout
:
180000
,
// 携带凭证
// 携带凭证
...
...
src/config/index.js
View file @
0328208
...
@@ -15,8 +15,8 @@ export const fetchConfig = function (isEnv = true) {
...
@@ -15,8 +15,8 @@ export const fetchConfig = function (isEnv = true) {
Object
.
assign
(
request
,
{
timeout
})
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
config
)
return
Promise
.
resolve
(
config
)
}
}
// /**测试mock */ return window.fetch('https://oss-config.dev.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-
config', {}).then(res => res.json())
/**测试mock */
return
window
.
fetch
(
'https://oss-config.dev.glsx.com.cn/mock/62bd8142304f1311a3b76a04/data-view/
config'
,
{}).
then
(
res
=>
res
.
json
())
/**生产 */
return
window
.
fetch
(
'https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config'
,
{}).
then
(
res
=>
res
.
json
())
/
/ /
**生产 */ return window.fetch('https://oss-config.test.glsx.com.cn/mock/617918601072f92988f05a11/base/scrm-wx-work-main-config', {}).then(res => res.json())
}
}
export
const
cfg
=
{
export
const
cfg
=
{
install
(
vue
,
config
)
{
install
(
vue
,
config
)
{
...
...
src/main.js
View file @
0328208
...
@@ -38,8 +38,7 @@ fetchConfig(!isMock).then(res => {
...
@@ -38,8 +38,7 @@ fetchConfig(!isMock).then(res => {
// 设置 js中可以访问 $cdn
// 设置 js中可以访问 $cdn
Vue
.
use
(
cfg
)
Vue
.
use
(
cfg
)
// if (res.vconsole) new VConsole()
// if (res.vconsole) new VConsole()
window
.
$HTTP
=
new
Request
()
window
.
$HTTP
=
new
Request
(
res
.
request
)
// window.$HTTP = new Request(res.request)
Vue
.
prototype
.
api
=
api
Vue
.
prototype
.
api
=
api
window
.
vm
=
new
Vue
({
window
.
vm
=
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
...
...
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