diff --git a/src/main.js b/src/main.js index 3a1a9799262ef8306d0ab3da28258782b8a7ceda..1c36db15c55828a6909e1782f1c3b4acb21332cb 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,8 @@ import { createApp } from "vue"; import ElementPlus from "element-plus"; import "element-plus/dist/index.css"; +import { ElMessage } from "element-plus"; + import mavonEditor from "mavon-editor"; import "mavon-editor/dist/css/index.css"; import locale from "element-plus/lib/locale/lang/zh-cn"; @@ -89,6 +91,11 @@ Promise.all([getUser(), getMenu("1e99371c-187f-4966-94cf-32f116f42ce6")]) if (res[0].data.code == 200 && res[1].data.code == 200) { //已登录则记录菜单和用户信息 let data = (res[1].data.data && res[1].data.data[0].children) || []; + + if (data.length == 0) { + ElMessage.error("该用户暂未配置菜单项"); + } + store.commit("setUserInfo", res[0].data.data); // if (res[0].data.data.userType == 1) {//超管 diff --git a/src/page/main/ticket/business-ticket-list/index.vue b/src/page/main/ticket/business-ticket-list/index.vue index bf6f1ac3235c725a36a51df907c4a436eeb7f39c..aa125172c627fef82f0cafd5386dd337d637eb0f 100644 --- a/src/page/main/ticket/business-ticket-list/index.vue +++ b/src/page/main/ticket/business-ticket-list/index.vue @@ -97,7 +97,7 @@ - +