|
|
@ -1,7 +1,7 @@ |
|
|
import { createRouter, createWebHashHistory } from 'vue-router'; |
|
|
|
|
|
import axios from "axios"; |
|
|
|
|
|
import { storeToRefs } from "pinia"; |
|
|
|
|
|
import { useAdminStore } from "@/store/index.js"; |
|
|
|
|
|
|
|
|
import {createRouter, createWebHashHistory} from 'vue-router'; |
|
|
|
|
|
import {storeToRefs} from "pinia"; |
|
|
|
|
|
import {useAdminStore, useMessageStore} from "@/store/index.js"; |
|
|
|
|
|
import API from '@/util/http.js'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 路由定义(包含权限映射 meta.permissionId)
|
|
|
// 路由定义(包含权限映射 meta.permissionId)
|
|
|
@ -16,7 +16,7 @@ const routes = [ |
|
|
component: () => import("../views/login.vue"), |
|
|
component: () => import("../views/login.vue"), |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
meta: { requireAuth: true }, |
|
|
|
|
|
|
|
|
meta: {requireAuth: true}, |
|
|
path: '/', |
|
|
path: '/', |
|
|
component: () => import("../views/home.vue"), |
|
|
component: () => import("../views/home.vue"), |
|
|
children: [ |
|
|
children: [ |
|
|
@ -25,48 +25,48 @@ const routes = [ |
|
|
path: 'workbench', |
|
|
path: 'workbench', |
|
|
name: "workbench", |
|
|
name: "workbench", |
|
|
component: () => import("../views/workspace/index.vue"), |
|
|
component: () => import("../views/workspace/index.vue"), |
|
|
meta: { permissionId: 2 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 2} |
|
|
}, |
|
|
}, |
|
|
//金币管理
|
|
|
//金币管理
|
|
|
{ |
|
|
{ |
|
|
path: '/goldManage', |
|
|
path: '/goldManage', |
|
|
name: 'goldManage', |
|
|
name: 'goldManage', |
|
|
meta: { permissionId: 3 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 3}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 审核
|
|
|
// 审核
|
|
|
{ |
|
|
{ |
|
|
path: '/audit', |
|
|
path: '/audit', |
|
|
name: "audit", |
|
|
name: "audit", |
|
|
component: () => import("../views/audit/gold/audit.vue"), |
|
|
component: () => import("../views/audit/gold/audit.vue"), |
|
|
meta: { permissionId: 4 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 4}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 充值审核
|
|
|
// 充值审核
|
|
|
{ |
|
|
{ |
|
|
path: 'rechargeAudit', |
|
|
path: 'rechargeAudit', |
|
|
name: "rechargeAudit", |
|
|
name: "rechargeAudit", |
|
|
component: () => import("../views/audit/gold/rechargeAudit.vue"), |
|
|
component: () => import("../views/audit/gold/rechargeAudit.vue"), |
|
|
meta: { permissionId: [6, 7, 8, 9, 10, 11, 12] } |
|
|
|
|
|
|
|
|
meta: {permissionId: [6, 7, 8, 9, 10, 11, 12]} |
|
|
}, |
|
|
}, |
|
|
// 退款审核
|
|
|
// 退款审核
|
|
|
{ |
|
|
{ |
|
|
path: 'refundAudit', |
|
|
path: 'refundAudit', |
|
|
name: "refundAudit", |
|
|
name: "refundAudit", |
|
|
component: () => import("../views/audit/gold/refundAudit.vue"), |
|
|
component: () => import("../views/audit/gold/refundAudit.vue"), |
|
|
meta: { permissionId: [13, 14, 15, 16, 17, 18, 19] } |
|
|
|
|
|
|
|
|
meta: {permissionId: [13, 14, 15, 16, 17, 18, 19]} |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
}, { |
|
|
}, { |
|
|
path: '/beanAudit', |
|
|
path: '/beanAudit', |
|
|
name: "beanAudit", |
|
|
name: "beanAudit", |
|
|
component: () => import("../views/audit/bean/beanAudit.vue"), |
|
|
component: () => import("../views/audit/bean/beanAudit.vue"), |
|
|
meta: { permissionId: 20 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 20}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 充值审核
|
|
|
// 充值审核
|
|
|
{ |
|
|
{ |
|
|
path: 'addbeanAudit', |
|
|
path: 'addbeanAudit', |
|
|
name: "addbeanAudit", |
|
|
name: "addbeanAudit", |
|
|
component: () => import("../views/audit/bean/beanAudit.vue"), |
|
|
component: () => import("../views/audit/bean/beanAudit.vue"), |
|
|
meta: { permissionId: [21, 22, 23, 24, 25, 26] } |
|
|
|
|
|
|
|
|
meta: {permissionId: [21, 22, 23, 24, 25, 26]} |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -77,21 +77,21 @@ const routes = [ |
|
|
path: '/coinConsume', |
|
|
path: '/coinConsume', |
|
|
name: "coinConsume", |
|
|
name: "coinConsume", |
|
|
component: () => import("../views/consume/gold/coinConsume.vue"), |
|
|
component: () => import("../views/consume/gold/coinConsume.vue"), |
|
|
meta: { permissionId: 39 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 39}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 金币新增消耗
|
|
|
// 金币新增消耗
|
|
|
{ |
|
|
{ |
|
|
path: 'add', |
|
|
path: 'add', |
|
|
name: "addCoinConsume", |
|
|
name: "addCoinConsume", |
|
|
component: () => import("../views/consume/gold/addCoinConsume.vue"), |
|
|
component: () => import("../views/consume/gold/addCoinConsume.vue"), |
|
|
meta: { permissionId: 41 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 41} |
|
|
}, |
|
|
}, |
|
|
// 金币消耗明细详情
|
|
|
// 金币消耗明细详情
|
|
|
{ |
|
|
{ |
|
|
path: 'detail', |
|
|
path: 'detail', |
|
|
name: "coinConsumeDetail", |
|
|
name: "coinConsumeDetail", |
|
|
component: () => import("../views/consume/gold/coinConsumeDetail.vue"), |
|
|
component: () => import("../views/consume/gold/coinConsumeDetail.vue"), |
|
|
meta: { permissionId: 40 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 40} |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -100,35 +100,35 @@ const routes = [ |
|
|
path: '/beanConsume', |
|
|
path: '/beanConsume', |
|
|
name: "beanConsume", |
|
|
name: "beanConsume", |
|
|
component: () => import("../views/consume/bean/beanConsume.vue"), |
|
|
component: () => import("../views/consume/bean/beanConsume.vue"), |
|
|
meta: { permissionId: 42 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 42}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 金豆新增消耗
|
|
|
// 金豆新增消耗
|
|
|
{ |
|
|
{ |
|
|
path: 'add', |
|
|
path: 'add', |
|
|
name: "addBeanConsume", |
|
|
name: "addBeanConsume", |
|
|
component: () => import("../views/consume/bean/addBeanConsume.vue"), |
|
|
component: () => import("../views/consume/bean/addBeanConsume.vue"), |
|
|
meta: { permissionId: 46 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 46} |
|
|
}, |
|
|
}, |
|
|
// 直播
|
|
|
// 直播
|
|
|
{ |
|
|
{ |
|
|
path: 'live', |
|
|
path: 'live', |
|
|
name: "liveStream", |
|
|
name: "liveStream", |
|
|
component: () => import("../views/consume/bean/liveStream.vue"), |
|
|
component: () => import("../views/consume/bean/liveStream.vue"), |
|
|
meta: { permissionId: 43 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 43} |
|
|
}, |
|
|
}, |
|
|
// 铁粉
|
|
|
// 铁粉
|
|
|
{ |
|
|
{ |
|
|
path: 'fan', |
|
|
path: 'fan', |
|
|
name: "dieHardFan", |
|
|
name: "dieHardFan", |
|
|
component: () => import("../views/consume/bean/dieHardFan.vue"), |
|
|
component: () => import("../views/consume/bean/dieHardFan.vue"), |
|
|
meta: { permissionId: 44 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 44} |
|
|
}, |
|
|
}, |
|
|
// 文章视频
|
|
|
// 文章视频
|
|
|
{ |
|
|
{ |
|
|
path: 'article', |
|
|
path: 'article', |
|
|
name: "articleVideo", |
|
|
name: "articleVideo", |
|
|
component: () => import("../views/consume/bean/articleVideo.vue"), |
|
|
component: () => import("../views/consume/bean/articleVideo.vue"), |
|
|
meta: { permissionId: 45 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 45} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
] |
|
|
] |
|
|
@ -139,7 +139,7 @@ const routes = [ |
|
|
path: '/rate', |
|
|
path: '/rate', |
|
|
name: "rate", |
|
|
name: "rate", |
|
|
component: () => import("../views/managerecharge/rate.vue"), |
|
|
component: () => import("../views/managerecharge/rate.vue"), |
|
|
meta: { permissionId: [27, 28, 29] } |
|
|
|
|
|
|
|
|
meta: {permissionId: [27, 28, 29]} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 金币充值
|
|
|
// 金币充值
|
|
|
@ -147,21 +147,21 @@ const routes = [ |
|
|
path: '/coinRecharge', |
|
|
path: '/coinRecharge', |
|
|
name: "coinRecharge", |
|
|
name: "coinRecharge", |
|
|
component: () => import("../views/recharge/gold/coinRecharge.vue"), |
|
|
component: () => import("../views/recharge/gold/coinRecharge.vue"), |
|
|
meta: { permissionId: 31 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 31}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 金币新增充值
|
|
|
// 金币新增充值
|
|
|
{ |
|
|
{ |
|
|
path: 'add', |
|
|
path: 'add', |
|
|
name: "addCoinRecharge", |
|
|
name: "addCoinRecharge", |
|
|
component: () => import("../views/recharge/gold/addCoinRecharge.vue"), |
|
|
component: () => import("../views/recharge/gold/addCoinRecharge.vue"), |
|
|
meta: { permissionId: 33 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 33} |
|
|
}, |
|
|
}, |
|
|
// 金币充值明细
|
|
|
// 金币充值明细
|
|
|
{ |
|
|
{ |
|
|
path: 'detail', |
|
|
path: 'detail', |
|
|
name: "coinRechargeDetail", |
|
|
name: "coinRechargeDetail", |
|
|
component: () => import("../views/recharge/gold/coinRechargeDetail.vue"), |
|
|
component: () => import("../views/recharge/gold/coinRechargeDetail.vue"), |
|
|
meta: { permissionId: 32 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 32} |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -171,28 +171,28 @@ const routes = [ |
|
|
path: '/beanRecharge', |
|
|
path: '/beanRecharge', |
|
|
name: "beanRecharge", |
|
|
name: "beanRecharge", |
|
|
component: () => import("../views/recharge/bean/beanRecharge.vue"), |
|
|
component: () => import("../views/recharge/bean/beanRecharge.vue"), |
|
|
meta: { permissionId: 34 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 34}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 金豆新增充值
|
|
|
// 金豆新增充值
|
|
|
{ |
|
|
{ |
|
|
path: 'add', |
|
|
path: 'add', |
|
|
name: "addBeanRecharge", |
|
|
name: "addBeanRecharge", |
|
|
component: () => import("../views/recharge/bean/addBeanRecharge.vue"), |
|
|
component: () => import("../views/recharge/bean/addBeanRecharge.vue"), |
|
|
meta: { permissionId: 37 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 37} |
|
|
}, |
|
|
}, |
|
|
// 金豆系统充值
|
|
|
// 金豆系统充值
|
|
|
{ |
|
|
{ |
|
|
path: 'system', |
|
|
path: 'system', |
|
|
name: "beanSystemRecharge", |
|
|
name: "beanSystemRecharge", |
|
|
component: () => import("../views/recharge/bean/beanSystemRecharge.vue"), |
|
|
component: () => import("../views/recharge/bean/beanSystemRecharge.vue"), |
|
|
meta: { permissionId: 35 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 35} |
|
|
}, |
|
|
}, |
|
|
// 金豆线上充值
|
|
|
// 金豆线上充值
|
|
|
{ |
|
|
{ |
|
|
path: 'online', |
|
|
path: 'online', |
|
|
name: "beanOnlineRecharge", |
|
|
name: "beanOnlineRecharge", |
|
|
component: () => import("../views/recharge/bean/beanOnlineRecharge.vue"), |
|
|
component: () => import("../views/recharge/bean/beanOnlineRecharge.vue"), |
|
|
meta: { permissionId: 36 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 36} |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -202,21 +202,21 @@ const routes = [ |
|
|
path: '/coinRefund', |
|
|
path: '/coinRefund', |
|
|
name: "coinRefund", |
|
|
name: "coinRefund", |
|
|
component: () => import("../views/refund/gold/coinRefund.vue"), |
|
|
component: () => import("../views/refund/gold/coinRefund.vue"), |
|
|
meta: { permissionId: 47 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 47}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 金币新增退款
|
|
|
// 金币新增退款
|
|
|
{ |
|
|
{ |
|
|
path: 'add', |
|
|
path: 'add', |
|
|
name: "addCoinRefund", |
|
|
name: "addCoinRefund", |
|
|
component: () => import("../views/refund/gold/addCoinRefund.vue"), |
|
|
component: () => import("../views/refund/gold/addCoinRefund.vue"), |
|
|
meta: { permissionId: 48 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 48} |
|
|
}, |
|
|
}, |
|
|
// 金币退款明细详情
|
|
|
// 金币退款明细详情
|
|
|
{ |
|
|
{ |
|
|
path: 'detail', |
|
|
path: 'detail', |
|
|
name: "coinRefundDetail", |
|
|
name: "coinRefundDetail", |
|
|
component: () => import("../views/refund/gold/coinRefundDetail.vue"), |
|
|
component: () => import("../views/refund/gold/coinRefundDetail.vue"), |
|
|
meta: { permissionId: 49 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 49} |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -226,21 +226,21 @@ const routes = [ |
|
|
path: '/usergold', |
|
|
path: '/usergold', |
|
|
name: "usergold", |
|
|
name: "usergold", |
|
|
component: () => import("../views/usergold/gold/clientCount.vue"), |
|
|
component: () => import("../views/usergold/gold/clientCount.vue"), |
|
|
meta: { permissionId: 51 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 51}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 金币明细
|
|
|
// 金币明细
|
|
|
{ |
|
|
{ |
|
|
path: 'detail', |
|
|
path: 'detail', |
|
|
name: "clientCountDetail", |
|
|
name: "clientCountDetail", |
|
|
component: () => import("../views/usergold/gold/clientCountDetail.vue"), |
|
|
component: () => import("../views/usergold/gold/clientCountDetail.vue"), |
|
|
meta: { permissionId: 52 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 52} |
|
|
}, |
|
|
}, |
|
|
// 金币余额
|
|
|
// 金币余额
|
|
|
{ |
|
|
{ |
|
|
path: 'balance', |
|
|
path: 'balance', |
|
|
name: "clientCountBalance", |
|
|
name: "clientCountBalance", |
|
|
component: () => import("../views/usergold/gold/clientCountBalance.vue"), |
|
|
component: () => import("../views/usergold/gold/clientCountBalance.vue"), |
|
|
meta: { permissionId: 53 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 53} |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -248,25 +248,25 @@ const routes = [ |
|
|
path: '/userbean', |
|
|
path: '/userbean', |
|
|
name: "userbean", |
|
|
name: "userbean", |
|
|
component: () => import("../views/usergold/bean/userbean.vue"), |
|
|
component: () => import("../views/usergold/bean/userbean.vue"), |
|
|
meta: { permissionId: 54 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 54} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: '/history', |
|
|
path: '/history', |
|
|
name: "history", |
|
|
name: "history", |
|
|
component: () => import("../views/history/history.vue"), |
|
|
component: () => import("../views/history/history.vue"), |
|
|
meta: { permissionId: 55 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 55}, |
|
|
children: [ |
|
|
children: [ |
|
|
{ |
|
|
{ |
|
|
path: 'newHistory', |
|
|
path: 'newHistory', |
|
|
name: "newHistory", |
|
|
name: "newHistory", |
|
|
component: () => import("../views/history/newHistory.vue"), |
|
|
component: () => import("../views/history/newHistory.vue"), |
|
|
meta: { permissionId: 56 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 56} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
path: 'oldHistory', |
|
|
path: 'oldHistory', |
|
|
name: "oldHistory", |
|
|
name: "oldHistory", |
|
|
component: () => import("../views/history/oldHistory.vue"), |
|
|
component: () => import("../views/history/oldHistory.vue"), |
|
|
meta: { permissionId: 57 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 57} |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -276,21 +276,21 @@ const routes = [ |
|
|
path: '/permissions', |
|
|
path: '/permissions', |
|
|
name: "permissions", |
|
|
name: "permissions", |
|
|
component: () => import("../views/permissions/permissions.vue"), |
|
|
component: () => import("../views/permissions/permissions.vue"), |
|
|
meta: { permissionId: 128 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 128}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 用户权限
|
|
|
// 用户权限
|
|
|
{ |
|
|
{ |
|
|
path: 'userPermission', |
|
|
path: 'userPermission', |
|
|
name: "userPermission", |
|
|
name: "userPermission", |
|
|
component: () => import("../views/permissions/userPermission.vue"), |
|
|
component: () => import("../views/permissions/userPermission.vue"), |
|
|
meta: { permissionId: 129 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 129} |
|
|
}, |
|
|
}, |
|
|
// 角色权限
|
|
|
// 角色权限
|
|
|
{ |
|
|
{ |
|
|
path: 'rolePermission', |
|
|
path: 'rolePermission', |
|
|
name: "rolePermission", |
|
|
name: "rolePermission", |
|
|
component: () => import("../views/permissions/rolePermission.vue"), |
|
|
component: () => import("../views/permissions/rolePermission.vue"), |
|
|
meta: { permissionId: 130 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 130} |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
@ -300,40 +300,40 @@ const routes = [ |
|
|
{ |
|
|
{ |
|
|
path: '/moneyManage', |
|
|
path: '/moneyManage', |
|
|
name: 'moneyManage', |
|
|
name: 'moneyManage', |
|
|
meta: { permissionId: 58 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 58}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 收款明细
|
|
|
// 收款明细
|
|
|
{ |
|
|
{ |
|
|
path: 'receiveDetail', |
|
|
path: 'receiveDetail', |
|
|
name: "receiveDetail", |
|
|
name: "receiveDetail", |
|
|
meta: { permissionId: 74 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 74}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 客服页面
|
|
|
// 客服页面
|
|
|
{ |
|
|
{ |
|
|
path: 'receiveService', |
|
|
path: 'receiveService', |
|
|
name: "receiveService", |
|
|
name: "receiveService", |
|
|
component: () => import("../views/moneyManage/receiveDetail/receiveService.vue"), |
|
|
component: () => import("../views/moneyManage/receiveDetail/receiveService.vue"), |
|
|
meta: { permissionId: 60 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 60} |
|
|
}, |
|
|
}, |
|
|
// 地区负责人页面
|
|
|
// 地区负责人页面
|
|
|
{ |
|
|
{ |
|
|
path: 'receiveManager', |
|
|
path: 'receiveManager', |
|
|
name: "receiveManager", |
|
|
name: "receiveManager", |
|
|
component: () => import("../views/moneyManage/receiveDetail/receiveManage.vue"), |
|
|
component: () => import("../views/moneyManage/receiveDetail/receiveManage.vue"), |
|
|
meta: { permissionId: [67, 79] } |
|
|
|
|
|
|
|
|
meta: {permissionId: [67, 79]} |
|
|
}, |
|
|
}, |
|
|
{//地区财务
|
|
|
{//地区财务
|
|
|
path: 'receiveFinance', |
|
|
path: 'receiveFinance', |
|
|
name: "receiveFinance", |
|
|
name: "receiveFinance", |
|
|
component: () => import("../views/moneyManage/receiveDetail/receiveFinance.vue"), |
|
|
component: () => import("../views/moneyManage/receiveDetail/receiveFinance.vue"), |
|
|
meta: { permissionId: [67, 79] } |
|
|
|
|
|
|
|
|
meta: {permissionId: [67, 79]} |
|
|
}, |
|
|
}, |
|
|
//总部管理员及财务
|
|
|
//总部管理员及财务
|
|
|
{ |
|
|
{ |
|
|
path: 'receiveHeader', |
|
|
path: 'receiveHeader', |
|
|
name: "receiveHeader", |
|
|
name: "receiveHeader", |
|
|
component: () => import("../views/moneyManage/receiveDetail/receiveHead.vue"), |
|
|
component: () => import("../views/moneyManage/receiveDetail/receiveHead.vue"), |
|
|
meta: { permissionId: 91 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 91} |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -342,35 +342,35 @@ const routes = [ |
|
|
path: 'refundDetail', |
|
|
path: 'refundDetail', |
|
|
name: "refundDetail", |
|
|
name: "refundDetail", |
|
|
component: () => import("../views/moneyManage/refundDetail/refundDetail.vue"), |
|
|
component: () => import("../views/moneyManage/refundDetail/refundDetail.vue"), |
|
|
meta: { permissionId: 98 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 98}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 客服页面
|
|
|
// 客服页面
|
|
|
{ |
|
|
{ |
|
|
path: 'refundService', |
|
|
path: 'refundService', |
|
|
name: "refundService", |
|
|
name: "refundService", |
|
|
component: () => import("../views/moneyManage/refundDetail/refundService.vue"), |
|
|
component: () => import("../views/moneyManage/refundDetail/refundService.vue"), |
|
|
meta: { permissionId: 99 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 99} |
|
|
}, |
|
|
}, |
|
|
// 地区财务页面
|
|
|
// 地区财务页面
|
|
|
{ |
|
|
{ |
|
|
path: 'refundFinance', |
|
|
path: 'refundFinance', |
|
|
name: "refundFinance", |
|
|
name: "refundFinance", |
|
|
component: () => import("../views/moneyManage/refundDetail/refundFinance.vue"), |
|
|
component: () => import("../views/moneyManage/refundDetail/refundFinance.vue"), |
|
|
meta: { permissionId: 103 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 103} |
|
|
}, |
|
|
}, |
|
|
// 地区负责人页面
|
|
|
// 地区负责人页面
|
|
|
{ |
|
|
{ |
|
|
path: 'refundCharge', |
|
|
path: 'refundCharge', |
|
|
name: "refundCharge", |
|
|
name: "refundCharge", |
|
|
component: () => import("../views/moneyManage/refundDetail/refundCharge.vue"), |
|
|
component: () => import("../views/moneyManage/refundDetail/refundCharge.vue"), |
|
|
meta: { permissionId: 107 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 107} |
|
|
}, |
|
|
}, |
|
|
//总部管理员及财务
|
|
|
//总部管理员及财务
|
|
|
{ |
|
|
{ |
|
|
path: 'refundHeader', |
|
|
path: 'refundHeader', |
|
|
name: "refundHeader", |
|
|
name: "refundHeader", |
|
|
component: () => import("../views/moneyManage/refundDetail/refundHeader.vue"), |
|
|
component: () => import("../views/moneyManage/refundDetail/refundHeader.vue"), |
|
|
meta: { permissionId: 111 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 111} |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -379,7 +379,7 @@ const routes = [ |
|
|
path: 'executor', |
|
|
path: 'executor', |
|
|
name: "executor", |
|
|
name: "executor", |
|
|
component: () => import("../views/moneyManage/executor/executor.vue"), |
|
|
component: () => import("../views/moneyManage/executor/executor.vue"), |
|
|
meta: { permissionId: 115 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 115} |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
@ -387,29 +387,29 @@ const routes = [ |
|
|
{ |
|
|
{ |
|
|
path: 'channelManage', |
|
|
path: 'channelManage', |
|
|
name: 'channelManage', |
|
|
name: 'channelManage', |
|
|
meta: { permissionId: 124 }, |
|
|
|
|
|
|
|
|
meta: {permissionId: 124}, |
|
|
children: [ |
|
|
children: [ |
|
|
// 打赏
|
|
|
// 打赏
|
|
|
{ |
|
|
{ |
|
|
path: 'reward', |
|
|
path: 'reward', |
|
|
name: "reward", |
|
|
name: "reward", |
|
|
component: () => import("../views/channelManage/reward/reward.vue"), |
|
|
component: () => import("../views/channelManage/reward/reward.vue"), |
|
|
meta: { permissionId: 125 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 125} |
|
|
}, |
|
|
}, |
|
|
// 铁粉
|
|
|
// 铁粉
|
|
|
{ |
|
|
{ |
|
|
path: 'fans', |
|
|
path: 'fans', |
|
|
name: "fans", |
|
|
name: "fans", |
|
|
component: () => import("../views/channelManage/fans/fans.vue"), |
|
|
component: () => import("../views/channelManage/fans/fans.vue"), |
|
|
meta: { permissionId: 126 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 126} |
|
|
}, |
|
|
}, |
|
|
// 购物车
|
|
|
// 购物车
|
|
|
{ |
|
|
{ |
|
|
path: 'cart', |
|
|
path: 'cart', |
|
|
name: "cart", |
|
|
name: "cart", |
|
|
component: () => import("../views/noPermissionPage.vue"), |
|
|
component: () => import("../views/noPermissionPage.vue"), |
|
|
meta: { permissionId: 127 } |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
meta: {permissionId: 127} |
|
|
|
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
// 活动管理
|
|
|
// 活动管理
|
|
|
@ -417,7 +417,7 @@ const routes = [ |
|
|
path: 'activityManage', |
|
|
path: 'activityManage', |
|
|
name: "activityManage", |
|
|
name: "activityManage", |
|
|
component: () => import("../views/activityManage/activity.vue"), |
|
|
component: () => import("../views/activityManage/activity.vue"), |
|
|
meta: { permissionId: 119 } |
|
|
|
|
|
|
|
|
meta: {permissionId: 119} |
|
|
}, |
|
|
}, |
|
|
// 没有权限
|
|
|
// 没有权限
|
|
|
{ |
|
|
{ |
|
|
@ -457,12 +457,11 @@ const getAllPermissionIds = (menuTree) => { |
|
|
return permissionIds; |
|
|
return permissionIds; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 全局路由守卫
|
|
|
// 全局路由守卫
|
|
|
router.beforeEach(async (to, from, next) => { |
|
|
router.beforeEach(async (to, from, next) => { |
|
|
|
|
|
|
|
|
const adminStore = useAdminStore() |
|
|
const adminStore = useAdminStore() |
|
|
const { adminData, menuTree } = storeToRefs(adminStore) |
|
|
|
|
|
|
|
|
const {adminData, menuTree} = storeToRefs(adminStore) |
|
|
|
|
|
|
|
|
const token = localStorage.getItem("token"); |
|
|
const token = localStorage.getItem("token"); |
|
|
const machineId = localStorage.getItem("machineId"); |
|
|
const machineId = localStorage.getItem("machineId"); |
|
|
@ -520,4 +519,24 @@ router.beforeEach(async (to, from, next) => { |
|
|
next(); |
|
|
next(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 全局后置守卫:每次路由切换后执行
|
|
|
|
|
|
router.afterEach(async () => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 执行/getMessage请求
|
|
|
|
|
|
const newMessageRes = await API({ |
|
|
|
|
|
url: '/getMessage', |
|
|
|
|
|
method: 'POST', |
|
|
|
|
|
data: {} |
|
|
|
|
|
}); |
|
|
|
|
|
console.log('newMessageRes=======================:', newMessageRes.data) |
|
|
|
|
|
// 存入全局状态,供所有页面访问
|
|
|
|
|
|
const messageStore = useMessageStore(); |
|
|
|
|
|
// 过滤 flag=1的消息
|
|
|
|
|
|
newMessageRes.data = newMessageRes.data.filter(item => item.flag !== 1); |
|
|
|
|
|
|
|
|
|
|
|
messageStore.setMessages(newMessageRes.data); |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.error('获取消息失败:', error); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
export default router; |
|
|
export default router; |