From 467dcc637d082015c130b55ac3b231e58bec2d01 Mon Sep 17 00:00:00 2001 From: weiwei Date: Tue, 28 Oct 2025 14:20:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=85=B1=E5=AF=8C=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 8 +- src/pages.json | 7 + src/pages/canteen/detail.vue | 4 +- src/pages/integrated/visitor/invitation.vue | 63 -------- src/pages/merchant/detail.vue | 6 +- src/pages/online-shop/cart.vue | 8 +- src/pages/online-shop/goods-detail.vue | 4 +- .../components/product-sku.vue | 152 ++++++++++++++++++ .../components/product-total.vue | 33 ++++ src/pages/prosperity-shop/goods-cart.vue | 90 +++++++++++ src/pages/prosperity-shop/goods-detail.vue | 30 ++++ src/pages/prosperity-shop/shop-detail.vue | 10 +- src/pages/tabbar/my.vue | 2 +- src/pages/tabbar/onlineShop.vue | 4 +- src/pages/tabbar/prosperityShop.vue | 27 ++-- src/sheep/api/food.ts | 12 -- src/sheep/api/order.ts | 12 ++ src/sheep/stores/{cart.ts => online-cart.ts} | 10 +- src/sheep/stores/prosperity-cart.ts | 69 ++++++++ src/static/icon/cart.png | Bin 0 -> 3460 bytes 20 files changed, 429 insertions(+), 122 deletions(-) create mode 100644 src/pages/prosperity-shop/components/product-sku.vue create mode 100644 src/pages/prosperity-shop/components/product-total.vue create mode 100644 src/pages/prosperity-shop/goods-cart.vue rename src/sheep/stores/{cart.ts => online-cart.ts} (82%) create mode 100644 src/sheep/stores/prosperity-cart.ts create mode 100644 src/static/icon/cart.png diff --git a/.env b/.env index f789095..7fbf7e7 100644 --- a/.env +++ b/.env @@ -20,15 +20,15 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 #VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 # VITE_APP_DEV_SERVICE = http://192.168.101.174:9999 # 邓-本地 -VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 -; VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 +# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 +VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 开发环境 图片访问基础地址 --------------------------- # VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 #VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上 # VITE_IMAGE_DEV_PATH = http://192.168.101.174:9999 # 邓-本地 -VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 -; VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 +# VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 +VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 生产环境 api地址 ---------------------------------- VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 diff --git a/src/pages.json b/src/pages.json index 8b4094a..15039f1 100644 --- a/src/pages.json +++ b/src/pages.json @@ -198,6 +198,13 @@ "navigationBarTitleText": "商品分类管理", "disableScroll": true } + }, + { + "path": "goods-cart", + "style": { + "navigationBarTitleText": "购物车", + "disableScroll": true + } } ] }, diff --git a/src/pages/canteen/detail.vue b/src/pages/canteen/detail.vue index d9d3bab..406dcdd 100644 --- a/src/pages/canteen/detail.vue +++ b/src/pages/canteen/detail.vue @@ -55,7 +55,7 @@ const getDetail = async () => { // 获取购物车信息 const getFoodCart = async () => { - const { data } = await foodApi.getShopCar({ merchantId: state.detailId, hardType: "CANTEEN" }) + const { data } = await orderApi.getShopCar({ merchantId: state.detailId, hardType: "CANTEEN" }) state.cartList = data ?? [] if (isEmpty(state.cartList)) { state.foodList.forEach((v: any) => { @@ -154,7 +154,7 @@ const updateFoodCart = async () => { }) if (isEmpty(list)) return const _pa = { merchantId: state.detailId, list: list, hardType: "CANTEEN" } - const { data, code }: any = await foodApi.updateShopCar(_pa) + const { data, code }: any = await orderApi.updateShopCar(_pa) if (code == 0) await getFoodCart() } diff --git a/src/pages/integrated/visitor/invitation.vue b/src/pages/integrated/visitor/invitation.vue index c36186e..9ba8882 100644 --- a/src/pages/integrated/visitor/invitation.vue +++ b/src/pages/integrated/visitor/invitation.vue @@ -4,15 +4,9 @@ 访客邀约请填写以下信息 - -