sc
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
import config from './config'
|
import config from './config'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import { useConfigStore } from '@/store'
|
import { useConfigStore } from '@/store'
|
||||||
|
import { useUserStore } from '@/store'
|
||||||
import { getCurrentInstance } from "vue"
|
import { getCurrentInstance } from "vue"
|
||||||
import { onLaunch } from '@dcloudio/uni-app'
|
import { onLaunch } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
@@ -28,6 +29,9 @@
|
|||||||
function checkLogin() {
|
function checkLogin() {
|
||||||
if (!getToken()) {
|
if (!getToken()) {
|
||||||
proxy.$tab.reLaunch('/pages/login')
|
proxy.$tab.reLaunch('/pages/login')
|
||||||
|
} else {
|
||||||
|
// 重新获取用户权限
|
||||||
|
useUserStore().getInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -37,19 +37,7 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-row">
|
|
||||||
<view class="form-label">角色</view>
|
|
||||||
<view class="form-control">
|
|
||||||
<picker
|
|
||||||
:range="roleOptions"
|
|
||||||
:value="roleIndex"
|
|
||||||
@change="onRoleChange"
|
|
||||||
class="picker"
|
|
||||||
>
|
|
||||||
<view class="picker-text">{{ roleOptions[roleIndex] }}</view>
|
|
||||||
</picker>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<view class="form-label">状态</view>
|
<view class="form-label">状态</view>
|
||||||
<view class="form-control">
|
<view class="form-control">
|
||||||
@@ -87,15 +75,10 @@
|
|||||||
const distributorForm = ref({
|
const distributorForm = ref({
|
||||||
name: '',
|
name: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
role: '初级分销员',
|
|
||||||
status: '启用',
|
status: '启用',
|
||||||
remark: ''
|
remark: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
// 角色选项
|
|
||||||
const roleOptions = ['初级分销员', '中级分销员', '高级分销员']
|
|
||||||
const roleIndex = ref(0)
|
|
||||||
|
|
||||||
// 状态选项
|
// 状态选项
|
||||||
const statusOptions = ['启用', '禁用']
|
const statusOptions = ['启用', '禁用']
|
||||||
const statusIndex = ref(0)
|
const statusIndex = ref(0)
|
||||||
@@ -145,12 +128,7 @@
|
|||||||
}, 1500)
|
}, 1500)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 角色变更
|
|
||||||
function onRoleChange(e) {
|
|
||||||
const value = e.detail.value
|
|
||||||
roleIndex.value = value
|
|
||||||
distributorForm.value.role = roleOptions[value]
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态变更
|
// 状态变更
|
||||||
function onStatusChange(e) {
|
function onStatusChange(e) {
|
||||||
@@ -226,7 +204,7 @@
|
|||||||
.form-section {
|
.form-section {
|
||||||
padding: 32rpx;
|
padding: 32rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 0 16rpx 16rpx;
|
margin: 16rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
@@ -269,22 +247,47 @@
|
|||||||
|
|
||||||
.form-input {
|
.form-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 70rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1rpx solid #dcdfe6;
|
border: 1rpx solid #dcdfe6;
|
||||||
border-radius: 8rpx;
|
border-radius: 12rpx;
|
||||||
padding: 16rpx;
|
padding: 20rpx 24rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-input:focus {
|
||||||
|
border-color: #409eff;
|
||||||
|
box-shadow: 0 0 0 4rpx rgba(64, 158, 255, 0.1);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-input::placeholder {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picker {
|
.picker {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1rpx solid #dcdfe6;
|
border: 1rpx solid #dcdfe6;
|
||||||
border-radius: 8rpx;
|
border-radius: 12rpx;
|
||||||
padding: 16rpx;
|
padding: 20rpx 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.picker:hover {
|
||||||
|
border-color: #c6e2ff;
|
||||||
|
box-shadow: 0 2rpx 8rpx rgba(64, 158, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.picker:active {
|
||||||
|
background-color: #f5faff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picker-text {
|
.picker-text {
|
||||||
@@ -297,11 +300,24 @@
|
|||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1rpx solid #dcdfe6;
|
border: 1rpx solid #dcdfe6;
|
||||||
border-radius: 8rpx;
|
border-radius: 12rpx;
|
||||||
padding: 16rpx;
|
padding: 20rpx 24rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
resize: none;
|
resize: none;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-textarea:focus {
|
||||||
|
border-color: #409eff;
|
||||||
|
box-shadow: 0 0 0 4rpx rgba(64, 158, 255, 0.1);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-textarea::placeholder {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea-count {
|
.textarea-count {
|
||||||
@@ -344,8 +360,9 @@
|
|||||||
|
|
||||||
.form-input,
|
.form-input,
|
||||||
.picker {
|
.picker {
|
||||||
padding: 20rpx;
|
padding: 24rpx 28rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
border-radius: 14rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picker-text {
|
.picker-text {
|
||||||
@@ -354,8 +371,14 @@
|
|||||||
|
|
||||||
.form-textarea {
|
.form-textarea {
|
||||||
height: 200rpx;
|
height: 200rpx;
|
||||||
padding: 20rpx;
|
padding: 24rpx 28rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
|
border-radius: 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-input::placeholder,
|
||||||
|
.form-textarea::placeholder {
|
||||||
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea-count {
|
.textarea-count {
|
||||||
@@ -383,7 +406,9 @@
|
|||||||
|
|
||||||
.form-input,
|
.form-input,
|
||||||
.picker {
|
.picker {
|
||||||
|
padding: 28rpx 32rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picker-text {
|
.picker-text {
|
||||||
@@ -391,7 +416,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-textarea {
|
.form-textarea {
|
||||||
|
padding: 28rpx 32rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-input::placeholder,
|
||||||
|
.form-textarea::placeholder {
|
||||||
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -37,19 +37,7 @@
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-row">
|
|
||||||
<view class="form-label">角色</view>
|
|
||||||
<view class="form-control">
|
|
||||||
<picker
|
|
||||||
:range="roleOptions"
|
|
||||||
:value="roleIndex"
|
|
||||||
@change="onRoleChange"
|
|
||||||
class="picker"
|
|
||||||
>
|
|
||||||
<view class="picker-text">{{ roleOptions[roleIndex] }}</view>
|
|
||||||
</picker>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="form-row">
|
<view class="form-row">
|
||||||
<view class="form-label">状态</view>
|
<view class="form-label">状态</view>
|
||||||
<view class="form-control">
|
<view class="form-control">
|
||||||
@@ -95,15 +83,10 @@
|
|||||||
id: '',
|
id: '',
|
||||||
name: '张三',
|
name: '张三',
|
||||||
phone: '13800138001',
|
phone: '13800138001',
|
||||||
role: '初级分销员',
|
|
||||||
status: '启用',
|
status: '启用',
|
||||||
remark: '默认分销员'
|
remark: '默认分销员'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 角色选项
|
|
||||||
const roleOptions = ['初级分销员', '中级分销员', '高级分销员']
|
|
||||||
const roleIndex = ref(0)
|
|
||||||
|
|
||||||
// 状态选项
|
// 状态选项
|
||||||
const statusOptions = ['启用', '禁用']
|
const statusOptions = ['启用', '禁用']
|
||||||
const statusIndex = ref(0)
|
const statusIndex = ref(0)
|
||||||
@@ -182,12 +165,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 角色变更
|
|
||||||
function onRoleChange(e) {
|
|
||||||
const value = e.detail.value
|
|
||||||
roleIndex.value = value
|
|
||||||
distributorForm.value.role = roleOptions[value]
|
|
||||||
}
|
|
||||||
|
|
||||||
// 状态变更
|
// 状态变更
|
||||||
function onStatusChange(e) {
|
function onStatusChange(e) {
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
<view class="distributor-name">{{ distributor.name }}</view>
|
<view class="distributor-name">{{ distributor.name }}</view>
|
||||||
<view class="distributor-meta">
|
<view class="distributor-meta">
|
||||||
<view class="meta-item">{{ distributor.phone }}</view>
|
<view class="meta-item">{{ distributor.phone }}</view>
|
||||||
<view class="meta-item">{{ distributor.role }}</view>
|
|
||||||
<view class="meta-item status-{{ distributor.statusClass }}">{{ distributor.status }}</view>
|
<view class="meta-item status-{{ distributor.statusClass }}">{{ distributor.status }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -118,7 +117,6 @@
|
|||||||
id: 1,
|
id: 1,
|
||||||
name: '张三',
|
name: '张三',
|
||||||
phone: '13800138001',
|
phone: '13800138001',
|
||||||
role: '初级分销员',
|
|
||||||
status: '启用',
|
status: '启用',
|
||||||
statusClass: 'active'
|
statusClass: 'active'
|
||||||
},
|
},
|
||||||
@@ -126,7 +124,6 @@
|
|||||||
id: 2,
|
id: 2,
|
||||||
name: '李四',
|
name: '李四',
|
||||||
phone: '13800138002',
|
phone: '13800138002',
|
||||||
role: '中级分销员',
|
|
||||||
status: '启用',
|
status: '启用',
|
||||||
statusClass: 'active'
|
statusClass: 'active'
|
||||||
},
|
},
|
||||||
@@ -134,7 +131,6 @@
|
|||||||
id: 3,
|
id: 3,
|
||||||
name: '王五',
|
name: '王五',
|
||||||
phone: '13800138003',
|
phone: '13800138003',
|
||||||
role: '高级分销员',
|
|
||||||
status: '禁用',
|
status: '禁用',
|
||||||
statusClass: 'inactive'
|
statusClass: 'inactive'
|
||||||
}
|
}
|
||||||
@@ -162,17 +158,17 @@
|
|||||||
|
|
||||||
// 添加分销员
|
// 添加分销员
|
||||||
function addDistributor() {
|
function addDistributor() {
|
||||||
uni.showToast({
|
// 跳转至添加分销员页面
|
||||||
title: '添加分销员功能开发中',
|
uni.navigateTo({
|
||||||
icon: 'none'
|
url: '/pages/distributor/add'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑分销员
|
// 编辑分销员
|
||||||
function editDistributor(id) {
|
function editDistributor(id) {
|
||||||
uni.showToast({
|
// 跳转至编辑分销员页面
|
||||||
title: '编辑分销员功能开发中',
|
uni.navigateTo({
|
||||||
icon: 'none'
|
url: '/pages/distributor/edit?id=' + id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,6 +345,7 @@
|
|||||||
color: #303133;
|
color: #303133;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
padding-left: 12rpx;
|
padding-left: 12rpx;
|
||||||
|
margin-top: 12rpx;
|
||||||
border-left: 8rpx solid #409eff;
|
border-left: 8rpx solid #409eff;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="work-container">
|
<view class="work-container">
|
||||||
<!-- 账号管理 -->
|
<!-- 账号管理 -->
|
||||||
<view class="section">
|
<view v-if="checkPermi(['work:account:user'])" class="section">
|
||||||
<view class="section-title">账号管理</view>
|
<view class="section-title">账号管理</view>
|
||||||
<view class="feature-row">
|
<view class="feature-row">
|
||||||
<!-- 管理员功能 -->
|
<!-- 管理员功能 -->
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToAccountManage">
|
<view v-if="checkPermi(['work:account:user'])" class="feature-card" @click="goToAccountManage">
|
||||||
<view class="feature-icon distributor-icon">
|
<view class="feature-icon distributor-icon">
|
||||||
<view class="icon-text">👥</view>
|
<view class="icon-text">👥</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -15,17 +15,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToQuotaManage">
|
<view v-if="checkPermi(['work:member:code'])" class="feature-card" @click="goToQuotaManage">
|
||||||
<view class="feature-icon user-icon">
|
<view class="feature-icon user-icon">
|
||||||
<view class="icon-text">🎁</view>
|
<view class="icon-text">🎁</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="feature-info">
|
<view class="feature-info">
|
||||||
<view class="feature-title">赠会员额度分配</view>
|
<view class="feature-title">赠送会员额度分配</view>
|
||||||
<view class="feature-desc">分配分销员每月赠会员额度</view>
|
<view class="feature-desc">分配分销员每月赠会员额度</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToLogManage">
|
<view v-if="checkPermi(['work:account:log'])" class="feature-card" @click="goToLogManage">
|
||||||
<view class="feature-icon dept-icon">
|
<view class="feature-icon dept-icon">
|
||||||
<view class="icon-text">📋</view>
|
<view class="icon-text">📋</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -34,26 +34,15 @@
|
|||||||
<view class="feature-desc">查看账号核心操作日志</view>
|
<view class="feature-desc">查看账号核心操作日志</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 分销员功能 -->
|
|
||||||
<view v-if="userRole === 'distributor'" class="feature-card" @click="goToPersonalAccount">
|
|
||||||
<view class="feature-icon notice-icon">
|
|
||||||
<view class="icon-text">👤</view>
|
|
||||||
</view>
|
|
||||||
<view class="feature-info">
|
|
||||||
<view class="feature-title">个人账号管理</view>
|
|
||||||
<view class="feature-desc">修改个人资料、登录密码</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 分销管理 -->
|
<!-- 分销管理 -->
|
||||||
<view class="section">
|
<view v-if="checkPermi(['work:distribution:index'])" class="section">
|
||||||
<view class="section-title">分销管理</view>
|
<view class="section-title">分销管理</view>
|
||||||
<view class="feature-row">
|
<view class="feature-row">
|
||||||
<!-- 管理员功能 -->
|
<!-- 管理员功能 -->
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToDistributorManage">
|
<view v-if="checkPermi(['work:distribution:distributor'])" class="feature-card" @click="goToDistributorManage">
|
||||||
<view class="feature-icon distributor-icon">
|
<view class="feature-icon distributor-icon">
|
||||||
<view class="icon-text">👥</view>
|
<view class="icon-text">👥</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -63,7 +52,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToProfitRule">
|
<view v-if="checkPermi(['work:distribution:profitRule'])" class="feature-card" @click="goToProfitRule">
|
||||||
<view class="feature-icon user-icon">
|
<view class="feature-icon user-icon">
|
||||||
<view class="icon-text">💰</view>
|
<view class="icon-text">💰</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -73,7 +62,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToDistributionData">
|
<view v-if="checkPermi(['work:distribution:profitRecord'])" class="feature-card" @click="goToDistributionData">
|
||||||
<view class="feature-icon dept-icon">
|
<view class="feature-icon dept-icon">
|
||||||
<view class="icon-text">📊</view>
|
<view class="icon-text">📊</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -83,7 +72,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToQrCodeManage">
|
<view v-if="checkPermi(['work:distribution:qrCode'])" class="feature-card" @click="goToQrCodeManage">
|
||||||
<view class="feature-icon notice-icon">
|
<view class="feature-icon notice-icon">
|
||||||
<view class="icon-text">🔗</view>
|
<view class="icon-text">🔗</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -117,10 +106,10 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 学员学情监控 -->
|
<!-- 学员学情监控 -->
|
||||||
<view class="section">
|
<view v-if="checkPermi(['work:student:index'])" class="section">
|
||||||
<view class="section-title">学员学情监控</view>
|
<view class="section-title">学员学情监控</view>
|
||||||
<view class="feature-row">
|
<view class="feature-row">
|
||||||
<view class="feature-card" @click="goToStudentList">
|
<view v-if="checkPermi(['work:student:info'])" class="feature-card" @click="goToStudentList">
|
||||||
<view class="feature-icon dept-icon">
|
<view class="feature-icon dept-icon">
|
||||||
<view class="icon-text">🎓</view>
|
<view class="icon-text">🎓</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -130,7 +119,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="feature-card" @click="goToStudentDetail">
|
<view v-if="checkPermi(['work:student:info'])" class="feature-card" @click="goToStudentDetail">
|
||||||
<view class="feature-icon notice-icon">
|
<view class="feature-icon notice-icon">
|
||||||
<view class="icon-text">📈</view>
|
<view class="icon-text">📈</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -140,7 +129,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="feature-card" @click="goToLearningAnalysis">
|
<view v-if="checkPermi(['work:student:analysis'])" class="feature-card" @click="goToLearningAnalysis">
|
||||||
<view class="feature-icon log-icon">
|
<view class="feature-icon log-icon">
|
||||||
<view class="icon-text">📊</view>
|
<view class="icon-text">📊</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -150,7 +139,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="feature-card" @click="goToLearningRemind">
|
<view v-if="checkPermi(['work:student:notify'])" class="feature-card" @click="goToLearningRemind">
|
||||||
<view class="feature-icon distributor-icon">
|
<view class="feature-icon distributor-icon">
|
||||||
<view class="icon-text">🔔</view>
|
<view class="icon-text">🔔</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -163,11 +152,11 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 会员维护 -->
|
<!-- 会员维护 -->
|
||||||
<view class="section">
|
<view v-if="checkPermi(['work:member:index'])" class="section">
|
||||||
<view class="section-title">会员维护</view>
|
<view class="section-title">会员维护</view>
|
||||||
<view class="feature-row">
|
<view class="feature-row">
|
||||||
<!-- 管理员功能 -->
|
<!-- 管理员功能 -->
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToMemberOrder">
|
<view v-if="checkPermi(['work:member:order'])" class="feature-card" @click="goToMemberOrder">
|
||||||
<view class="feature-icon user-icon">
|
<view class="feature-icon user-icon">
|
||||||
<view class="icon-text">🛒</view>
|
<view class="icon-text">🛒</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -177,7 +166,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToGiftMember">
|
<view v-if="checkPermi(['work:member:code'])" class="feature-card" @click="goToGiftMember">
|
||||||
<view class="feature-icon notice-icon">
|
<view class="feature-icon notice-icon">
|
||||||
<view class="icon-text">🎁</view>
|
<view class="icon-text">🎁</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -187,7 +176,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="userRole === 'admin'" class="feature-card" @click="goToGeneralCode">
|
<view v-if="checkPermi(['work:member:qrCode'])" class="feature-card" @click="goToGeneralCode">
|
||||||
<view class="feature-icon log-icon">
|
<view class="feature-icon log-icon">
|
||||||
<view class="icon-text">🔗</view>
|
<view class="icon-text">🔗</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -198,7 +187,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 分销员功能 -->
|
<!-- 分销员功能 -->
|
||||||
<view v-if="userRole === 'distributor'" class="feature-card" @click="goToPersonalOrder">
|
<view v-if="checkPermi(['work:member:orderInfo'])" class="feature-card" @click="goToPersonalOrder">
|
||||||
<view class="feature-icon distributor-icon">
|
<view class="feature-icon distributor-icon">
|
||||||
<view class="icon-text">📋</view>
|
<view class="icon-text">📋</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -208,7 +197,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="userRole === 'distributor'" class="feature-card" @click="goToPersonalGiftMember">
|
<view v-if="checkPermi(['work:member:send'])" class="feature-card" @click="goToPersonalGiftMember">
|
||||||
<view class="feature-icon user-icon">
|
<view class="feature-icon user-icon">
|
||||||
<view class="icon-text">🎁</view>
|
<view class="icon-text">🎁</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -221,10 +210,10 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 异常提醒 -->
|
<!-- 异常提醒 -->
|
||||||
<view class="section">
|
<view v-if="checkPermi(['work:error:index'])" class="section">
|
||||||
<view class="section-title">异常提醒</view>
|
<view class="section-title">异常提醒</view>
|
||||||
<view class="feature-row">
|
<view class="feature-row">
|
||||||
<view class="feature-card" @click="goToProfitException">
|
<view v-if="checkPermi(['work:error:profit'])" class="feature-card" @click="goToProfitException">
|
||||||
<view class="feature-icon notice-icon">
|
<view class="feature-icon notice-icon">
|
||||||
<view class="icon-text">💰</view>
|
<view class="icon-text">💰</view>
|
||||||
<view v-if="exceptionCount.profit > 0" class="exception-badge">{{ exceptionCount.profit }}</view>
|
<view v-if="exceptionCount.profit > 0" class="exception-badge">{{ exceptionCount.profit }}</view>
|
||||||
@@ -235,7 +224,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="feature-card" @click="goToMemberOrderException">
|
<view v-if="checkPermi(['work:error:memOrder'])" class="feature-card" @click="goToMemberOrderException">
|
||||||
<view class="feature-icon notice-icon">
|
<view class="feature-icon notice-icon">
|
||||||
<view class="icon-text">🛒</view>
|
<view class="icon-text">🛒</view>
|
||||||
<view v-if="exceptionCount.member > 0" class="exception-badge">{{ exceptionCount.member }}</view>
|
<view v-if="exceptionCount.member > 0" class="exception-badge">{{ exceptionCount.member }}</view>
|
||||||
@@ -252,6 +241,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, getCurrentInstance, onMounted } from "vue"
|
import { ref, getCurrentInstance, onMounted } from "vue"
|
||||||
|
import { checkPermi } from "@/utils/permission"
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const userRole = ref('admin') // 模拟角色,实际应从登录状态获取
|
const userRole = ref('admin') // 模拟角色,实际应从登录状态获取
|
||||||
@@ -287,12 +277,6 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function goToPersonalAccount() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/account/personal'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 分销管理相关
|
// 分销管理相关
|
||||||
function goToDistributorManage() {
|
function goToDistributorManage() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
Reference in New Issue
Block a user