From f716bd685f5f78ba5aff4ac2788d602389e58553 Mon Sep 17 00:00:00 2001 From: weiwei Date: Wed, 10 Sep 2025 19:06:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=85=B1=E5=AF=8C=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=95=86=E5=93=81=E6=90=9C=E7=B4=A2=E5=92=8C=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 +- src/pages.json | 14 +++ src/pages/prosperity-shop/goods-manage.vue | 30 ++++++ src/pages/prosperity-shop/goods-search.vue | 106 +++++++++++++++++++++ src/pages/prosperity-shop/shop-detail.vue | 20 +++- src/pages/tabbar/index.vue | 10 ++ src/pages/tabbar/my.vue | 28 ++++-- src/pages/tabbar/prosperityShop.vue | 34 ++----- src/pages/user/userRole.vue | 2 +- src/sheep/api/prosperityShop.ts | 14 +-- 10 files changed, 213 insertions(+), 49 deletions(-) create mode 100644 src/pages/prosperity-shop/goods-manage.vue create mode 100644 src/pages/prosperity-shop/goods-search.vue diff --git a/src/App.vue b/src/App.vue index f7e497a..746ebf9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -66,7 +66,7 @@ const tabbar: TabbarItem[] = [ text: "共富商城", iconPath: "/static/tabbar/prosperity-shop.png", selectedIconPath: "/static/tabbar/prosperity-shop-select.png", - launchParam: ["onlineShop"], + launchParam: ["prosperityShop"], auth: ["user"], }, { @@ -114,7 +114,7 @@ const tabbar: TabbarItem[] = [ text: "我的", iconPath: "/static/tabbar/my.png", selectedIconPath: "/static/tabbar/my-select.png", - launchParam: ["canteen", "selfMerchant", "onlineShop", "coopMerchant", "integrated"], + launchParam: ["canteen", "selfMerchant", "onlineShop", "coopMerchant", "integrated", "prosperityShop"], auth: ["user", "merchant", "doorAdmin"], }, ] diff --git a/src/pages.json b/src/pages.json index b3c9a49..c73d75b 100644 --- a/src/pages.json +++ b/src/pages.json @@ -151,6 +151,20 @@ "navigationBarTitleText": "超市详情", "disableScroll": true } + }, + { + "path": "goods-search", + "style": { + "navigationBarTitleText": "商品搜索", + "disableScroll": true + } + }, + { + "path": "goods-manage", + "style": { + "navigationBarTitleText": "商品管理", + "disableScroll": true + } } ] }, diff --git a/src/pages/prosperity-shop/goods-manage.vue b/src/pages/prosperity-shop/goods-manage.vue new file mode 100644 index 0000000..2b49354 --- /dev/null +++ b/src/pages/prosperity-shop/goods-manage.vue @@ -0,0 +1,30 @@ + + + diff --git a/src/pages/prosperity-shop/goods-search.vue b/src/pages/prosperity-shop/goods-search.vue new file mode 100644 index 0000000..f1b8ba9 --- /dev/null +++ b/src/pages/prosperity-shop/goods-search.vue @@ -0,0 +1,106 @@ + + + diff --git a/src/pages/prosperity-shop/shop-detail.vue b/src/pages/prosperity-shop/shop-detail.vue index 0b47593..6cf636c 100644 --- a/src/pages/prosperity-shop/shop-detail.vue +++ b/src/pages/prosperity-shop/shop-detail.vue @@ -7,6 +7,7 @@ 搜索商品 @@ -40,8 +41,13 @@ {{ v.name }} - - + + {{ v.title }} @@ -141,7 +147,6 @@ const doCategory = async (index: number) => { const scroll = (e: any) => { scrollDetail.value = e.detail - console.log(e) } const filterStyle = computed(() => { @@ -163,16 +168,21 @@ const searchStyle = computed(() => { return { width: `${calcWidth + minWidth}%`, border: `2rpx solid #1879ff`, - // opacity: Math.max(1,), + opacity: (calcWidth / 100) * 2, } }) -const doGoods = (id: string) => { +const doGoodsDetail = (id: string) => { if (!id) return uni.showToast({ title: "商品id不存在", icon: "none" }) uni.navigateTo({ url: `/pages/prosperity-shop/goods-detail?id=${id}`, }) } + +const goSearch = () => { + if (!state.detail.id) return uni.showToast({ title: "超市id不存在", icon: "none" }) + uni.navigateTo({ url: `/pages/prosperity-shop/goods-search?merchantId=${state.detail.id}` }) +}