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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ v.name.length > 7 ? v.name.substring(0, 7) + "..." : v.name }}
+ {{ v.deptName.length > 5 ? v.deptName.substring(0, 5) + "..." : v.deptName }}
+
+
+
+
+ {{ v.phone }}
+
+
+ 营业时间:
+ {{ v.jobTime?.split(",")[0] ? "早:" + v.jobTime?.split(",")[0] : "" }}
+ {{ v.jobTime?.split(",")[1] ? "中:" + v.jobTime?.split(",")[1] : "" }}
+ {{ v.jobTime?.split(",")[2] ? "晚:" + v.jobTime?.split(",")[2] : "" }}
+
+
+
+ 地址:
+ {{ v.addressDes }}
+
+
+
+
+
+
+
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 @@
+aaa
+
+
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,
+ },
+ }),
+}