Merge branch 'main' of https://gitea.lihaink.cn/sjeam/caipu_uni
Some checks are pending
deploy / deploy (push) Waiting to run
Some checks are pending
deploy / deploy (push) Waiting to run
This commit is contained in:
commit
45ead1dd41
@ -1,178 +1,137 @@
|
|||||||
<style>
|
|
||||||
.img {
|
|
||||||
width: 100%;
|
|
||||||
height: 420rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<template>
|
<template>
|
||||||
<view class="fv-page flex-col" style="">
|
<view>
|
||||||
<up-navbar class="" style="" :autoBack="true" bgColor="#00000000" :fixed="true" titleColor="#595757FF"
|
<up-navbar class="" style="" :autoBack="true" bgColor="#00000000" :fixed="true" titleColor="#595757FF"
|
||||||
leftIconColor="#FFFFFFFF">
|
leftIconColor="#FFFFFFFF">
|
||||||
</up-navbar>
|
</up-navbar>
|
||||||
<up-swiper v-if="imageList" height="420rpx" :list="imageList" indicator indicatorMode="dot" circular
|
<up-swiper v-if="imageList" height="420rpx" :list="imageList" indicator indicatorMode="dot" circular keyName="url"
|
||||||
keyName="url" :autoplay="false"></up-swiper>
|
:autoplay="false"></up-swiper>
|
||||||
<wd-card type="rectangle">
|
<view class="price-wrap pl-[20rpx] text-[40rpx]">
|
||||||
|
<wd-text :text="dishesDetail.price" color="#EF2B0D" mode="price" prefix="¥" />
|
||||||
<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="¥" />
|
|
||||||
</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 }}
|
|
||||||
</view>
|
|
||||||
</wd-card>
|
|
||||||
|
|
||||||
|
|
||||||
<wd-card type="rectangle">
|
|
||||||
<view class="color-black font-size-32 text-center font-bold">
|
|
||||||
冷菜系列
|
|
||||||
</view>
|
|
||||||
<up-cell-group :border="false">
|
|
||||||
<view class="detail-box" style="border: none;padding: 0px;" 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>
|
</view>
|
||||||
|
<view class="bg-white px-[30rpx] py-[10rpx] intro-wrap mx-[24rpx]">
|
||||||
|
<view class="color-black text-[30rpx] font-medium">
|
||||||
|
{{ dishesDetail.name }}
|
||||||
|
</view>
|
||||||
|
<view class="text-[#666666] text-[26rpx] mt-[10rpx]">
|
||||||
|
{{ dishesDetail.intro }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<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}}
|
||||||
|
</view>
|
||||||
|
<up-line length="25%" color="#000" margin="0 90rpx 0 20rpx"></up-line>
|
||||||
|
</view>
|
||||||
|
<view class="u-flex bg-white p-[20rpx] rounded-[20rpx] my-[12rpx]" v-for="dishes in item">
|
||||||
|
<view class="">
|
||||||
|
<wd-img width="196rpx" height="196rpx" :src="dishes.images[0]" :enable-preview="false" :radius="8"
|
||||||
|
:round="false" custom-class="margin-right-24" />
|
||||||
|
</view>
|
||||||
|
<view class="u-flex u-flex-column">
|
||||||
|
<view class="font-bold text-[30rpx]">
|
||||||
|
{{dishes.name}}
|
||||||
|
</view>
|
||||||
|
<view class="text-[24rpx]">
|
||||||
|
{{dishes.intro}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="is_add" style="height: 100rpx;"></view>
|
||||||
|
<view v-if="is_add" class="buy-button">
|
||||||
|
<up-button text="立即下单" type="primary" @click="addCart"></up-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import {
|
||||||
defineComponent
|
|
||||||
} from "vue";
|
|
||||||
import {
|
|
||||||
CommonApi,
|
CommonApi,
|
||||||
UserApi
|
UserApi
|
||||||
} from "@/api";
|
} from "@/api";
|
||||||
import {
|
export default {
|
||||||
setToken,
|
data() {
|
||||||
getToken,
|
return {
|
||||||
isLogin
|
search: {
|
||||||
} from '@/utils/auth';
|
id: 0,
|
||||||
import {
|
},
|
||||||
image
|
is_add: 0,
|
||||||
} from "@/uni_modules/uview-plus/libs/function/test";
|
dishesDetail: [],
|
||||||
import {
|
imageList: [],
|
||||||
url
|
};
|
||||||
} from "inspector";
|
|
||||||
export default defineComponent({
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
search: {
|
|
||||||
id: 0,
|
|
||||||
},
|
|
||||||
is_add: 0, //是否显示购物车
|
|
||||||
matchedItems_sc: [],
|
|
||||||
imageList: [],
|
|
||||||
matchedItems_sp: [],
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
onLoad (option) {
|
onLoad(option) {
|
||||||
// console.log(option);
|
this.search.id = option.id;
|
||||||
this.search.id = option.id;
|
this.is_add = option.is_add | 0;
|
||||||
this.is_add = option.is_add | 0;
|
this.getDetail()
|
||||||
this.getCategoryList()
|
|
||||||
},
|
|
||||||
created () {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//点击详情
|
addCart() {
|
||||||
dishesDetail (item) {
|
CommonApi.commonPost('/api/banquet/cart/add', {
|
||||||
// console.log(item);
|
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({
|
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);
|
||||||
//列表分页
|
}
|
||||||
changeSP () {
|
});
|
||||||
// console.log(pageNo);
|
},
|
||||||
// this.search.page = pageNo;
|
getDetail() {
|
||||||
CommonApi.commonGet('/api/dishes/dishes', this.search).catch((res) => {
|
CommonApi.commonGet('/api/banquet/dishes/detail', this.search).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
this.matchedItems_sp = res.data;
|
this.dishesDetail = res.data;
|
||||||
// this.$refs.pagingRefSP?.complete(res.data);
|
res.data.images.forEach(item => {
|
||||||
} else {
|
this.imageList.push({
|
||||||
uni.$u.toast(res.msg);
|
url: item,
|
||||||
}
|
title: '',
|
||||||
});
|
poster: item
|
||||||
|
})
|
||||||
},
|
})
|
||||||
getCategoryList () {
|
} else {
|
||||||
CommonApi.commonGet('/api/banquet/dishes/detail', this.search).catch((res) => {
|
uni.$u.toast(res.msg);
|
||||||
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({
|
|
||||||
url: item,
|
|
||||||
title: '',
|
|
||||||
poster: item
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
|
||||||
// console.log(this.imageList)
|
|
||||||
} else {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
}
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
page {
|
||||||
|
background: #F2F2F2;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price-wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 75rpx;
|
||||||
|
margin: -75rpx 24rpx 0 24rpx;
|
||||||
|
border-top-left-radius: 20rpx;
|
||||||
|
border-top-right-radius: 20rpx;
|
||||||
|
background-color: rgba(255, 255, 255, 0.2);
|
||||||
|
backdrop-filter: blur(12rpx);
|
||||||
|
}
|
||||||
|
|
||||||
|
.intro-wrap {
|
||||||
|
min-height: 150rpx;
|
||||||
|
border-bottom-left-radius: 20rpx;
|
||||||
|
border-bottom-right-radius: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buy-button {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 3%;
|
||||||
|
width: 94%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -5,85 +5,78 @@
|
|||||||
:safeAreaInsetTop="true" :placeholder="true" :fixed="true">
|
:safeAreaInsetTop="true" :placeholder="true" :fixed="true">
|
||||||
</up-navbar>
|
</up-navbar>
|
||||||
|
|
||||||
<wd-card type="rectangle">
|
<view class="u-flex content-wrap">
|
||||||
<up-cell-group :border="false">
|
<view class="">
|
||||||
<view class="">
|
<wd-img width="275rpx" height="275rpx" :src="hotel.certification?.public_image" :enable-preview="false"
|
||||||
<u-cell :border="false">
|
:radius="8" :round=false custom-class="margin-right-24" />
|
||||||
<template #icon>
|
</view>
|
||||||
<wd-img :width="120" :height="120" :src="hotel.certification?.public_image" :enable-preview="false"
|
<view class="">
|
||||||
:radius="8" :round=false custom-class="margin-right-24" />
|
<view class="font-bold text-[30rpx] title-align">
|
||||||
</template>
|
<up-text size="32rpx" :text="`${hotel.certification?.public_name}`" customStyle="font-weight:bold">
|
||||||
<template #title>
|
</up-text>
|
||||||
<view class="h-60 flex">
|
|
||||||
<up-text size="32rpx" :text="`${hotel.certification?.public_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">
|
|
||||||
<up-text size="" :text="`${hotel.certification?.address}`" :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>
|
|
||||||
</view>
|
|
||||||
<wd-button size="small" @click="gotoDishesList(hotel.id)">下单预定</wd-button>
|
|
||||||
</template>
|
|
||||||
</u-cell>
|
|
||||||
</view>
|
</view>
|
||||||
</up-cell-group>
|
<view class="text-[24rpx] title-align">
|
||||||
</wd-card>
|
<up-text :text="`${hotel.certification?.address}`" customStyle="font-size:24rpx">
|
||||||
|
</up-text>
|
||||||
<wd-card title="酒店展示视频" type="rectangle">
|
|
||||||
<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">
|
|
||||||
<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>
|
|
||||||
</view>
|
|
||||||
<view class="h-50 flex color-gray">
|
|
||||||
<wd-text :text="item.price" mode="price" type="error" prefix="¥" />
|
|
||||||
</view>
|
|
||||||
<view class="h-20 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>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</u-cell>
|
|
||||||
</view>
|
</view>
|
||||||
</up-cell-group>
|
</view>
|
||||||
</wd-card>
|
</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]">
|
||||||
|
<up-swiper v-if="imageList" height="320rpx" :list="imageList" keyName="url" :autoplay="false"></up-swiper>
|
||||||
|
</view>
|
||||||
|
</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="3" decoration="none">
|
||||||
|
</up-text>
|
||||||
|
</view>
|
||||||
|
<view class="h-50 u-flex color-gray">
|
||||||
|
<wd-text :text="item.price" mode="price" type="error" prefix="¥" />
|
||||||
|
</view>
|
||||||
|
<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(item.id)" @click.stop>下单预定</wd-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import { CommonApi, UserApi } from "@/api";
|
import { CommonApi, UserApi } from "@/api";
|
||||||
import { setToken, getToken, isLogin } from '@/utils/auth';
|
|
||||||
import { image } from "@/uni_modules/uview-plus/libs/function/test";
|
|
||||||
import { url } from "inspector";
|
import { url } from "inspector";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data() {
|
data() {
|
||||||
@ -92,28 +85,43 @@
|
|||||||
is_add: 0, //是否显示购物车
|
is_add: 0, //是否显示购物车
|
||||||
hotel: [],
|
hotel: [],
|
||||||
imageList: [],
|
imageList: [],
|
||||||
dishesList: []
|
dishesList: [],
|
||||||
|
dishesQuery: {
|
||||||
|
server_user_id: '',
|
||||||
|
type: 2,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
},
|
||||||
|
loadEnd: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
// console.log(option);
|
|
||||||
this.id = option.id;
|
this.id = option.id;
|
||||||
|
this.dishesQuery.server_user_id = option.id;
|
||||||
this.is_add = option.is_add | 0;
|
this.is_add = option.is_add | 0;
|
||||||
this.getHotelDetail()
|
this.getHotelDetail()
|
||||||
this.getDishesList()
|
this.getDishesList()
|
||||||
},
|
|
||||||
created() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gotoDishesList(id : number) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/banquet/hotel/detail?id=${id}&is_add=1`
|
|
||||||
});
|
|
||||||
},
|
|
||||||
gotoDishesDetai(id) {
|
gotoDishesDetai(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/banquet/hotel/detail?id=${id}&is_add=1`
|
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() {
|
getHotelDetail() {
|
||||||
@ -123,8 +131,7 @@
|
|||||||
//轮播图是数组
|
//轮播图是数组
|
||||||
this.imageList = res.data.certification.video ? [{
|
this.imageList = res.data.certification.video ? [{
|
||||||
url: res.data.certification.video,
|
url: res.data.certification.video,
|
||||||
title: '展示视频',
|
title: '展示视频'
|
||||||
poster: res.data.certification.video
|
|
||||||
}] : [];
|
}] : [];
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
@ -132,14 +139,44 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDishesList() {
|
getDishesList() {
|
||||||
UserApi.dishesListApi({ server_user_id: this.id, type: 2 }).catch((res) => {
|
UserApi.dishesListApi(this.dishesQuery).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
this.dishesList = res.data
|
if (this.dishesQuery.page == 1) {
|
||||||
|
this.dishesList = res.data
|
||||||
|
} else {
|
||||||
|
this.dishesList.push(...res.data)
|
||||||
|
}
|
||||||
|
if (res.data.length < this.dishesQuery.limit) {
|
||||||
|
this.loadEnd = true
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.loadEnd) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dishesQuery.page++
|
||||||
|
this.getDishesList()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</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>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<view v-else class="detail-box u-flex" v-for="(item, index) in hotelList" :key="index" @click="goto(item.id)">
|
<view v-else class="detail-box u-flex" v-for="(item, index) in hotelList" :key="index" @click="goto(item.id)">
|
||||||
<view class="">
|
<view class="">
|
||||||
<wd-img :width="100" :height="100" :src="item.certification.public_image" :enable-preview="false" :radius="8"
|
<wd-img :width="100" :height="100" :src="item.certification.public_image" :enable-preview="false" :radius="8"
|
||||||
:round=false custom-class="margin-right-24" />
|
:round="false" custom-class="margin-right-24" />
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-flex-column">
|
<view class="u-flex u-flex-column">
|
||||||
<up-text size="32rpx" :text="`${item.certification.public_name}`" customStyle="font-weight:bold"></up-text>
|
<up-text size="32rpx" :text="`${item.certification.public_name}`" customStyle="font-weight:bold"></up-text>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user