diff --git a/config/index.js b/config/index.js index 64abbd0..5cb71e4 100644 --- a/config/index.js +++ b/config/index.js @@ -13,7 +13,7 @@ module.exports = { // 代理列表, 是否开启代理通过[./dev.env.js]配置 proxyTable: devEnv.OPEN_PROXY === false ? {} : { '/proxyApi': { - target: 'http://127.0.0.1:9090/xujie-fast/', + target: 'http://127.0.0.1:9090', changeOrigin: true, pathRewrite: { // 把 /proxyApi 替换成 / diff --git a/src/router/index.js b/src/router/index.js index 853cec5..9bb5af1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -67,7 +67,8 @@ router.beforeEach((to, from, next) => { url: http.adornUrl('/sys/menu/nav'), method: 'get', params: { - 'l': i18n.locale //i18n.locale + 'l': i18n.locale, //i18n.locale + menuType: "pc" } }).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/main-sidebar.vue b/src/views/main-sidebar.vue index bd33ba3..537f446 100644 --- a/src/views/main-sidebar.vue +++ b/src/views/main-sidebar.vue @@ -132,7 +132,9 @@ export default { languageCode:this.$i18n.locale } userFavoriteList(query).then(({data})=> { - this.favoriteList[0].list = data.list + if (data.list.length>0){ + this.favoriteList[0].list = data.list + } }) }, // 搜索菜单方式1 start diff --git a/src/views/modules/sys/menu-add-or-update.vue b/src/views/modules/sys/menu-add-or-update.vue index b414510..87396cc 100644 --- a/src/views/modules/sys/menu-add-or-update.vue +++ b/src/views/modules/sys/menu-add-or-update.vue @@ -39,6 +39,12 @@ + + + + + + @@ -102,7 +108,8 @@ perms: '', orderNum: 0, icon: '', - iconList: [] + iconList: [], + menuType: '' }, dataRule: { name: [ @@ -134,6 +141,7 @@ params: this.$http.adornParams() }).then(({data}) => { this.menuList = treeDataTranslate(data.menuList, 'menuId') + console.log( this.menuList) }).then(() => { this.visible = true this.$nextTick(() => { @@ -158,6 +166,7 @@ this.dataForm.perms = data.menu.perms this.dataForm.orderNum = data.menu.orderNum this.dataForm.icon = data.menu.icon + this.dataForm.menuType = data.menu.menuType this.menuListTreeSetCurrentNode() }) }