Commit 68cc569a by 胡悦

Merge branch 'master' of 192.168.3.233:micro-system/system

2 parents 29731390 e657e1e8
......@@ -36,7 +36,6 @@ export default {
methods: {
...mapMutations(['updateBaseURL']),
goToPage(path) {
console.log(this.$root.parentRouter);
this.$root.parentRouter.push(path);
}
},
......
......@@ -3,8 +3,6 @@ import Vue from 'vue';
import { Message } from 'element-ui';
import { debounce } from 'utils/tools';
Vue.use(Message);
const error = debounce((msg, getToken) => {
if(window.__POWERED_BY_QIANKUN__) {
let stateRes = {
......
......@@ -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)
......@@ -400,6 +401,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!