From 4d1dcb72cb88468dfc3aef99574d781f02a778b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Sat, 23 Aug 2025 11:54:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=9B=A2=E8=B4=AD=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/shop.js | 2 + packages/myOrders/index/orderMockData.json | 278 +++++---- packages/myOrders/orderDetails/index.vue | 16 +- packages/shop/addAddress/index.vue | 107 ++-- packages/shop/address/index.vue | 60 +- packages/shop/goods/index.vue | 659 ++++++++++---------- packages/shop/groupPurchase/index.vue | 103 ++- packages/shop/groupPurchaseDetail/index.css | 83 ++- packages/shop/groupPurchaseDetail/index.vue | 270 +++++--- packages/shop/groupPurchaseSubmit/index.css | 28 +- packages/shop/groupPurchaseSubmit/index.vue | 413 +++++++++--- packages/shop/index/index.vue | 226 ++----- packages/shop/shopCar/index.vue | 335 +++++----- packages/shop/submitOrder/index.vue | 83 ++- packages/shop/ztLocation/index.css | 3 +- packages/shop/ztLocation/index.vue | 91 ++- 16 files changed, 1606 insertions(+), 1151 deletions(-) diff --git a/api/shop.js b/api/shop.js index 1c29dee1..6c0d6624 100644 --- a/api/shop.js +++ b/api/shop.js @@ -12,5 +12,7 @@ export const apiArr = { payOrder: "/api/v2/wechat/commodity/order/pay",//支付订单 settingDefaultAddress: '/api/v2/wechat/commodity/receiving_address/default', // 收货地址设置默认 updateAddress: '/api/v2/wechat/commodity/receiving_address/update', // 收货地址修改 + addAddress: '/api/v2/wechat/commodity/receiving_address/add', // 收货地址添加 + addAddressList: '/api/v2/wechat/commodity/receiving_address', // 收货地址列表 queryOrder: '/api/v2/wechat/commodity/order/trade_query', // 查询订单 } \ No newline at end of file diff --git a/packages/myOrders/index/orderMockData.json b/packages/myOrders/index/orderMockData.json index 9c628858..991006e6 100644 --- a/packages/myOrders/index/orderMockData.json +++ b/packages/myOrders/index/orderMockData.json @@ -1,167 +1,209 @@ [ { "id": 1001, - "user_id": 2001, + "user_id": 20001, "supplier_id": 3001, - "supplier_name": "生鲜优选", - "order_group_id": 5001, - "order_no": "DD202508131001", - "total_amount": 88.50, + "supplier_name": "鲜丰水果供应链有限公司", + "order_group_id": 40001, + "order_no": "SH20240823001001", + "total_amount": 156.80, "total_count": 3, - "order_status": 1, + "order_status": 3, + "cancelled_by": "", + "cancel_time": "", + "cancel_reason": "", "evauate_status": 2, "after_sales_status": 2, - "receiving_name": "张三", - "receiving_phone": "13800138001", - "receiving_address": "北京市朝阳区科技园A座101", + "receiving_name": "李佳", + "receiving_phone": "15901518415", + "receiving_address": "北京市朝阳区珠江绿洲文化广场3号楼2单元1002室", "pay_method": "微信支付", - "payment_amount": 0, - "payment_status": "未支付", - "payment_serial": "", - "payer_name": "", - "order_time": "2025-08-13T10:30:00Z", - "is_same_day": 1, - "estimated_delivery_time": "今日14:00-16:00", - "remark": "请尽快配送", - "shiliu_score": 88.5, - "shiliu_seed": 22.1, - "timeout_time_stamp": 1755086400, + "payment_amount": 156.80, + "payment_status": "已支付", + "payment_time": "2024-08-23 10:15:30", + "payment_serial": "WX202408231015300012345678", + "payer_name": "李佳", + "completed_at": "", + "order_time": "2024-08-23 10:10:22", + "is_same_day": 2, + "estimated_delivery_time": "2024-08-24 09:00-18:00", + "remark": "请放在小区丰巢柜,谢谢", + "shiliu_score": 156.8, + "shiliu_seed": 28.5, + "timeout_time_stamp": 1724413822, + "order_cate": 1, + "create_time": "2024-08-23 10:10:22", + "update_time": "2024-08-23 10:15:30", + "after_sales_count": 0, "commodity_order_item_list": [ { - "id": 7001, + "id": 50001, "order_id": 1001, - "goods_id": 8001, - "goods_name": "澳洲牛排", + "goods_id": 6001, + "goods_name": "泰国金枕榴莲(2-2.5斤/个)", "commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png", - "goods_unit": "盒", - "goods_spec": "200g/盒", - "cost_price": 45.0, - "sales_price": 68.0, + "goods_unit": "个", + "goods_spec": "2-2.5斤", + "cost_price": 45.00, + "sales_price": 69.90, "count": 1, + "after_sales_status": 2, "is_support_same_day": 1, - "is_same_day": true + "is_same_day": false }, { - "id": 7002, - "goods_id": 8002, - "goods_name": "有机西兰花", + "id": 50002, + "order_id": 1001, + "goods_id": 6002, + "goods_name": "阳光玫瑰葡萄(1斤装)", "commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png", - "goods_unit": "份", - "goods_spec": "500g/份", - "cost_price": 8.0, - "sales_price": 10.5, + "goods_unit": "斤", + "goods_spec": "1斤", + "cost_price": 12.00, + "sales_price": 25.90, "count": 2, + "after_sales_status": 2, "is_support_same_day": 1, - "is_same_day": true + "is_same_day": false } ] }, { "id": 1002, - "order_no": "DD202508131002", - "total_amount": 152.0, - "total_count": 5, - "order_status": 2, - "payment_status": "支付中", - "payment_time": "2025-08-13T10:35:22Z", - "payer_name": "李四", - "order_time": "2025-08-13T10:32:15Z", + "user_id": 20002, + "supplier_id": 3002, + "supplier_name": "优选生鲜超市供应链", + "order_group_id": 40002, + "order_no": "SH20240823001002", + "total_amount": 89.50, + "total_count": 2, + "order_status": 6, + "cancelled_by": "用户", + "cancel_time": "2024-08-23 09:45:10", + "cancel_reason": "临时改变需求,不需要该商品", + "evauate_status": 2, + "after_sales_status": 2, + "receiving_name": "张伟", + "receiving_phone": "13812345678", + "receiving_address": "上海市浦东新区张江高科技园区博云路2号", + "pay_method": "支付宝支付", + "payment_amount": 0.00, + "payment_status": "未支付", + "payment_time": "", + "payment_serial": "", + "payer_name": "", + "completed_at": "", + "order_time": "2024-08-23 09:30:05", + "is_same_day": 1, + "estimated_delivery_time": "2024-08-23 12:00-14:00", + "remark": "无", + "shiliu_score": 0.0, + "shiliu_seed": 0.0, + "timeout_time_stamp": 1724399405, + "order_cate": 2, + "create_time": "2024-08-23 09:30:05", + "update_time": "2024-08-23 09:45:10", + "after_sales_count": 0, "commodity_order_item_list": [ { - "id": 7003, - "goods_id": 8003, - "goods_name": "精品榴莲", + "id": 50003, + "order_id": 1002, + "goods_id": 6003, + "goods_name": "精品富士苹果(5斤装)", "commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png", - "sales_price": 152.0, + "goods_unit": "斤", + "goods_spec": "5斤", + "cost_price": 3.50, + "sales_price": 9.90, "count": 1, + "after_sales_status": 2, "is_support_same_day": 1, - "is_same_day": false + "is_same_day": true + }, + { + "id": 50004, + "order_id": 1002, + "goods_id": 6004, + "goods_name": "蒙牛纯牛奶(200ml*16盒)", + "commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png", + "goods_unit": "箱", + "goods_spec": "200ml*16盒", + "cost_price": 35.00, + "sales_price": 79.60, + "count": 1, + "after_sales_status": 2, + "is_support_same_day": 1, + "is_same_day": true } ] }, { "id": 1003, - "order_no": "DD202508131003", - "total_amount": 45.8, - "order_status": 3, - "payment_status": "已支付", - "payment_amount": 45.8, - "payment_serial": "PY20250813100003", - "order_time": "2025-08-13T09:15:30Z", - "is_same_day": 2, - "commodity_order_item_list": [ - { - "id": 7004, - "goods_name": "东北大米", - "count": 2, - "sales_price": 22.9 - } - ] - }, - { - "id": 1004, - "order_no": "DD202508131004", - "order_status": 4, - "receiving_name": "王五", - "receiving_phone": "13900139000", - "payment_serial": "PY20250813090001", - "order_time": "2025-08-13T08:45:00Z", - "is_same_day": 1, - "commodity_order_item_list": [ - { - "id": 7005, - "goods_name": "酸奶套装", - "count": 1, - "sales_price": 39.9 - } - ] - }, - { - "id": 1005, - "order_no": "DD202508131005", + "user_id": 20003, + "supplier_id": 3003, + "supplier_name": "美菜网餐饮供应链", + "order_group_id": 40003, + "order_no": "SH20240822001003", + "total_amount": 328.00, + "total_count": 5, "order_status": 5, - "evauate_status": 2, + "cancelled_by": "", + "cancel_time": "", + "cancel_reason": "", + "evauate_status": 1, + "after_sales_status": 1, + "receiving_name": "王芳", + "receiving_phone": "13987654321", + "receiving_address": "广州市天河区天河路385号天俊阁15楼", + "pay_method": "企业对公转账", + "payment_amount": 328.00, "payment_status": "已支付", - "completed_at": "2025-08-13T15:20:18Z", - "order_time": "2025-08-13T11:20:18Z", + "payment_time": "2024-08-22 15:20:40", + "payment_serial": "BANK202408221520400098765", + "payer_name": "王芳(企业代付)", + "completed_at": "2024-08-22 18:30:15", + "order_time": "2024-08-22 14:50:33", + "is_same_day": 2, + "estimated_delivery_time": "2024-08-23 08:00-10:00", + "remark": "餐饮用食材,请优先配送,包装需防震", + "shiliu_score": 328.0, + "shiliu_seed": 45.2, + "timeout_time_stamp": 1724319033, + "order_cate": 1, + "create_time": "2024-08-22 14:50:33", + "update_time": "2024-08-22 18:30:15", + "after_sales_count": 1, "commodity_order_item_list": [ { - "id": 7003, - "goods_id": 8003, - "goods_name": "冷冻虾仁", + "id": 50005, + "order_id": 1003, + "goods_id": 6005, + "goods_name": "新鲜生菜(1斤装)", "commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png", - "sales_price": 152.0, - "count": 3, - "is_support_same_day": 1, + "goods_unit": "斤", + "goods_spec": "1斤", + "cost_price": 1.80, + "sales_price": 3.50, + "count": 2, + "after_sales_status": 1, + "is_support_same_day": 2, "is_same_day": false }, { - "id": 7004, - "goods_id": 8004, - "goods_name": "精品榴莲", + "id": 50006, + "order_id": 1003, + "goods_id": 6006, + "goods_name": "冷冻鸡胸肉(1kg装)", "commodity_pic": "https://wechat-img-file.oss-cn-beijing.aliyuncs.com/test.png", - "sales_price": 152.0, - "count": 1, + "goods_unit": "袋", + "goods_spec": "1kg", + "cost_price": 12.00, + "sales_price": 22.80, + "count": 3, + "after_sales_status": 2, "is_support_same_day": 2, "is_same_day": false } ] - }, - { - "id": 1006, - "order_no": "DD202508131006", - "order_status": 6, - "cancelled_by": "user", - "cancel_time": "2025-08-13T10:40:05Z", - "cancel_reason": "选错商品", - "order_time": "2025-08-13T10:38:12Z", - "commodity_order_item_list": [ - { - "id": 7007, - "goods_name": "进口橙子", - "count": 2, - "sales_price": 32.0 - } - ] } ] \ No newline at end of file diff --git a/packages/myOrders/orderDetails/index.vue b/packages/myOrders/orderDetails/index.vue index c2f25826..a6b8ea63 100644 --- a/packages/myOrders/orderDetails/index.vue +++ b/packages/myOrders/orderDetails/index.vue @@ -8,12 +8,12 @@ 待发货 - 预计到货时间: 2025-09-09 9:59:59 + 预计到货时间: {{ orderInfo.estimated_delivery_time }} 商家正在加急打包中了,请耐心等候 待配送 - 预计到货时间: 2025-09-09 9:59:59 + 预计到货时间: {{ orderInfo.estimated_delivery_time }} 配送司机:15901518415 @@ -21,7 +21,7 @@ 已完成 - 预计到货时间: 2025-09-09 9:59:59 + 预计到货时间: {{ orderInfo.estimated_delivery_time }} 感谢对我们的信任,期待下次光临 @@ -39,9 +39,9 @@ - ¥{{ orderInfo.shiliu_score }} + ¥{{ orderInfo.payment_amount }} 商品下单应付 - ¥{{ orderInfo.shiliu_score }} + ¥{{ orderInfo.payment_amount }} @@ -81,12 +81,12 @@ 配送信息 配送方式 - - 商家自配 + 商家自配 + 客户自提 预计配送时间 - + {{ orderInfo.estimated_delivery_time }} diff --git a/packages/shop/addAddress/index.vue b/packages/shop/addAddress/index.vue index 5de17a5d..0d3f3f5d 100644 --- a/packages/shop/addAddress/index.vue +++ b/packages/shop/addAddress/index.vue @@ -1,52 +1,52 @@ @@ -222,6 +222,7 @@ export default { }) return } + console.log("🚀 ~ headerSubmitClick ~ type:", this.type) if(this.type === 'edit') { const res = await request(apiArr2.updateAddress, "POST", { user_id: this.id, diff --git a/packages/shop/address/index.vue b/packages/shop/address/index.vue index 48abeba4..a9accaca 100644 --- a/packages/shop/address/index.vue +++ b/packages/shop/address/index.vue @@ -1,44 +1,44 @@ @@ -104,7 +104,7 @@ export default { }, async init() { - const res = await request(apiArr.addressList, 'POST', {}); + const res = await request(apiArr.addAddressList, 'POST', {}); this.list = res.address_list; } }, diff --git a/packages/shop/goods/index.vue b/packages/shop/goods/index.vue index 98da40fd..4863d125 100644 --- a/packages/shop/goods/index.vue +++ b/packages/shop/goods/index.vue @@ -7,9 +7,9 @@ - - - 当日达 + + + 当日达 @@ -44,7 +44,10 @@ -
当日达
{{ currentGG.goods_name }}
+ + 当日达 + {{ currentGG.goods_name }} + {{ currentGG.commodity_brief }} @@ -170,28 +173,29 @@
+ !info.commodity_goods_info_list[currentGGIndex].cart_count || + info.commodity_goods_info_list[currentGGIndex].cart_count.count == 0 + " @click="addCar"> 加入购物车 - - - + + + - - {{info.commodity_goods_info_list[currentGGIndex].cart_count.count}} - - < - - - + + {{ info.commodity_goods_info_list[currentGGIndex].cart_count.count }} + + + + + @@ -276,15 +280,20 @@ - + 取消 - 当日达 + + 当日达 + - 当日达{{ changeName }} + + 当日达{{ changeName }} + ¥{{ changePrice }}/袋 @@ -297,343 +306,343 @@ \ No newline at end of file diff --git a/packages/shop/groupPurchase/index.vue b/packages/shop/groupPurchase/index.vue index 8d993a6b..0b7771a9 100644 --- a/packages/shop/groupPurchase/index.vue +++ b/packages/shop/groupPurchase/index.vue @@ -10,7 +10,7 @@ m