Commit 149e7407 by 李伟康

提交

1 parent 78868004
This diff could not be displayed because it is too large.
......@@ -14,7 +14,7 @@
"dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5",
"glsx-common": "^2.0.4",
"glsx-common": "^2.1.0",
"glsx-components": "^1.5.3",
"vod-js-sdk-v6": "^1.5.0",
"vue": "^2.6.10",
......
......@@ -9,23 +9,19 @@
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
let cfg = require('./conf.js')
import { Http } from 'glsx-common'
import { Http, utils } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) {
// console.log(1111111)
if (isEnv) {
let { request } = cfg
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.glsx.com.cn/mock/63c129a528a4279537834035/content/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/63969466b9cfb051d7d5fc27/content/config')
export const fetchConfig = function (isEnv = true) {
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
let params = { moduleName: 'content', mockUrl: 'https://oss-config.glsx.com.cn/mock/63c129a528a4279537834035/content/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return utils.getConfig(params)
}
export const config = {
install(vue, cfg) {
install (vue, cfg) {
vue.prototype.$config = cfg
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!