Commit 78621d71 by 王志慧

修改配置文件

1 parent d030e1ee
......@@ -12,6 +12,7 @@
"dependencies": {
"axios": "^0.18.0",
"element-ui": "^2.15.1",
"glsx-common": "^2.10.1",
"glsx-table": "^1.0.3",
"glsx-vue-common": "^2.0.5",
"lodash": "^4.17.10",
......
......@@ -3,6 +3,7 @@
import Vue from 'vue'
import ElementUI from 'element-ui'
import glsxTable from 'glsx-table'
import { Http, utils } from 'glsx-common'
import 'element-ui/lib/theme-chalk/index.css'
// import GlsxVueComponents from 'glsx-vue-components'
// import 'glsx-vue-components/dist/glsx-vue-components.css'
......@@ -79,17 +80,31 @@ var mixin = {
}
}
const URL = 'http://192.168.3.171:7300/mock/5be17454f31545347559d499/config'
const getConfig = (url = URL + '/switch-config') => {
const getConfig = () => {
// return new Promise((resolve, reject) => {
// request({ url }).then(res => {
// if (res.status === 'success') {
// resolve({ 'vue': Vue, 'config': JSON.parse(res.data) })
// } else {
// reject('ERROR.')
// }
// })
// })
let params = {
moduleName: 'glsx-oss-configuration',
mockUrl: 'http://192.168.3.171:7300/mock/5be17454f31545347559d499/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 })
})
})
}
/* eslint-disable no-new */
const render = App => {
window.vm = new Vue({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!