Browse Source

请求前缀;区分pc/pda

master
[li_she] 5 years ago
parent
commit
d9958cd2bd
  1. 2
      config/index.js
  2. 3
      src/router/index.js
  3. 4
      src/views/main-sidebar.vue
  4. 11
      src/views/modules/sys/menu-add-or-update.vue

2
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 替换成 /

3
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) {

4
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

11
src/views/modules/sys/menu-add-or-update.vue

@ -39,6 +39,12 @@
<el-form-item v-if="dataForm.type !== 2" label="排序号" prop="orderNum">
<el-input-number v-model="dataForm.orderNum" controls-position="right" :min="0" label="排序号"></el-input-number>
</el-form-item>
<el-form-item label="菜单类型" prop="menuType">
<el-select v-model="dataForm.menuType">
<el-option label="pc" value="pc"></el-option>
<el-option label="pda" value="pda"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="dataForm.type !== 2" label="菜单图标" prop="icon">
<el-row>
<el-col :span="22">
@ -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()
})
}

Loading…
Cancel
Save