From ec73f99005a8793d3ff40b2bc9b3da3f26b7aade Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 28 Mar 2025 15:24:57 +0800 Subject: [PATCH 1/7] 1 --- src/App.vue | 4 ++++ src/pages.json | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index d920756..f36f9e9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -65,7 +65,11 @@ export default { methods: { _initTabbar() { console.log("环境判断") + const url = uni.getLaunchOptionsSync().path console.log(uni.getLaunchOptionsSync()) + if (url == "pages/tabbar/coopMerchant") { + console.log("xxx") + } let appEnv = 1 // 1:浙政钉 2:诗画 diff --git a/src/pages.json b/src/pages.json index afb6bee..6e78d20 100644 --- a/src/pages.json +++ b/src/pages.json @@ -314,13 +314,13 @@ "selectedIconPath": "" }, { - "pagePath": "pages/tabbar/shop", + "pagePath": "pages/tabbar/selfMerchant", "text": "", "iconPath": "", "selectedIconPath": "" }, { - "pagePath": "pages/tabbar/coopShop", + "pagePath": "pages/tabbar/coopMerchant", "text": "", "iconPath": "", "selectedIconPath": "" @@ -373,21 +373,18 @@ // "iconPath": "static/tabbar/order.png", // "selectedIconPath": "static/tabbar/order-select.png" // }, - // { // "pagePath": "pages/tabbar/flowStatistics", // "text": "流水统计", // "iconPath": "static/tabbar/order.png", // "selectedIconPath": "static/tabbar/order-select.png" // }, - // { // "pagePath": "pages/tabbar/individualOrder", // "text": "订单", // "iconPath": "static/tabbar/order.png", // "selectedIconPath": "static/tabbar/order-select.png" // }, - // { // "pagePath": "pages/tabbar/my", // "text": "我的", From 095d3e736af982e8903491333e3e4849e5f5dcf3 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 28 Mar 2025 19:13:07 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=81=94=E7=B3=BB=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=92=89=E9=92=89api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/shop/detail.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/pages/shop/detail.vue b/src/pages/shop/detail.vue index e133347..8c40f02 100644 --- a/src/pages/shop/detail.vue +++ b/src/pages/shop/detail.vue @@ -43,7 +43,10 @@ > {{ state.detail.phone }} - + 联系商家 @@ -145,7 +148,7 @@ import { reactive, nextTick, ref } from "vue" import { onLoad, onShow } from "@dcloudio/uni-app" import { isEmpty } from "radash" -import { hooks, router } from "@@/index" +import { router } from "@@/index" import { foodApi, merchantApi, payApi, shopApi } from "@@/api" import zSwiper from "@zebra-ui/swiper/components/z-swiper/z-swiper.vue" import zSwiperItem from "@zebra-ui/swiper/components/z-swiper-item/z-swiper-item.vue" @@ -269,7 +272,12 @@ const doPhone = () => { uni.showToast({ title: "该商户没有预留电话", icon: "none" }) return } - hooks.useMakePhoneCall(state.detail.phone) + ;(window as any).dd + .callPhone({ + phoneNum: state.detail.phone, + }) + .then((res) => {}) + .catch((err) => {}) } const getHeight = () => { From 1bc49b3a86fc2fad827d2c9b7469a836347daa06 Mon Sep 17 00:00:00 2001 From: weiwei Date: Sat, 29 Mar 2025 18:29:05 +0800 Subject: [PATCH 3/7] =?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, + }, + }), +} From 7201fa80155e3462592ec40ec52353a46e807859 Mon Sep 17 00:00:00 2001 From: weiwei Date: Sat, 29 Mar 2025 18:29:57 +0800 Subject: [PATCH 4/7] 1 --- src/pages/tabbar/coopMerchant.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/tabbar/coopMerchant.vue b/src/pages/tabbar/coopMerchant.vue index d8b966a..5c7e5a4 100644 --- a/src/pages/tabbar/coopMerchant.vue +++ b/src/pages/tabbar/coopMerchant.vue @@ -31,7 +31,7 @@ const toDetail = async (v: any) => { if (isLogin) { 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: "合作商户类型未知" }) + uni.showToast({ title: "合作商户类型未知", icon: "none" }) } } From 0af5876c4e807785ceaf254b7fad0c97589ec8aa Mon Sep 17 00:00:00 2001 From: weiwei Date: Sat, 29 Mar 2025 21:23:03 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=B8=83=E5=B1=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/shop/brandDetail.vue | 153 +++++++++++++++--------------- src/pages/tabbar/coopMerchant.vue | 47 +++++---- 2 files changed, 101 insertions(+), 99 deletions(-) diff --git a/src/pages/shop/brandDetail.vue b/src/pages/shop/brandDetail.vue index edd1b4d..2b3caf6 100644 --- a/src/pages/shop/brandDetail.vue +++ b/src/pages/shop/brandDetail.vue @@ -45,6 +45,7 @@ onShow(async () => { } finally { uni.hideLoading() } + uni.setNavigationBarTitle({ title: state.detail.name }) }) const getDetail = async () => { @@ -61,84 +62,86 @@ const toDetail = async (v: any) => { diff --git a/src/pages/tabbar/coopMerchant.vue b/src/pages/tabbar/coopMerchant.vue index 5c7e5a4..2413d3f 100644 --- a/src/pages/tabbar/coopMerchant.vue +++ b/src/pages/tabbar/coopMerchant.vue @@ -31,7 +31,7 @@ const toDetail = async (v: any) => { if (isLogin) { 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: "合作商户类型未知", icon: "none" }) + uni.showToast({ title: "合作商家类型未知", icon: "none" }) } } @@ -57,32 +57,31 @@ const toDetail = async (v: any) => { - - {{ v.name.length > 7 ? v.name.substring(0, 6) + "..." : v.name }} - 共{{ v.mchCount }}家店铺 - - + {{ v.name.length > 7 ? v.name.substring(0, 6) + "..." : v.name }} {{ v.deptName.length > 5 ? v.deptName.substring(0, 5) + "..." : v.deptName }} - - - - - {{ v.phone }} + + + + + + {{ v.phone }} + + 共{{ v.mchCount }}家 营业时间: From fca9494c33cabd756f060cfc638fbbd727f3ca6b Mon Sep 17 00:00:00 2001 From: weiwei Date: Sat, 29 Mar 2025 22:04:06 +0800 Subject: [PATCH 6/7] 1 --- src/pages/shop/brandDetail.vue | 8 ++++---- src/pages/shop/detail.vue | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/shop/brandDetail.vue b/src/pages/shop/brandDetail.vue index 2b3caf6..45b9097 100644 --- a/src/pages/shop/brandDetail.vue +++ b/src/pages/shop/brandDetail.vue @@ -63,11 +63,11 @@ const toDetail = async (v: any) => {