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..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": "", @@ -314,13 +334,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 +393,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": "我的", diff --git a/src/pages/shop/brandDetail.vue b/src/pages/shop/brandDetail.vue new file mode 100644 index 0000000..5090cb8 --- /dev/null +++ b/src/pages/shop/brandDetail.vue @@ -0,0 +1,149 @@ + + + diff --git a/src/pages/shop/detail.vue b/src/pages/shop/detail.vue index e133347..adbaa3f 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 }} @@ -43,7 +43,10 @@ > {{ state.detail.phone }} - + 联系商家 @@ -80,10 +83,12 @@ + {{ state.detail.discountsPrice }} + - + { 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 = () => { diff --git a/src/pages/tabbar/coopMerchant.vue b/src/pages/tabbar/coopMerchant.vue index 7439278..bce69d4 100644 --- a/src/pages/tabbar/coopMerchant.vue +++ b/src/pages/tabbar/coopMerchant.vue @@ -29,7 +29,9 @@ onShow(() => { 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: "合作商家类型未知", icon: "none" }) } } @@ -55,28 +57,33 @@ 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.deptName.length > 5 ? v.deptName.substring(0, 5) + "..." : v.deptName }} - - - - - {{ v.phone }} + + + + + + + {{ v.phone }} + + + 共{{ v.mchCount }}家 营业时间: 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, + }, + }), +} diff --git a/src/sheep/components/crud/crud-layout/crud-layout.vue b/src/sheep/components/crud/crud-layout/crud-layout.vue index 9a25bde..bba4aef 100644 --- a/src/sheep/components/crud/crud-layout/crud-layout.vue +++ b/src/sheep/components/crud/crud-layout/crud-layout.vue @@ -151,7 +151,7 @@ page { flex: 1; overflow: hidden; padding: 0 30rpx; - // background: #ecf4f9; + background: #ecf4f9; } &_bottom {