Commit 58384bb8 by 张杰

增加图片上传地址

1 parent e1a59d58
...@@ -12,6 +12,7 @@ const getters = { ...@@ -12,6 +12,7 @@ const getters = {
curBreadCrumb: state => state.menu.curBreadCrumb, curBreadCrumb: state => state.menu.curBreadCrumb,
updateMenu: state => state.menu.updateMenu, updateMenu: state => state.menu.updateMenu,
curMenuAuth: state => state.menu.curMenuAuth, curMenuAuth: state => state.menu.curMenuAuth,
fileUploadURL:state => state.app.fileUploadURL
} }
export default getters; export default getters;
\ No newline at end of file \ No newline at end of file
...@@ -61,6 +61,9 @@ export default { ...@@ -61,6 +61,9 @@ export default {
}, },
SET_FULLSCREEN(state, data) { SET_FULLSCREEN(state, data) {
state.fullscreen = data; state.fullscreen = data;
},
SET_UPLOADFILE_PATH(state,data){
state.fileUploadURL = data;
} }
}, },
actions: { actions: {
...@@ -93,5 +96,9 @@ export default { ...@@ -93,5 +96,9 @@ export default {
setFullscreen({ commit }, data) { setFullscreen({ commit }, data) {
commit('SET_FULLSCREEN', data) commit('SET_FULLSCREEN', data)
}, },
// 更新接口地址
updateFileUploadUrl({ commit }, data) {
commit('SET_UPLOADFILE_PATH', data)
},
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -104,9 +104,12 @@ const getBaseUrl = () => { ...@@ -104,9 +104,12 @@ const getBaseUrl = () => {
}).then((res) => { }).then((res) => {
const resData = res.data; const resData = res.data;
if(resData) { if(resData) {
console.log('resData:' + resData)
const resBaseURL = resData.axios.baseURL; const resBaseURL = resData.axios.baseURL;
localStorage.setItem('BASE_URL', resBaseURL); localStorage.setItem('BASE_URL', resBaseURL);
localStorage.setItem('FILE_UPLOAD_URL', resData.axios.fileUploadURL);
store.dispatch('app/updateBaseURL', resBaseURL); store.dispatch('app/updateBaseURL', resBaseURL);
store.dispatch('app/updateFileUploadUrl', resData.axios.fileUploadURL);
baseFlag = !resBaseURL; baseFlag = !resBaseURL;
resolve(resBaseURL); resolve(resBaseURL);
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!