Commit 0328208d by 李伟康

修改mock

1 parent de088d7e
...@@ -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,
// 携带凭证 // 携带凭证
......
...@@ -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) {
......
...@@ -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',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!