Browse Source

Merge branch 'milestone-20250711-金币前端二期' into zhangrenyuan/feature-20250714163943-金币前端二期

zhangrenyuan/feature-20250714163943-金币前端二期
zry 3 weeks ago
parent
commit
c1ea5357bc
  1. 55
      src/router/index.js
  2. 2
      src/util/request.js

55
src/router/index.js

@ -6,6 +6,7 @@ import {ref} from "vue";
// 路由定义(包含权限映射 meta.permissionId)
const routes = [
// {
// path: '/workspace',
// name: "workspace",
// component: () => import("../views/workspace/audit.vue"),
@ -20,12 +21,12 @@ const routes = [
name: "login",
component: () => import("../views/login.vue"),
},
{
meta: { requireAuth: true },
{
meta: { requireAuth: true },
path: '/',
component: () => import("../views/home.vue"),
children: [
// 工作台
children: [
// 工作台
{
path: '/workspace',
name: "workspace",
@ -42,14 +43,14 @@ const routes = [
meta: { permissionId: 40 },
// redirect: '/index',
children: [
// 充值审核
// 充值审核========================================
{
path: 'rechargeAudit',
name: "rechargeAudit",
component: () => import("../views/audit/rechargeAudit.vue"),
meta: { permissionId: [11, 12] } // 对应"查看充值审核"id=11、"充值审批"id=12
},
// 退款审核
// 退款审核
{
path: 'refundAudit',
name: "refundAudit",
@ -61,22 +62,22 @@ const routes = [
// 金币消耗
// 金币消耗
{
path: '/coinConsume',
name: "coinConsume",
component: () => import("../views/consume/coinConsume.vue"),
// redirect: '/coinConsume/add',
meta: { permissionId: 6 },
children: [
// 金币新增消耗
children: [
// 金币新增消耗
{
path: 'add',
name: "addCoinConsume",
component: () => import("../views/consume/addCoinConsume.vue"),
meta: { permissionId: 19 } // 对应"提交金币消耗"id=19
},
// 金币消耗明细详情
// 金币消耗明细详情
{
path: 'detail',
name: "coinConsumeDetail",
@ -86,28 +87,28 @@ const routes = [
]
},
// 汇率管理
// 汇率管理
{
path: '/rate',
name: "rate",
component: () => import("../views/managerecharge/rate.vue"),
meta: { permissionId: [15, 16] } // 对应"汇率查看"id=15、"汇率修改"id=16
},
// 金币充值
// 金币充值
{
path: '/coinRecharge',
name: "coinRecharge",
component: () => import("../views/recharge/coinRecharge.vue"),
// redirect: '/coinRecharge/add',
children: [
// 金币新增充值
children: [
// 金币新增充值
{
path: 'add',
name: "addCoinRecharge",
component: () => import("../views/recharge/addCoinRecharge.vue"),
meta: { permissionId: 17 } // 对应"提交金币充值"id=17
},
// 金币充值明细详情
// 金币充值明细详情
{
path: 'detail',
name: "coinRechargeDetail",
@ -117,14 +118,14 @@ const routes = [
]
},
// 金币退款
// 金币退款
{
path: '/coinRefund',
name: "coinRefund",
component: () => import("../views/refund/coinRefund.vue"),
// redirect: '/coinRefund/add',
meta: { permissionId: 7 },
children: [
children: [
// 金币新增退款
{
path: 'add',
@ -142,45 +143,45 @@ const routes = [
]
},
// 客户账户明细
// 客户账户明细
{
path: '/usergold',
name: "usergold",
component: () => import("../views/usergold/clientCount.vue"),
// redirect: '/usergold/detail',
meta: { permissionId: 8 },
children: [
// 金币明细
children: [
// 金币明细
{
path: 'detail',
name: "clientCountDetail",
component: () => import("../views/usergold/clientCountDetail.vue"),
meta: { permissionId: 23 } // 对应"查看金币明细"id=23
},
// 金币余额
// 金币余额
{
path: 'balance',
name: "clientCountBalance",
component: () => import("../views/usergold/clientCountBalance.vue"),
meta: { permissionId: 24 } // 对应"查看金币余额"id=24
},
]
},
// 权限管理
]
},
// 权限管理
{
path: '/permissions',
name: "permissions",
component: () => import("../views/permissions/permission.vue"),
meta: { permissionId: [25, 26, 27, 28, 29] } // 对应权限管理下的所有操作
},
// 没有权限
// 没有权限
{
path: '/noPermission',
name: "noPermission",
component: () => import("../views/noPermissionPage.vue")
}
]
},
]
},
// 跳转页面(无需权限)
{
path: '/PasswordSuccess',

2
src/util/request.js

@ -7,7 +7,7 @@ const service = axios.create({
'Content-Type': 'application/json'
},
// 设置请求头,指定请求体的格式为 JSON
// 设置默认请求方法为 POST 这行对应的代码搁哪呢? util/http.js自己看
// 设置默认请求方法为 POST 这行对应的代码搁哪呢? util/http.js
})
// 添加上传方法

Loading…
Cancel
Save