Commit 28ce841a by chenwq

前端配置服务变更

1 parent e54f89db
......@@ -14,6 +14,7 @@
"dayjs": "^1.11.4",
"element-ui": "^2.15.1",
"glsx-vue-common": "^2.0.5",
"glsx-common": "^2.10.1",
"lodash": "^4.17.10",
"sass-loader": "^7.1.0",
"sha1": "^1.1.1",
......
......@@ -10,6 +10,7 @@ import '@/styles/index.css'
// 组件
import '@/components'
import { Util } from './common/util'
import { utils } from 'glsx-common'
// import _ from 'lodash'
// import axios from 'axios'
......@@ -72,16 +73,32 @@ var mixin = {
}
}
}
const URL =
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const getConfig = (url = URL + '/renwal-config') => {
// const URL =
// 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
// const getConfig = (url = URL + '/renwal-config') => {
// return new Promise((resolve, reject) => {
// request({ url }).then(res => {
// if (res.status === 'success') {
// resolve({ vue: Vue, config: JSON.parse(res.data) })
// } else {
// reject('ERROR.')
// }
// })
// })
// }
const getConfig = () => {
let params = {
moduleName: 'glsx-oss-renwal',
mockUrl:
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/renwal-config',
httpOptions: {
Headers: { refererurl: location.href },
request: { timeout: 30000 }
}
}
return new Promise((resolve, reject) => {
request({ url }).then(res => {
if (res.status === 'success') {
resolve({ vue: Vue, config: JSON.parse(res.data) })
} else {
reject('ERROR.')
}
utils.getConfig(params).then(res => {
resolve({ vue: Vue, config: res })
})
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!