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 @@
+
+
+
+
+
+
+
+ 搜 索
+
+
+
+
+
+
+
+
+ {{ v.title }}
+
+ {{ v.status == "0" ? "在售" : "未售" }}
+
+
+ 单位 {{ v.unit }}
+ 库存 {{ v.totalStock }}
+
+
+
+ ¥
+ {{ v.originalPrice.toFixed(2) }}
+
+
+ ¥
+ {{ v.spuPrice.toFixed(2).split(".")[0] }}.
+ {{ v.spuPrice.toFixed(2).split(".")[1] }}
+
+ 到手价
+
+
+
+
+
+
+
+
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.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}` })
+}