From 2148b1b0a0d6da8bdaab0f6ae439721a4a9397b4 Mon Sep 17 00:00:00 2001
From: lewis <604446095@qq.com>
Date: Thu, 14 Aug 2025 17:06:30 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=B4=E5=B8=AD?=
=?UTF-8?q?=E5=A5=97=E9=A4=90=E8=AF=A6=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/banquet/combo/dishes_combo.vue | 281 ++++++++++-------------
src/pages/banquet/hotel/detail.vue | 72 +++---
src/pages/tab/banquet/hotel.vue | 2 +-
3 files changed, 155 insertions(+), 200 deletions(-)
diff --git a/src/pages/banquet/combo/dishes_combo.vue b/src/pages/banquet/combo/dishes_combo.vue
index 8b571a9..4b2358f 100644
--- a/src/pages/banquet/combo/dishes_combo.vue
+++ b/src/pages/banquet/combo/dishes_combo.vue
@@ -1,178 +1,127 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ matchedItems_sc.name }} {{
- matchedItems_sc.tag_name }}
-
- 销量:{{ matchedItems_sc.sales }}
-
-
-
-
- 套餐介绍
-
-
- {{ matchedItems_sc.intro }}
-
-
-
-
-
-
- 冷菜系列
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查看详情
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ matchedItems_sc.name }}
+
+
+ {{ matchedItems_sc.intro }}
+
+
+
+
+
+
+
+ {{key}}
+
+
+
+
+
+
+
+
+
+ {{dishes.name}}
+
+
+ {{dishes.intro}}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/banquet/hotel/detail.vue b/src/pages/banquet/hotel/detail.vue
index 36c98ab..7c313d9 100644
--- a/src/pages/banquet/hotel/detail.vue
+++ b/src/pages/banquet/hotel/detail.vue
@@ -14,22 +14,17 @@
:radius="8" :round=false custom-class="margin-right-24" />
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
- 下单预定
-
@@ -49,16 +44,16 @@
-
-
@@ -82,8 +77,6 @@
diff --git a/src/pages/tab/banquet/hotel.vue b/src/pages/tab/banquet/hotel.vue
index 3a8dc8a..f479836 100644
--- a/src/pages/tab/banquet/hotel.vue
+++ b/src/pages/tab/banquet/hotel.vue
@@ -17,7 +17,7 @@
+ :round="false" custom-class="margin-right-24" />
From a2cee3bd945e8786d4bd135e6b3b532ead13c61a Mon Sep 17 00:00:00 2001
From: lewis <604446095@qq.com>
Date: Thu, 14 Aug 2025 17:58:57 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=B4=E5=B8=AD?=
=?UTF-8?q?=E5=A5=97=E9=A4=90=E8=AF=A6=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/banquet/combo/dishes_combo.vue | 42 +++---
src/pages/banquet/hotel/detail.vue | 163 ++++++++++++++---------
2 files changed, 123 insertions(+), 82 deletions(-)
diff --git a/src/pages/banquet/combo/dishes_combo.vue b/src/pages/banquet/combo/dishes_combo.vue
index 4b2358f..ab0045e 100644
--- a/src/pages/banquet/combo/dishes_combo.vue
+++ b/src/pages/banquet/combo/dishes_combo.vue
@@ -6,19 +6,19 @@
-
+
- {{ matchedItems_sc.name }}
+ {{ dishesDetail.name }}
- {{ matchedItems_sc.intro }}
+ {{ dishesDetail.intro }}
-
-
+
+
{{key}}
@@ -42,7 +42,7 @@
-
+
@@ -59,27 +59,36 @@
id: 0,
},
is_add: 0,
- matchedItems_sc: [],
+ dishesDetail: [],
imageList: [],
- matchedItems_sp: [],
};
},
onLoad(option) {
this.search.id = option.id;
this.is_add = option.is_add | 0;
- this.getCategoryList()
+ this.getDetail()
},
methods: {
- //点击详情
- dishesDetail(item) {
- uni.navigateTo({
- url: `/pages/banquet/combo/dishes?id=${item.id}&is_add=1`
- })
+ addCart() {
+ CommonApi.commonPost('/api/banquet/cart/add', {
+ server_user_id: this.dishesDetail.user_id,
+ dishes_id: this.dishesDetail.id,
+ number: 1,
+ buy_now: 1
+ }).catch((res) => {
+ if (res.code === 1) {
+ uni.navigateTo({
+ url: `/pages/banquet/combo/detail?id=${this.dishesDetail.user_id}&cart_ids=${res.data.cart_id}`
+ })
+ } else {
+ uni.$u.toast(res.msg);
+ }
+ });
},
- getCategoryList() {
+ getDetail() {
CommonApi.commonGet('/api/banquet/dishes/detail', this.search).catch((res) => {
if (res.code === 1) {
- this.matchedItems_sc = res.data;
+ this.dishesDetail = res.data;
res.data.images.forEach(item => {
this.imageList.push({
url: item,
@@ -117,6 +126,7 @@
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
}
+
.buy-button {
position: fixed;
bottom: 0;
diff --git a/src/pages/banquet/hotel/detail.vue b/src/pages/banquet/hotel/detail.vue
index 7c313d9..6e4560a 100644
--- a/src/pages/banquet/hotel/detail.vue
+++ b/src/pages/banquet/hotel/detail.vue
@@ -5,72 +5,72 @@
:safeAreaInsetTop="true" :placeholder="true" :fixed="true">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 下单预定
-
-
-
-
+
+
+
-
-
+
+
+
+
+
+ 酒店展示视频
+
+
+
+
+
+
+
+
+
+
+
+ 推荐酒席套餐
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 下单预定
+
+
+
+
+
+
@@ -108,6 +108,22 @@
url: `/pages/banquet/combo/dishes_combo?id=${id}&is_add=1`
});
},
+ addCart(id) {
+ CommonApi.commonPost('/api/banquet/cart/add', {
+ server_user_id: this.dishesQuery.server_user_id,
+ dishes_id: id,
+ number: 1,
+ buy_now: 1
+ }).catch((res) => {
+ if (res.code === 1) {
+ uni.navigateTo({
+ url: `/pages/banquet/combo/detail?id=${this.dishesQuery.server_user_id}&cart_ids=${res.data.cart_id}`
+ })
+ } else {
+ uni.$u.toast(res.msg);
+ }
+ });
+ },
getHotelDetail() {
UserApi.hotelDetailApi({ id: this.id }).catch((res) => {
if (res.code === 1) {
@@ -115,8 +131,7 @@
//轮播图是数组
this.imageList = res.data.certification.video ? [{
url: res.data.certification.video,
- title: '展示视频',
- poster: res.data.certification.video
+ title: '展示视频'
}] : [];
} else {
uni.$u.toast(res.msg);
@@ -149,3 +164,19 @@
}
});
+