套餐详情

This commit is contained in:
sjeam 2025-08-14 14:43:04 +08:00
parent 8ad7ee78ce
commit b7e21304b3
2 changed files with 148 additions and 75 deletions

View File

@ -9,21 +9,24 @@
<up-navbar class="" style="" :autoBack="true" bgColor="#00000000" :fixed="true" titleColor="#595757FF"
leftIconColor="#FFFFFFFF">
</up-navbar>
<up-swiper v-if="imageList" height="420rpx" :list="imageList" indicator indicatorMode="dot" circular keyName="url" :autoplay="false"></up-swiper>
<up-swiper v-if="imageList" height="420rpx" :list="imageList" indicator indicatorMode="dot" circular
keyName="url" :autoplay="false"></up-swiper>
<wd-card type="rectangle">
<view class="font-size-32 font-bold">
<wd-text :text="matchedItems_sc.price" mode="price" type="error" prefix="¥" />
<wd-text size="24rpx" :text="matchedItems_sc.line_price" mode="price" decoration="line-through" prefix="¥" />
<wd-text size="24rpx" :text="matchedItems_sc.line_price" mode="price" decoration="line-through"
prefix="¥" />
</view>
<view class="pt-2 color-black "> {{matchedItems_sc.name}} <wd-tag custom-class="space" type="primary">{{matchedItems_sc.tag_name}}</wd-tag></view>
<view class="pt-2 color-black "> {{ matchedItems_sc.name }} <wd-tag custom-class="space" type="primary">{{
matchedItems_sc.tag_name }}</wd-tag></view>
<view class="pt-2 color-coolgray font-size-24">
销量{{ matchedItems_sc.sales }}
</view>
</wd-card>
<wd-card type="rectangle">
<view class="color-black font-size-28 text-center">
菜品介绍
套餐介绍
</view>
<view class="color-coolgray font-size-24">
{{ matchedItems_sc.intro }}
@ -35,15 +38,62 @@
<view class="color-black font-size-28 text-center">
菜品展示
</view>
<wd-grid :column="1">
<!-- <wd-grid :column="1">
<view v-for="(item, index) in imageList">
<wd-grid-item use-slot>
<image class="img" :src="item.url" />
</wd-grid-item>
</view>
</wd-grid>
</wd-grid> -->
<up-cell-group :border="false">
<view class="detail-box" v-for="(item, index) in matchedItems_sp" :key="index">
<u-cell :border="false" @click="dishesDetail(item)">
<template #icon>
<wd-img :width="100" :height="100" :src="item.image" :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>
<!-- <u-icon slot="right" label-color="red" :label="`¥2000.00元`"></u-icon> -->
</view>
</template>
<template #label>
<view class="h-50 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">
</up-text>
<!-- <u-icon slot="right" label-color="red" :label="`X30`"></u-icon> -->
</view>
<view class="h-50 flex color-gray">
<wd-text text="16354.156" mode="price" type="error" prefix="¥" />
</view>
<view class="h-20 flex color-gray">
<wd-text size="24rpx" text="16354.156" mode="price" decoration="line-through"
prefix="¥" />
<view style="margin-top: -20rpx;">
<wd-button size="small" @click.stop="dishesDetail(item)">查看详情</wd-button>
</view>
</view>
</template>
</u-cell>
</view>
</up-cell-group>
</wd-card>
</view>
</template>
@ -75,6 +125,7 @@
is_add: 0, //
matchedItems_sc: [],
imageList: [],
matchedItems_sp: [],
};
},
onLoad (option) {
@ -87,11 +138,34 @@
},
methods: {
//
dishesDetail (item) {
// console.log(item);
uni.navigateTo({
url: `/pages/banquet/combo/dishes?id=${item.id}&is_add=1`
});
},
//
changeSP () {
// console.log(pageNo);
// this.search.page = pageNo;
CommonApi.commonGet('/api/dishes/dishes', this.search).catch((res) => {
if (res.code === 1) {
this.matchedItems_sp = res.data;
// this.$refs.pagingRefSP?.complete(res.data);
} else {
uni.$u.toast(res.msg);
}
});
},
getCategoryList () {
CommonApi.commonGet('/api/banquet/dishes/detail', this.search).catch((res) => {
if (res.code === 1) {
this.matchedItems_sc = res.data;
this.matchedItems_sc.tag_name = res.data.dishesCategory.name;
this.changeSP()
// console.log(res.data.images)
res.data.images.forEach(item => {
this.imageList.push({

View File

@ -81,7 +81,7 @@ body {
class="fv-page flex-col">
<view v-for="(item, index) in matchedItems_sp" :key="index">
<up-cell :border='false' @click="goodsDetail(item)">
<up-cell :border='false' @click="dishesDetail(item)">
<template #icon>
<up-image :src="item.image" width="140rpx" height="140rpx"></up-image>
</template>
@ -530,10 +530,9 @@ export default defineComponent({
},
//
goodsDetail (item) {
dishesDetail (item) {
console.log(item);
if (item.type === 1) {
uni.navigateTo({
url: `/pages/banquet/combo/dishes?id=${item.id}&is_add=1`
});