Commit bdacbf6f by 冒粤蓉

fix config

1 parent 032c3dfe
...@@ -28,13 +28,14 @@ function render({ data = {} , container } = {}) { ...@@ -28,13 +28,14 @@ function render({ data = {} , container } = {}) {
base: window.__POWERED_BY_QIANKUN__ ? '/system' : '/', base: window.__POWERED_BY_QIANKUN__ ? '/system' : '/',
routes, routes,
}); });
store.state.baseURL = data.baseURL;
instance = new Vue({ instance = new Vue({
router, router,
store, store,
data(){ data(){
return { return {
parentRouter: data.router, parentRouter: data.router,
parentVuex: data.store, parentVuex: data.store
} }
}, },
render: h => h(App), render: h => h(App),
......
...@@ -94,6 +94,7 @@ const getBaseUrl = () => { ...@@ -94,6 +94,7 @@ const getBaseUrl = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let BASE_URL = store.state.baseURL; let BASE_URL = store.state.baseURL;
if(!BASE_URL && baseFlag) { if(!BASE_URL && baseFlag) {
baseFlag = false;
instance({ instance({
url: MOCK_CONFIG_URL, url: MOCK_CONFIG_URL,
method: 'get' method: 'get'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!