From 23f7263996109988404ce55db6f004fecc8a57c6 Mon Sep 17 00:00:00 2001 From: XingQue Date: Tue, 21 Jul 2026 03:24:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=9C=A8=E5=85=B7=E4=BD=93=E4=BF=B1=E4=B9=90?= =?UTF-8?q?=E9=83=A8=E5=8F=AF=E8=A7=81=EF=BC=8C=E6=94=AF=E6=8C=81=E4=B8=93?= =?UTF-8?q?=E5=8C=BA=E4=B8=8E=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 侧栏不再要求集团汇总才显示商品列表/类型专区;类型CRUD仍仅集团汇总可写。 Co-authored-by: Cursor --- src/views/Layout.vue | 16 +++++--- src/views/product/List.vue | 72 +++++++++++++++++++++++++++++----- src/views/product/TypeZone.vue | 31 ++++++++++----- src/views/shop/Products.vue | 2 +- 4 files changed, 94 insertions(+), 27 deletions(-) diff --git a/src/views/Layout.vue b/src/views/Layout.vue index 687b615..af2d50d 100644 --- a/src/views/Layout.vue +++ b/src/views/Layout.vue @@ -110,6 +110,10 @@ 处罚管理 + + + 投诉工单 + @@ -117,9 +121,9 @@ 商品管理 - 商品列表 - 商品类型专区管理 - 商品数据分析 + 商品列表 + 商品类型专区管理 + 商品数据分析 假单管理 @@ -251,7 +255,7 @@ import { useRoute, useRouter } from 'vue-router' import { ElMessage, ElNotification } from 'element-plus' import { List, User, Warning, Money, Fold, Expand, Connection, Setting, - Goods, UserFilled, Shop, Comment,DataAnalysis, Medal // 新增 + Goods, UserFilled, Shop, Comment, DataAnalysis, Medal, ChatDotRound } from '@element-plus/icons-vue' import request from '@/utils/request' import KefuConnect from '@/components/KefuConnect.vue' @@ -430,9 +434,9 @@ const agentUnread = ref(0) // 未读消息总数 const permPrefixMap = { 'abca1': 'Ds', // 打手 'baac2': 'Boss', // 老板 - 'cabc3': 'Gs', // 管事 + 'cabc3': 'Ds', // 管事(与小程序一致,统一 Ds) 'cb3a2': 'Sj', // 商家 - 'bcaa4': 'Zz' // 组长 + 'bcaa4': 'Ds' // 组长(与小程序一致,统一 Ds) } // 获取客服权限及GoEasy配置 diff --git a/src/views/product/List.vue b/src/views/product/List.vue index c27f252..6a2bbe6 100644 --- a/src/views/product/List.vue +++ b/src/views/product/List.vue @@ -7,24 +7,41 @@
请联系管理员开通权限
-
+
+ - 前往抢单商品类型 -
-
添加商品
显示审核专用 +
@@ -265,6 +282,7 @@ 确认发布 +
@@ -288,6 +306,9 @@ const zoneList = ref([]) // 同上 const memberList = ref([]) const showAudit = ref(false) +const zhiKanShenhe = ref(true) +const zhiKanLoading = ref(false) +const zhiKanReady = ref(false) // 避免初次赋值触发 change // 展示用的类型列表:按 paixu 降序(大的在前),并过滤审核状态 const typeListDisplay = computed(() => { let list = [...typeList.value] @@ -775,15 +796,15 @@ const handleDeleteProduct = async (productId) => { // ---------- 基础数据获取 ---------- const fetchBaseData = async () => { - if (!isAllClubScope.value) return try { const res = await request.post('/houtai/htsphqjcsx', { username: username.value }) if (res.code === 0) { typeList.value = res.data.type_list || [] zoneList.value = res.data.zone_list || [] memberList.value = res.data.member_list || [] - // 注意:后端返回的 paixu 已经是倒序值(越大越靠前),我们不需要修改 - // 展示时会通过计算属性按 paixu 降序排序,视觉上从上到下顺序正确 + zhiKanReady.value = false + zhiKanShenhe.value = res.data.zhi_kan_shenhe !== false + nextTick(() => { zhiKanReady.value = true }) const firstNormal = typeListDisplay.value[0] if (firstNormal) { selectedTypeId.value = firstNormal.id @@ -800,6 +821,28 @@ const fetchBaseData = async () => { } } +const onZhiKanChange = async (val) => { + if (!zhiKanReady.value || isAllClubScope.value) return + zhiKanLoading.value = true + try { + const res = await request.post('/houtai/htxgzhikan', { + username: username.value, + zhi_kan_shenhe: val, + }) + if (res.code === 0) { + ElMessage.success(val ? '已开启:未绑店无身份用户只看审核商品' : '已关闭:未绑店用户看正常商品') + } else { + zhiKanShenhe.value = !val + ElMessage.error(res.msg || '更新失败') + } + } catch (e) { + zhiKanShenhe.value = !val + ElMessage.error('更新失败') + } finally { + zhiKanLoading.value = false + } +} + const getFullUrl = (path) => { if (!path) return '' const ossUrl = window.$ossURL || '' @@ -820,6 +863,7 @@ onMounted(() => {