Commit 7db0168a by 前端

Merge branch 'SAAS+V4.45' into 'master'

上线合并

See merge request !1
2 parents f3dd9a82 7d3fc2df
......@@ -13,6 +13,7 @@
"axios": "^0.18.0",
"element-ui": "^2.15.1",
"glsx-vue-common": "^1.2.1",
"glsx-common": "^2.10.1",
"lodash": "^4.17.10",
"sass-loader": "^7.1.0",
"vue": "^2.5.17",
......
......@@ -9,6 +9,7 @@ import { Request as request } from 'glsx-vue-common'
import '@/styles/index.css'
// 组件
import '@/components'
import { utils } from 'glsx-common'
// import _ from 'lodash'
// import axios from 'axios'
......@@ -38,15 +39,32 @@ Vue.use(ElementUI)
// })
// }
// }
const URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const getConfig = (url = URL + '/oss_carowner_config') => {
// const URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
// const getConfig = (url = URL + '/oss_carowner_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-carowner',
mockUrl:
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_carowner_config',
httpOptions: {
Headers: { refererurl: location.href },
request: { timeout: 30000 }
}
}
console.log('切换前端配置服务')
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!