Commit 05d52d53 by 前端

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

上线合并

See merge request !1
2 parents 1b0e07c5 e0b6dacf
......@@ -13,6 +13,7 @@
"file-saver": "^2.0.5",
"glsx-vue-common": "^1.2.8",
"glsx-vue-components": "^1.0.13",
"glsx-common": "^2.10.1",
"sha1": "^1.1.1",
"vee-validate": "^2.1.7",
"vue": "^2.5.17",
......
......@@ -14,7 +14,8 @@ import 'glsx-vue-components/dist/glsx-vue-components.css'
import './styles/index.css'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
import { utils } from 'glsx-common'
Vue.use(ElementUI)
//引用富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
//引入富文本css
......@@ -59,26 +60,40 @@ var mixin = {
}
}
const URL = 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const getConfig = (url = URL + '/oss_rightsAndInterests') => {
return new Promise(resolve => {
const xhr = new XMLHttpRequest()
xhr.onreadystatechange = () => {
if (xhr.readyState === 4 && xhr.status === 200) {
let config = JSON.parse(xhr.responseText)
window.localStorage.setItem('GLSX_OSS_EQUITY_CONFIG', xhr.responseText)
resolve({
'vue': Vue,
'config': config
})
}
}
xhr.open('GET', url)
xhr.send()
})
// const URL =
// 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
// const getConfig = (url = URL + '/oss_rightsAndInterests') => {
// return new Promise(resolve => {
// const xhr = new XMLHttpRequest()
// xhr.onreadystatechange = () => {
// if (xhr.readyState === 4 && xhr.status === 200) {
// let config = JSON.parse(xhr.responseText)
// window.localStorage.setItem('GLSX_OSS_EQUITY_CONFIG', xhr.responseText)
// resolve({ vue: Vue, config: config })
// }
// }
// xhr.open('GET', url)
// xhr.send()
// })
// }
const getConfig = () => {
let params = {
moduleName: 'glsx-oss-rightsAndInterests',
mockUrl:
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_rightsAndInterests',
httpOptions: {
Headers: { refererurl: location.href },
request: { timeout: 30000 }
}
}
/* eslint-disable no-new */
return new Promise((resolve, reject) => {
utils.getConfig(params).then(res => {
window.localStorage.setItem('GLSX_OSS_EQUITY_CONFIG', JSON.stringify(res))
resolve({ vue: Vue, config: res })
})
})
}
/* eslint-disable no-new */
const render = App => {
window.vm = new Vue({
el: '#app',
......@@ -90,4 +105,4 @@ getConfig()
export default {
render,
getConfig
}
\ No newline at end of file
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!