菜品详情
Some checks are pending
deploy / deploy (push) Waiting to run

This commit is contained in:
sjeam 2025-08-14 14:04:26 +08:00
parent b31d1107b5
commit 5972ef1248
2 changed files with 7 additions and 6 deletions

View File

@ -16,7 +16,7 @@
<wd-text :text="matchedItems_sc.price" mode="price" type="error" prefix="¥" /> <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>
<view class="pt-2 color-black "> {{matchedItems_sc.name}} <wd-tag custom-class="space" type="primary">{{matchedItems_sc.dishesCategory.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"> <view class="pt-2 color-coolgray font-size-24">
销量{{matchedItems_sc.sales}} 销量{{matchedItems_sc.sales}}
</view> </view>
@ -91,8 +91,8 @@
CommonApi.commonGet('/api/banquet/dishes/detail', this.search).catch((res) => { CommonApi.commonGet('/api/banquet/dishes/detail', this.search).catch((res) => {
if (res.code === 1) { if (res.code === 1) {
this.matchedItems_sc = res.data; this.matchedItems_sc = res.data;
this.matchedItems_sc.tag_name = res.data.dishesCategory.name;
console.log(res.data.images) // console.log(res.data.images)
res.data.images.forEach(item => { res.data.images.forEach(item => {
this.imageList.push({ this.imageList.push({
url: item, url: item,

View File

@ -16,7 +16,7 @@
<wd-text :text="matchedItems_sc.price" mode="price" type="error" prefix="¥" /> <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>
<view class="pt-2 color-black "> {{matchedItems_sc.name}} <wd-tag custom-class="space" type="primary">{{matchedItems_sc.dishesCategory.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"> <view class="pt-2 color-coolgray font-size-24">
销量{{matchedItems_sc.sales}} 销量{{matchedItems_sc.sales}}
</view> </view>
@ -91,14 +91,15 @@
CommonApi.commonGet('/api/banquet/dishes/detail', this.search).catch((res) => { CommonApi.commonGet('/api/banquet/dishes/detail', this.search).catch((res) => {
if (res.code === 1) { if (res.code === 1) {
this.matchedItems_sc = res.data; this.matchedItems_sc = res.data;
this.matchedItems_sc.tag_name = res.data.dishesCategory.name;
console.log(res.data.images) // console.log(res.data.images)
res.data.images.forEach(item => { res.data.images.forEach(item => {
this.imageList.push({ this.imageList.push({
url: item, url: item,
title: '', title: '',
poster: item poster: item
}) })
}) })
// console.log(this.imageList) // console.log(this.imageList)
} else { } else {