From 1a4612e6f1afc8201375974ebe2886cac195eb39 Mon Sep 17 00:00:00 2001 From: danshihao Date: Wed, 17 Apr 2024 18:33:24 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E7=A7=BB=E5=8A=A8=E7=AB=AF-?= =?UTF-8?q?=E6=88=91=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/lazy_vant.js | 6 +- src/components/menu/FirstLevelMenu.vue | 14 +-- src/store/modules/user.js | 10 +- src/views/mobile/mine/Mine.vue | 164 ++++++++++++++++++++++++- 4 files changed, 181 insertions(+), 13 deletions(-) diff --git a/src/components/lazy_vant.js b/src/components/lazy_vant.js index dc073e9..c17dcfa 100644 --- a/src/components/lazy_vant.js +++ b/src/components/lazy_vant.js @@ -6,10 +6,14 @@ import Vue from 'vue' import { Picker, Popup, - Dialog + Dialog, + Uploader } from 'vant' + import 'vant/lib/index.less' + Vue.use(Picker) Vue.use(Popup) +Vue.use(Uploader) Vue.prototype.$vantDialog = Dialog Vue.prototype.$vantConfirm = Dialog.confirm diff --git a/src/components/menu/FirstLevelMenu.vue b/src/components/menu/FirstLevelMenu.vue index f837340..f0494b3 100644 --- a/src/components/menu/FirstLevelMenu.vue +++ b/src/components/menu/FirstLevelMenu.vue @@ -74,13 +74,13 @@ export default { // 选择菜单 selectMenu (menu) { console.log(menu) - // if (menu.path !== '/systemOverview') { - // this.$warning({ - // title: '系统建设中', - // onOk: () => {} - // }) - // return - // } + if (menu.path !== '/systemOverview') { + this.$warning({ + title: '系统建设中', + onOk: () => {} + }) + return + } this.selectPath = menu.path if (menu.children && menu.children.length > 0) { this.$router.push({ path: menu.children[0].path }) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 36a6f44..ef06663 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -2,7 +2,7 @@ import Vue from 'vue' import { login, logout, phoneLogin, thirdLogin } from '@/api/login' import { ACCESS_TOKEN, USER_NAME, USER_INFO, USER_AUTH, SYS_BUTTON_AUTH, UI_CACHE_DB_DICT_DATA, TENANT_ID, CACHE_INCLUDED_ROUTES } from '@/store/mutation-types' import store from '@/store' -import { welcome } from '@/utils/util' +import { isMobile, welcome } from '@/utils/util' import { queryPermissionsByUser } from '@/api/api' import { getAction } from '@/api/manage' @@ -118,7 +118,13 @@ const user = { GetPermissionList ({ commit }) { return new Promise((resolve, reject) => { queryPermissionsByUser().then(response => { - const menuData = response.result.menu + let menuData = response.result.menu + // 移动端只显示移动端页面菜单,PC端不显示移动端页面菜单 + if (isMobile()) { + menuData = [menuData.find(item => item.path === '/mobile')] + } else { + menuData = menuData.filter(item => item.path !== '/mobile') + } const authData = response.result.auth const allAuthData = response.result.allAuth // Vue.ls.set(USER_AUTH,authData); diff --git a/src/views/mobile/mine/Mine.vue b/src/views/mobile/mine/Mine.vue index 4c9091b..58ba7ac 100644 --- a/src/views/mobile/mine/Mine.vue +++ b/src/views/mobile/mine/Mine.vue @@ -1,13 +1,171 @@ -