From 7b57af13c99bfdc61ff883067deddfed746f1118 Mon Sep 17 00:00:00 2001
From: gukai <1522776404@qq.com>
Date: Tue, 4 Mar 2025 09:34:48 +0800
Subject: [PATCH] 1
---
api/modules/common.js | 16 +
pages/takeaway/compontents/page-sku.vue | 13 +-
pages/takeaway/index - 副本 (2).vue | 792 ++++++++++++++++++++
pages/takeaway/index - 副本.vue | 777 +++++++++++++++++++
pages/takeaway/index.vue | 562 +++++++++-----
pages/takeaway/orderAndSettlement/index.vue | 9 +-
static/image/bixuan.png | Bin 0 -> 2604 bytes
7 files changed, 1968 insertions(+), 201 deletions(-)
create mode 100644 pages/takeaway/index - 副本 (2).vue
create mode 100644 pages/takeaway/index - 副本.vue
create mode 100644 static/image/bixuan.png
diff --git a/api/modules/common.js b/api/modules/common.js
index d4e743e..5f12d44 100644
--- a/api/modules/common.js
+++ b/api/modules/common.js
@@ -206,6 +206,14 @@ export default {
needLogin: true,
});
},
+ getFootCatAll(data) {
+ return request({
+ url: "/common/getFootCatAll",
+ method: "GET",
+ data,
+ needLogin: true,
+ });
+ },
getFootGoods(data) {
return request({
url: "/common/getFootGoods",
@@ -262,4 +270,12 @@ export default {
needLogin: true,
});
},
+ getRen(data = {}) {
+ return request({
+ url: "/common/getRen",
+ method: "POST",
+ data,
+ needLogin: true,
+ });
+ },
};
\ No newline at end of file
diff --git a/pages/takeaway/compontents/page-sku.vue b/pages/takeaway/compontents/page-sku.vue
index b509d61..33b28f7 100644
--- a/pages/takeaway/compontents/page-sku.vue
+++ b/pages/takeaway/compontents/page-sku.vue
@@ -1,5 +1,6 @@
-
+
@@ -307,7 +308,7 @@ export default {
}
this.checkItem();
await this.$nextTick()
- if (this.goods.goods_sku && this.goods.goods_sku.length == 1 && this.goods.small_goods.length == 0) {
+ if (this.goods.goods_sku && this.goods.goods_sku.length == 1 && (!this.goods.small_goods || this.goods.small_goods.length == 0)) {
this.submit(1)
}
},
@@ -334,14 +335,12 @@ export default {
try {
const res = await this.$api.goods.cartEdit(params);
uni.hideLoading();
-
if (res.code) return uni.$u.toast(res.message);
uni.$u.toast("操作成功!");
this.skuPopData.showPop = false;
this.$refs.popup.close()
} catch (e) {
uni.hideLoading();
-
throw new Error(e);
}
},
@@ -351,15 +350,11 @@ export default {
activeGoodsInfo,
type
} = this.skuPopData;
-
if (!activeGoodsInfo) return uni.$u.toast("请完善规格!");
-
const [result, judge] = this.$refs?.smallMaterial?.check() || [[], true]
-
if (!judge) {
return
}
-
let {
id: goods_sku_id
} = activeGoodsInfo,
@@ -370,10 +365,8 @@ export default {
small_goods: result,
small_goods_json: JSON.stringify(result)
};
-
this.skuPopData.small_goods = result
this.skuPopData.small_goods_json = JSON.stringify(result)
-
type = 2
switch (type) {
case 0:
diff --git a/pages/takeaway/index - 副本 (2).vue b/pages/takeaway/index - 副本 (2).vue
new file mode 100644
index 0000000..fbc0a10
--- /dev/null
+++ b/pages/takeaway/index - 副本 (2).vue
@@ -0,0 +1,792 @@
+
+
+
+
+
+
+
+
+
+ 桌号:{{ table.number }}
+
+
+
+
+
+
+
+
+ {{ mch.name }}
+
+
+
+
+
+
+
+
+ {{ items.join('-') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 下滑加载上一分类
+
+
+
+
+
+
+ {{ cat_list[cat_index].name }}
+
+
+
+
+
+
+
+ {{ item.goods_info.name }}
+
+ ¥{{ item.goods_info.price_min }}起
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ bottom_scoll_px < 200 ? '上滑加载下一分类' : '释放加载下一分类' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ goodsArr.reduce((sum, item) => sum + (item.num - 0), 0) }}
+
+
+
+
+ ¥{{ totalPrice }}
+
+
+
+ 去下单
+
+
+
+
+
+ 购物车({{ goodsArr.reduce((sum, item) => sum + (item.num - 0), 0) }})
+
+
+
+
+
+
+
+
+
+ {{ item.goods.name }}
+
+
+
+
+
+ {{ sku.group_name }}:{{ sku.name }}
+
+
+
+
+
+
+
+ {{ sitem.name }}
+
+
+ {{ sitem.price }} 元
+
+
+
+
+
+
+ ¥{{ item.activeGoodsInfo.price }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 请选择人数
+
+
+
+
+ {{ index + (ren_setting.min_num - 0) }}人
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/takeaway/index - 副本.vue b/pages/takeaway/index - 副本.vue
new file mode 100644
index 0000000..9f6a00d
--- /dev/null
+++ b/pages/takeaway/index - 副本.vue
@@ -0,0 +1,777 @@
+
+
+
+
+
+
+
+
+
+ 桌号:{{ table.number }}
+
+
+
+
+
+
+
+
+ {{ mch.name }}
+
+
+
+
+
+
+
+
+ {{ items.join('-') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 下滑加载上一分类
+
+
+
+
+
+
+ {{ cat_list[cat_index].name }}
+
+
+
+
+
+
+
+ {{ item.goods_info.name }}
+
+ ¥{{ item.goods_info.price_min }}起
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ bottom_scoll_px < 200 ? '上滑加载下一分类' : '释放加载下一分类' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ goodsArr.reduce((sum, item) => sum + (item.num - 0), 0) }}
+
+
+
+
+ ¥{{ totalPrice }}
+
+
+
+ 去下单
+
+
+
+
+
+ 购物车({{ goodsArr.reduce((sum, item) => sum + (item.num - 0), 0) }})
+
+
+
+
+
+
+
+
+
+ {{ item.goods.name }}
+
+
+
+
+
+ {{ sku.group_name }}:{{ sku.name }}
+
+
+
+
+
+
+
+ {{ sitem.name }}
+
+
+ {{ sitem.price }} 元
+
+
+
+
+
+
+ ¥{{ item.activeGoodsInfo.price }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 请选择人数
+
+
+
+
+ {{ index + (ren_setting.min_num - 0) }}人
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/takeaway/index.vue b/pages/takeaway/index.vue
index e1547fb..3002273 100644
--- a/pages/takeaway/index.vue
+++ b/pages/takeaway/index.vue
@@ -1,185 +1,234 @@
-
-
-
-
- {{ mch.name }}
-
+
+
+
+
+
-
-
+
+ 桌号:{{ table.number }}
-
+
+ {{ mch.name }}
+
+
+
+
+
+
+
+
+ {{ items.join('-') }}
+
+
-
- 桌号:{{ table.number }}
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
-
- {{ item.name }}
+
+
+
+
-
-
+
+
-
-
-
-
- {{ cat_list[cat_index].name }}
-
-
-
-
+
+
+
+
+
+ {{ cat_item.name }}
-
-
- {{ item.goods_info.name }}
-
- ¥{{ item.goods_info.price_min }}起
-
+
+
+
-
-
-
+
+
+ {{ item.goods_info.name }}
+
+ ¥{{ item.goods_info.price_min }}
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- 加载更多
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
- {{ goodsArr.reduce((sum, item) => sum + (item.num - 0), 0) }}
-
-
-
-
- ¥{{ totalPrice }}
+
+
+
+
+
+
+
+
+
+ {{ goodsArr.reduce((sum, item) => sum + (item.num - 0), 0) }}
-
- 去下单
+
+ ¥{{ totalPrice }}
-
-
-
- 购物车({{ goodsArr.reduce((sum, item) => sum + (item.num - 0), 0) }})
-
-
-
-
-
-
-
-
-
- {{ item.goods.name }}
-
+
+ 去下单
+
+
+
+
+
+ 购物车({{ goodsArr.reduce((sum, item) => sum + (item.num - 0), 0) }})
+
+
+
+
+
+
+
+
+
+ {{ item.goods.name }}
-
-
-
- {{ sku.group_name }}:{{ sku.name }}
-
-
+
+
+
+
+ {{ sku.group_name }}:{{ sku.name }}
+
-
-
-
-
- {{ sitem.name }}
-
-
- {{ sitem.price }} 元
-
+
+
+
+
+
+ {{ sitem.name }}
+
+
+ {{ sitem.price }} 元
-
-
- ¥{{ item.activeGoodsInfo.price }}
-
-
+
+
+
+ ¥{{ item.activeGoodsInfo.price }}
+
-
+
+
+
+ :type="$utils.isInAliBrowser() || $utils.isInWeChatBrowser() ? 0 : 2" @isLogin="getCatList">
+
-
+
+
+
+
+ 请选择人数
+
+
+
+
+ {{ index + (ren_setting.min_num - 0) }}人
+
+
+
+
+