parent
2148b1b0a0
commit
a2cee3bd94
@ -6,19 +6,19 @@
|
||||
<up-swiper v-if="imageList" height="420rpx" :list="imageList" indicator indicatorMode="dot" circular keyName="url"
|
||||
:autoplay="false"></up-swiper>
|
||||
<view class="price-wrap pl-[20rpx] text-[40rpx]">
|
||||
<wd-text :text="matchedItems_sc.price" color="#EF2B0D" mode="price" prefix="¥" />
|
||||
<wd-text :text="dishesDetail.price" color="#EF2B0D" mode="price" prefix="¥" />
|
||||
</view>
|
||||
<view class="bg-white px-[30rpx] py-[10rpx] intro-wrap mx-[24rpx]">
|
||||
<view class="color-black text-[30rpx] font-medium">
|
||||
{{ matchedItems_sc.name }}
|
||||
{{ dishesDetail.name }}
|
||||
</view>
|
||||
<view class="text-[#666666] text-[26rpx] mt-[10rpx]">
|
||||
{{ matchedItems_sc.intro }}
|
||||
{{ dishesDetail.intro }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-for="(item, key) in matchedItems_sc.package_config" class="m-[24rpx]">
|
||||
<view class="flex my-[20rpx]">
|
||||
<view v-for="(item, key) in dishesDetail.package_config" class="m-[24rpx]">
|
||||
<view class="u-flex my-[20rpx]">
|
||||
<up-line length="25%" color="#000" margin="0 20rpx 0 90rpx"></up-line>
|
||||
<view class="font-bold text-[30rpx]">
|
||||
{{key}}
|
||||
@ -42,7 +42,7 @@
|
||||
</view>
|
||||
<view v-if="is_add" style="height: 100rpx;"></view>
|
||||
<view v-if="is_add" class="buy-button">
|
||||
<up-button text="立即下单" type="primary"></up-button>
|
||||
<up-button text="立即下单" type="primary" @click="addCart"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -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) {
|
||||
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/dishes?id=${item.id}&is_add=1`
|
||||
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;
|
||||
|
@ -5,72 +5,72 @@
|
||||
:safeAreaInsetTop="true" :placeholder="true" :fixed="true">
|
||||
</up-navbar>
|
||||
|
||||
<wd-card type="rectangle">
|
||||
<up-cell-group :border="false">
|
||||
<view class="u-flex content-wrap">
|
||||
<view class="">
|
||||
<u-cell :border="false">
|
||||
<template #icon>
|
||||
<wd-img :width="120" :height="120" :src="hotel.certification?.public_image" :enable-preview="false"
|
||||
<wd-img width="275rpx" height="275rpx" :src="hotel.certification?.public_image" :enable-preview="false"
|
||||
:radius="8" :round=false custom-class="margin-right-24" />
|
||||
</template>
|
||||
<template #title>
|
||||
<view class="u-flex u-flex-column">
|
||||
<view class="my-[20rpx]">
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="font-bold text-[30rpx] title-align">
|
||||
<up-text size="32rpx" :text="`${hotel.certification?.public_name}`" customStyle="font-weight:bold">
|
||||
</up-text>
|
||||
</view>
|
||||
<view class="my-[20rpx]">
|
||||
<view class="text-[24rpx] title-align">
|
||||
<up-text :text="`${hotel.certification?.address}`" customStyle="font-size:24rpx">
|
||||
</up-text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
</up-cell-group>
|
||||
</wd-card>
|
||||
|
||||
<wd-card title="酒店展示视频" type="rectangle">
|
||||
<view class="content-wrap">
|
||||
<view class="pl-[20rpx] pt-[20rpx]">
|
||||
酒店展示视频
|
||||
</view>
|
||||
<view class="mt-[20rpx] mx-[20rpx]">
|
||||
<up-line color="#F2F2F2"></up-line>
|
||||
</view>
|
||||
<view class="p-[20rpx]">
|
||||
<up-swiper v-if="imageList" height="320rpx" :list="imageList" keyName="url" :autoplay="false"></up-swiper>
|
||||
</wd-card>
|
||||
|
||||
<wd-card title="推荐酒席套餐" type="rectangle">
|
||||
<up-cell-group :border="false">
|
||||
<view class="detail-box" v-for="(item, index) in dishesList" :key="index">
|
||||
<u-cell :border="false" @click="gotoDishesDetai(item.id)">
|
||||
<template #icon>
|
||||
<wd-img :width="100" :height="100" :src="item.images[0]" :enable-preview="false" :radius="8" :round=false
|
||||
custom-class="margin-right-24" />
|
||||
</template>
|
||||
<template #title>
|
||||
<view class="h-60 flex">
|
||||
<up-text size="32rpx" :text="`${item.name}`" :flex1="true" align="left" wordWrap="normal" :show="true"
|
||||
prefixIcon="" customStyle="font-weight:bold"
|
||||
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||
</up-text>
|
||||
</view>
|
||||
</template>
|
||||
<template #label>
|
||||
<view class="h-50 flex color-gray">
|
||||
</view>
|
||||
|
||||
<view class="content-wrap">
|
||||
<view class="pl-[20rpx] pt-[20rpx]">
|
||||
推荐酒席套餐
|
||||
</view>
|
||||
<view class="mt-[20rpx] mx-[20rpx]">
|
||||
<up-line color="#F2F2F2"></up-line>
|
||||
</view>
|
||||
<view class="p-[20rpx]">
|
||||
<view class="u-flex my-[20rpx]" v-for="(item, index) in dishesList" :key="index" @click="gotoDishesDetai(item.id)">
|
||||
<view class="">
|
||||
<wd-img width="270rpx" height="270rpx" :src="item.images[0]" :enable-preview="false" :radius="8" :round=false
|
||||
custom-class="margin-right-24" />
|
||||
</view>
|
||||
<view class="">
|
||||
<up-text size="32rpx" :text="`${item.name}`" :flex1="true" align="left" wordWrap="normal" :show="true"
|
||||
prefixIcon="" customStyle="font-weight:bold" iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;"
|
||||
lines="1" decoration="none">
|
||||
</up-text>
|
||||
<view class="h-50 u-flex color-gray">
|
||||
<up-text size="" :text="`${item.intro}`" :flex1="true" align="left" wordWrap="normal" :show="true"
|
||||
prefixIcon="" customStyle="font-size:24rpx"
|
||||
iconStyle="font-size:24rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||
iconStyle="font-size:24rpx;color:#59CB56;margin-right:10rpx;" lines="3" decoration="none">
|
||||
</up-text>
|
||||
</view>
|
||||
<view class="h-50 flex color-gray">
|
||||
<view class="h-50 u-flex color-gray">
|
||||
<wd-text :text="item.price" mode="price" type="error" prefix="¥" />
|
||||
</view>
|
||||
<view class="h-20 flex color-gray">
|
||||
<view class="h-20 u-flex color-gray">
|
||||
<wd-text size="24rpx" :text="item.line_price" mode="price" decoration="line-through" prefix="¥" />
|
||||
<view style="margin-top: -20rpx;">
|
||||
<wd-button size="small" @click="addCart(1)">下单预定</wd-button>
|
||||
<wd-button size="small" @click="addCart(item.id)" @click.stop>下单预定</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-cell>
|
||||
</view>
|
||||
</up-cell-group>
|
||||
</wd-card>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -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 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background: #F2F2F2;
|
||||
padding-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.content-wrap {
|
||||
margin: 24rpx;
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.title-align {
|
||||
height: 130rpx;
|
||||
line-height: 130rpx;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user