From 1bc49b3a86fc2fad827d2c9b7469a836347daa06 Mon Sep 17 00:00:00 2001 From: weiwei Date: Sat, 29 Mar 2025 18:29:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E4=BA=8C=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 20 +++++ src/pages/shop/brandDetail.vue | 144 ++++++++++++++++++++++++++++++ src/pages/shop/detail.vue | 8 +- src/pages/tabbar/coopMerchant.vue | 10 ++- src/pages/tabbar/userRole.vue | 3 + src/sheep/api/merchant.ts | 49 +++++----- 6 files changed, 208 insertions(+), 26 deletions(-) create mode 100644 src/pages/shop/brandDetail.vue create mode 100644 src/pages/tabbar/userRole.vue diff --git a/src/pages.json b/src/pages.json index 6e78d20..191b91e 100644 --- a/src/pages.json +++ b/src/pages.json @@ -9,6 +9,13 @@ } }, "pages": [ + // { + // "path": "pages/tabbar/userRole", + // "style": { + // "navigationBarTitleText": "用户角色", + // "disableScroll": true + // } + // }, { "path": "pages/tabbar/canteen", "style": { @@ -74,6 +81,13 @@ "disableScroll": true } }, + { + "path": "brandDetail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, { "path": "product-detail", "style": { @@ -307,6 +321,12 @@ }, "tabBar": { "list": [ + // { + // "pagePath": "pages/tabbar/userRole", + // "text": "", + // "iconPath": "", + // "selectedIconPath": "" + // }, { "pagePath": "pages/tabbar/canteen", "text": "", diff --git a/src/pages/shop/brandDetail.vue b/src/pages/shop/brandDetail.vue new file mode 100644 index 0000000..edd1b4d --- /dev/null +++ b/src/pages/shop/brandDetail.vue @@ -0,0 +1,144 @@ + + + diff --git a/src/pages/shop/detail.vue b/src/pages/shop/detail.vue index 8c40f02..8f02293 100644 --- a/src/pages/shop/detail.vue +++ b/src/pages/shop/detail.vue @@ -18,10 +18,10 @@ - {{ state.detail.name.length > 7 ? state.detail.name.substring(0, 7) + "..." : state.detail.name }} + {{ state.detail.name?.length > 7 ? state.detail.name.substring(0, 7) + "..." : state.detail.name }} - {{ state.detail.deptName.length > 5 ? state.detail.deptName.substring(0, 5) + "..." : state.detail.deptName }} + {{ state.detail.deptName?.length > 5 ? state.detail.deptName.substring(0, 5) + "..." : state.detail.deptName }} @@ -86,7 +86,7 @@ - + { const toDetail = async (v: any) => { const isLogin = await hooks.useCheckLogin() if (isLogin) { - router.jump("/pages/shop/detail", { id: v.id }) + if (v.supType && v.supType == "10") return router.jump("/pages/shop/brandDetail", { parentId: v.id }) + if (v.supType && v.supType == "20") return router.jump("/pages/shop/detail", { id: v.id }) + uni.showToast({ title: "合作商户类型未知" }) } } @@ -55,7 +57,11 @@ const toDetail = async (v: any) => { - {{ v.name.length > 7 ? v.name.substring(0, 7) + "..." : v.name }} + + {{ v.name.length > 7 ? v.name.substring(0, 6) + "..." : v.name }} + 共{{ v.mchCount }}家店铺 + + {{ v.deptName.length > 5 ? v.deptName.substring(0, 5) + "..." : v.deptName }} diff --git a/src/pages/tabbar/userRole.vue b/src/pages/tabbar/userRole.vue new file mode 100644 index 0000000..bf91dd0 --- /dev/null +++ b/src/pages/tabbar/userRole.vue @@ -0,0 +1,3 @@ + + + diff --git a/src/sheep/api/merchant.ts b/src/sheep/api/merchant.ts index 524cb0f..95e872a 100644 --- a/src/sheep/api/merchant.ts +++ b/src/sheep/api/merchant.ts @@ -1,22 +1,31 @@ -import request from "@/sheep/utils/request"; +import request from "@/sheep/utils/request" export default { - page: (params: any) => - request({ - url: "/wallet/mch-manage/app/page-join", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - detail: (params: any) => - request({ - url: "/wallet/mch-manage/app/detail", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), -}; + page: (params: any) => + request({ + url: "/wallet/mch-manage/app/page-join", + method: "GET", + params, + custom: { + showLoading: false, + }, + }), + childrenPage: (params: any) => + request({ + url: "/wallet/mch-manage/app/children-page-join", + method: "GET", + params, + custom: { + showLoading: false, + }, + }), + detail: (params: any) => + request({ + url: "/wallet/mch-manage/app/detail", + method: "GET", + params, + custom: { + showLoading: false, + }, + }), +}