Commit e657e1e8 by 冒粤蓉

fix menu and config

1 parent 452f62f3
......@@ -27,7 +27,11 @@ instance.interceptors.request.use(config => {
/** 添加响应拦截器 **/
instance.interceptors.response.use(response => {
showLoading(false);
const serverCode = response.data.code;
const serverCode = response.data.code,
token = response.headers['authorization'];
if(token || token === '') {
localStorage.setItem('token', token);
}
if (serverCode === 200 || response.status === 200) {
if(serverCode !== 200) {
checkStatus(serverCode);
......@@ -98,7 +102,7 @@ const getBaseUrl = () => {
if(resData) {
const resBaseURL = resData.axios.baseURL;
store.commit('updateBaseURL', resBaseURL);
baseFlag = !!resBaseURL;
baseFlag = !resBaseURL;
resolve(resBaseURL);
} else {
baseFlag = true;
......
......@@ -292,6 +292,7 @@ export default {
message: '操作成功!'
})
this.handleClose()
this.$root.parentVuex.dispatch('menu/updateMenu', params)
if (params.parentId) {
getMenuChildren({ parentId: params.parentId }).then(res => {
this.$set(this.$refs.menuTable.store.states.lazyTreeNodeMap, this.menuForm.ppId, res.data)
......@@ -397,6 +398,7 @@ export default {
type: 'success',
message: '删除成功!'
})
this.$root.parentVuex.dispatch('menu/updateMenu', row.id);
if (row.parentId == 0) {
this.getList()
} else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!