commit
f2d2b6dc68
@ -93,7 +93,27 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
},
|
},
|
||||||
"needLogin": true
|
"needLogin": true
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"path": "combo/dishes",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "菜品详情",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
},
|
||||||
|
"needLogin": true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"path": "combo/dishes_combo",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "菜品套餐",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
},
|
||||||
|
"needLogin": true
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -188,14 +208,14 @@
|
|||||||
"text": "首页"
|
"text": "首页"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"iconPath": "static/images/tabbar/shouye.png",
|
"iconPath": "static/images/tabbar/cook.png",
|
||||||
"selectedIconPath": "static/images/tabbar/shouye_selected.png",
|
"selectedIconPath": "static/images/tabbar/cook_selected.png",
|
||||||
"pagePath": "pages/tab/banquet/cook",
|
"pagePath": "pages/tab/banquet/cook",
|
||||||
"text": "选厨师"
|
"text": "选厨师"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"iconPath": "static/images/tabbar/bofang.png",
|
"iconPath": "static/images/tabbar/hotel.png",
|
||||||
"selectedIconPath": "static/images/tabbar/bofang_selected.png",
|
"selectedIconPath": "static/images/tabbar/hotel_selected.png",
|
||||||
"pagePath": "pages/tab/banquet/hotel",
|
"pagePath": "pages/tab/banquet/hotel",
|
||||||
"text": "选酒店"
|
"text": "选酒店"
|
||||||
},
|
},
|
||||||
|
@ -110,22 +110,21 @@
|
|||||||
:round=false custom-class="margin-right-24" />
|
:round=false custom-class="margin-right-24" />
|
||||||
</template>
|
</template>
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="h-60 flex">
|
<view class="h-60 flex font-bold">
|
||||||
<up-text size="28rpx" :text="`${item.dishes.name}`" :flex1="true" align="left" wordWrap="normal"
|
<up-text size="28rpx" :text="`${item.dishes.name}`" :flex1="true" align="left" wordWrap="normal"
|
||||||
:show="true" prefixIcon="" customStyle="font-weight:bold"
|
:show="true" prefixIcon="" customStyle="font-weight:bold"
|
||||||
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
<u-icon slot="right" label-color="red" :label="`¥${item.dishes.price}元`"></u-icon>
|
<u-icon slot="right" label-color="#fa4e62" :label="`¥${item.dishes.price}元`"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template #label>
|
<template #label>
|
||||||
<view class="h-60 flex color-gray">
|
<view class="h-60 flex color-gray ">
|
||||||
|
|
||||||
<up-text size="26rpx" :text="`${item.dishes.intro}`" :flex1="true" align="left" wordWrap="normal"
|
<up-text size="26rpx" :text="`${item.dishes.intro}`" :flex1="true" align="left" wordWrap="normal"
|
||||||
:show="true" prefixIcon="" customStyle=""
|
:show="true" prefixIcon="" customStyle=""
|
||||||
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||||
</up-text>
|
</up-text>
|
||||||
<u-icon slot="right" label-color="red" :label="`X${item.number}`"></u-icon>
|
<u-icon slot="right" label-color="#fa4e62" :label="`X${item.number}`"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</u-cell>
|
</u-cell>
|
||||||
@ -147,8 +146,8 @@
|
|||||||
<template #title>
|
<template #title>
|
||||||
<view class="title font-size-32">
|
<view class="title font-size-32">
|
||||||
<view>费用合计:</view>
|
<view>费用合计:</view>
|
||||||
<view class="title-tip">
|
<view class="title-tip ">
|
||||||
<text class="font-size-32 color-red ">¥{{ totalPrice }}元</text>
|
<text class="font-size-32 font-bold color-red" >¥{{ totalPrice }}元</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -158,7 +157,7 @@
|
|||||||
<view>厨师姓名:{{ server_user.public_name }}</view>
|
<view>厨师姓名:{{ server_user.public_name }}</view>
|
||||||
<view>厨师联系方式:{{ server_user.phone }}</view>
|
<view>厨师联系方式:{{ server_user.phone }}</view>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<wd-button size="small" plain>查看详情</wd-button>
|
<!-- <wd-button size="small" plain>查看详情</wd-button> -->
|
||||||
</template>
|
</template>
|
||||||
</wd-card>
|
</wd-card>
|
||||||
|
|
||||||
@ -216,8 +215,6 @@
|
|||||||
}
|
}
|
||||||
]"></wd-col-picker>
|
]"></wd-col-picker>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<wd-input label="详细地址" prop="street_name" clearable v-model="orderInfo.street_name" placeholder="请填写详细地址"
|
<wd-input label="详细地址" prop="street_name" clearable v-model="orderInfo.street_name" placeholder="请填写详细地址"
|
||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
|
114
src/pages/banquet/combo/dishes.vue
Normal file
114
src/pages/banquet/combo/dishes.vue
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<style>
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
height: 420rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<template>
|
||||||
|
<view class="fv-page flex-col" style="">
|
||||||
|
<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>
|
||||||
|
<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="¥" />
|
||||||
|
</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-28 text-center">
|
||||||
|
菜品展示
|
||||||
|
</view>
|
||||||
|
<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-card>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import {
|
||||||
|
defineComponent
|
||||||
|
} from "vue";
|
||||||
|
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";
|
||||||
|
export default defineComponent({
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
is_add: 0, //是否显示购物车
|
||||||
|
matchedItems_sc: [],
|
||||||
|
imageList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
// console.log(option);
|
||||||
|
this.search.id = option.id;
|
||||||
|
this.is_add = option.is_add | 0;
|
||||||
|
this.getCategoryList()
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
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;
|
||||||
|
// 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>
|
114
src/pages/banquet/combo/dishes_combo.vue
Normal file
114
src/pages/banquet/combo/dishes_combo.vue
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<style>
|
||||||
|
.img {
|
||||||
|
width: 100%;
|
||||||
|
height: 420rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<template>
|
||||||
|
<view class="fv-page flex-col" style="">
|
||||||
|
<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>
|
||||||
|
<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="¥" />
|
||||||
|
</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-28 text-center">
|
||||||
|
菜品展示
|
||||||
|
</view>
|
||||||
|
<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-card>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import {
|
||||||
|
defineComponent
|
||||||
|
} from "vue";
|
||||||
|
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";
|
||||||
|
export default defineComponent({
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
id: 0,
|
||||||
|
},
|
||||||
|
is_add: 0, //是否显示购物车
|
||||||
|
matchedItems_sc: [],
|
||||||
|
imageList: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
// console.log(option);
|
||||||
|
this.search.id = option.id;
|
||||||
|
this.is_add = option.is_add | 0;
|
||||||
|
this.getCategoryList()
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
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;
|
||||||
|
// 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>
|
@ -81,7 +81,7 @@ body {
|
|||||||
class="fv-page flex-col">
|
class="fv-page flex-col">
|
||||||
|
|
||||||
<view v-for="(item, index) in matchedItems_sp" :key="index">
|
<view v-for="(item, index) in matchedItems_sp" :key="index">
|
||||||
<up-cell :border='false' @click="goodsDetail(item.id)">
|
<up-cell :border='false' @click="goodsDetail(item)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<up-image :src="item.image" width="140rpx" height="140rpx"></up-image>
|
<up-image :src="item.image" width="140rpx" height="140rpx"></up-image>
|
||||||
</template>
|
</template>
|
||||||
@ -134,7 +134,7 @@ body {
|
|||||||
</wd-fab> -->
|
</wd-fab> -->
|
||||||
<view class="flex-sub box-border flex" style="bottom: 10rpx;padding: 10rpx;">
|
<view class="flex-sub box-border flex" style="bottom: 10rpx;padding: 10rpx;">
|
||||||
<view style="width:calc(100vw - 180rpx); margin: 0rpx 0rpx 0rpx 20rpx;" width="">
|
<view style="width:calc(100vw - 180rpx); margin: 0rpx 0rpx 0rpx 20rpx;" width="">
|
||||||
<text>已选{{ this.set_num }}餐,合计<text color-red>¥{{ totalPrice }}元</text></text>
|
<text>已选{{ this.set_num }}餐,合计<text class="color-red font-bold">¥{{ totalPrice }}元</text></text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<up-button class="" style="" text="选好了" type="primary" color="#59CB56" shape="circle" size="small"
|
<up-button class="" style="" text="选好了" type="primary" color="#59CB56" shape="circle" size="small"
|
||||||
@ -530,11 +530,19 @@ export default defineComponent({
|
|||||||
|
|
||||||
},
|
},
|
||||||
//点击详情
|
//点击详情
|
||||||
goodsDetail (id: number) {
|
goodsDetail (item) {
|
||||||
// console.log(id);
|
console.log(item);
|
||||||
uni.navigateTo({
|
if (item.type === 1) {
|
||||||
url: `/pages/common/goods/detail?id=${id}&is_add=1`
|
|
||||||
});
|
uni.navigateTo({
|
||||||
|
url: `/pages/banquet/combo/dishes?id=${item.id}&is_add=1`
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/banquet/combo/dishes_combo?id=${item.id}&is_add=1`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//加入购物车
|
//加入购物车
|
||||||
|
@ -156,20 +156,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// //列表分页
|
|
||||||
// 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);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// },
|
|
||||||
//加入购物车
|
//加入购物车
|
||||||
addCart (id) {
|
addCart (id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -1,205 +1,398 @@
|
|||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
.ellipsis {
|
.custom-count-down {
|
||||||
white-space: nowrap;
|
display: inline-block;
|
||||||
/* 防止文字换行 */
|
width: 22px;
|
||||||
overflow: hidden;
|
color: #ff3232;
|
||||||
/* 隐藏超出部分的文字 */
|
font-size: 12px;
|
||||||
text-overflow: ellipsis;
|
text-align: center;
|
||||||
/* 在末尾显示省略号 */
|
background-color: #ff404021;
|
||||||
// width: 260rpx!important;
|
border-radius: 2px;
|
||||||
width: calc(100vw - 80rpx) !important;
|
|
||||||
/* 确保元素有宽度 */
|
|
||||||
}
|
|
||||||
.ellipsis_text {
|
|
||||||
// width: 340rpx !important;
|
|
||||||
// width: calc(100vw - 80rpx)!important;
|
|
||||||
}
|
|
||||||
.zp-l-text-rpx {
|
|
||||||
display: none !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html,
|
.custom-count-down-colon {
|
||||||
body {
|
display: inline-block;
|
||||||
height: 0px;
|
margin: 0 4px;
|
||||||
|
color: #ff4040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-icon {
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 4px;
|
||||||
|
background: url('https://img10.360buyimg.com/jmadvertisement/jfs/t1/71075/7/3762/1820/5d1f26d1E0d600b9e/a264c901943080ac.png') no-repeat;
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<up-navbar class=" " style="font-weight: bold;" leftIcon="" title="食谱菜单" titleColor="#303133" bgColor="#FFFFFFFF"
|
<up-navbar :autoBack="true" style="font-weight: bold;" leftIcon="arrow-left" :title="`订单详情`" titleColor="#303133"
|
||||||
titleWidth="600rpx" height="80rpx" leftIconSize="40rpx" leftIconColor="#303133" :safeAreaInsetTop="true"
|
bgColor="#FFFFFFFF" titleWidth="600rpx" height="80rpx" leftIconSize="40rpx" leftIconColor="#303133"
|
||||||
:placeholder="true" :fixed="true"></up-navbar>
|
:safeAreaInsetTop="true" :placeholder="true" :fixed="true">
|
||||||
<up-search v-model="search.keyword" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2"
|
</up-navbar>
|
||||||
placeholder="输入食谱" :clearabled="true" :showAction="false" inputAlign="left" borderColor="transparent"
|
|
||||||
searchIconColor="#909399" color="#606266" placeholderColor="#909399" searchIcon="search" margin="10rpx"
|
<u-popup :show="propShowOrder" :round="10" mode="bottom" @close="close" customStyle="height:800rpx;">
|
||||||
maxlength="-1" height="60rpx" @change="searchSP()">
|
|
||||||
</up-search>
|
<wd-cell-group border>
|
||||||
<u-scroll-list :indicator="false">
|
<view style="padding: 20rpx;">
|
||||||
<view class="scroll-list" style="flex-direction: row;width: 56px;">
|
<u-cell class="" style="line-height: 60rpx;" :border="true">
|
||||||
<view class="scroll-list__goods-item " v-for="(item, index) in categoryList" :key="index"
|
<template #title>
|
||||||
:class="(index === categoryIndex) ? 'row-active' : ''" @click="handleClickCategory(index)"
|
<view class="h-50 p-2 align-center font-blod" @click="close">
|
||||||
:style="{ backgroundColor: item.bgColor }">
|
支付金额 <wd-text size="36rpx" bold text="16354.156" mode="price" type="error" prefix="¥" suffix="元" />
|
||||||
<image class="scroll-list__goods-item__image"
|
</view>
|
||||||
:src="item.image ? item.image : 'https://s3.bmp.ovh/imgs/2024/12/16/35bc6d28ab1c8bc7.png'"
|
<view class="h-50 p-2 align-center">
|
||||||
:class="(index === categoryIndex) ? 'border-row-active' : ''"></image>
|
剩余时间
|
||||||
<text class="scroll-list__goods-item__text">{{ item.name }}</text>
|
<view style="display: inline-block;">
|
||||||
|
<wd-count-down :time="(30 * 60 * 60 * 1000)">
|
||||||
|
<template #default="{ current }">
|
||||||
|
<span class="custom-count-down">{{ current.hours > 10 ? current.hours : '0' + current.hours
|
||||||
|
}}</span>
|
||||||
|
<span class="custom-count-down-colon">:</span>
|
||||||
|
<span class="custom-count-down">{{ current.minutes }}</span>
|
||||||
|
<span class="custom-count-down-colon">:</span>
|
||||||
|
<span class="custom-count-down">{{ current.seconds }}</span>
|
||||||
|
</template>
|
||||||
|
</wd-count-down>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</u-cell>
|
||||||
|
|
||||||
|
<u-radio-group v-model="value">
|
||||||
|
<view class="h-60 flex" style="width: 100%; padding: 20rpx;">
|
||||||
|
<up-text size="36rpx" :text="`微信支付`" :flex1="true" align="left" wordWrap="normal" :show="true"
|
||||||
|
prefixIcon="weixin-fill" customStyle="font-weight:bold"
|
||||||
|
iconStyle="font-size:64rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||||
|
</up-text>
|
||||||
|
<!-- <u-icon size="48rpx" slot="right" label-color="red" :label="`¥2000.00元`"></u-icon> -->
|
||||||
|
<view style="display: inline-block; float:right">
|
||||||
|
<u-radio iconSize="36rpx" size="36rpx" activeColor="#59CB56" label=""></u-radio>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</u-radio-group>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="prop-flex-bottom">
|
||||||
</u-scroll-list>
|
<up-button class="" style="" text="确认支付" type="primary" color="#59CB56" shape="circle" size="normal"
|
||||||
|
custom-style="width: calc(100vw - 100rpx);" @click="payOrder">
|
||||||
|
</up-button>
|
||||||
|
</view>
|
||||||
|
</wd-cell-group>
|
||||||
|
|
||||||
|
</u-popup>
|
||||||
|
<view v-for="(matchedItems, index) in matchedItems_sp" :key="index">
|
||||||
|
<wd-card>
|
||||||
|
<template #title>
|
||||||
|
<view class="title font-size-32 font-bold">
|
||||||
|
<view>第{{ parseInt(index) + 1 }}餐</view>
|
||||||
|
<view class="title-tip">
|
||||||
|
<!-- <text class="font-size-32 color-red font-bold ">¥213213.00元</text> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="title font-size-28 pt-4">
|
||||||
|
<view>做宴时段:{{ matchedItems[0].banquet_date }}</view>
|
||||||
|
<view class="title-tip font-size-28">
|
||||||
|
做宴时段:{{ matchedItems[0].banquet_time }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<view class="content ">
|
||||||
|
<up-cell-group :border="false">
|
||||||
|
<view class="detail-box" style="border: none;padding: 0px;" v-for="(item, index) in matchedItems"
|
||||||
|
:key="index">
|
||||||
|
<u-cell :border="false">
|
||||||
|
<template #icon>
|
||||||
|
<wd-img :width="60" :height="60" :src="item.dishes.images[0]" :enable-preview="true" :radius="8"
|
||||||
|
:round=false custom-class="margin-right-24" />
|
||||||
|
</template>
|
||||||
|
<template #title>
|
||||||
|
<view class="h-60 flex">
|
||||||
|
<up-text size="28rpx" :text="`${item.dishes.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="`¥${item.dishes.price}元`"></u-icon>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template #label>
|
||||||
|
<view class="h-60 flex color-gray">
|
||||||
|
|
||||||
<z-paging :fixed="false" height="calc(100vh - 440rpx)" width="200rpx" loading-more-default-text=""
|
<up-text size="26rpx" :text="`${item.dishes.intro}`" :flex1="true" align="left" wordWrap="normal"
|
||||||
style=" left:0; padding: 0px; position: fixed;" class="fv-page flex-col px-4">
|
:show="true" prefixIcon="" customStyle=""
|
||||||
<u-scroll-list :indicator="false">
|
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
||||||
<view class="scroll-list" style="flex-direction: column;">
|
</up-text>
|
||||||
<view class="scroll-list__goods-item-column " v-for="(item, index) in tabList" :key="index"
|
<u-icon slot="right" label-color="red" :label="`X${item.number}`"></u-icon>
|
||||||
:class="(index === childrenIndex) ? 'column-active' : ''" @click="handleChildrenClick(index)"
|
</view>
|
||||||
:style="{ backgroundColor: item.bgColor }">
|
</template>
|
||||||
<!-- <image class="scroll-list__goods-item__image" :src="item.image"></image> -->
|
</u-cell>
|
||||||
<slot name="tabItem">
|
</view>
|
||||||
</slot>
|
</up-cell-group>
|
||||||
<!-- <view style="padding: 20px 0px;"> </view> -->
|
|
||||||
<text class="scroll-list__goods-item__text">{{ item.name }}</text>
|
</view>
|
||||||
|
<!-- <template #footer>
|
||||||
|
<view>
|
||||||
|
<wd-button size="small" style="margin-right: 8px;">评价</wd-button>
|
||||||
|
<wd-button size="small" plain>立即使用</wd-button>
|
||||||
|
</view>
|
||||||
|
</template> -->
|
||||||
|
</wd-card>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<wd-card>
|
||||||
|
<template #title>
|
||||||
|
<view class="title font-size-32">
|
||||||
|
<view>费用合计:</view>
|
||||||
|
<view class="title-tip">
|
||||||
|
<text class="font-size-32 color-red ">¥{{ totalPrice }}元</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-scroll-list>
|
</template>
|
||||||
</z-paging>
|
</wd-card>
|
||||||
<z-paging ref="pagingRefSP" v-model="matchedItems_sp" @query="changeSP" :fixed="false" height="calc(100vh - 440rpx)"
|
|
||||||
width="calc(100vw - 200rpx)" style="right: 0; background-color: #FFFFFFFF; position: fixed;"
|
|
||||||
class="fv-page flex-col">
|
|
||||||
|
|
||||||
<view v-for="(item, index) in matchedItems_sp" :key="index">
|
<wd-card title="厨师信息">
|
||||||
<up-cell :border='false' @click="goodsDetail(item.id)">
|
<view>厨师姓名:{{ server_user.public_name }}</view>
|
||||||
<template #icon>
|
<view>厨师联系方式:{{ server_user.phone }}</view>
|
||||||
<up-image :src="item.image" width="140rpx" height="140rpx"></up-image>
|
<template #footer>
|
||||||
</template>
|
<wd-button size="small" plain @click="cookDetail( server_user.id)">查看详情</wd-button>
|
||||||
<template v-slot:title>
|
</template>
|
||||||
<view class="h-50 flex">
|
</wd-card>
|
||||||
<up-text size="28rpx" :text="`${item.name}`" :flex1="true" align="left"
|
|
||||||
wordWrap="normal" :show="true" prefixIcon=""
|
|
||||||
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
|
||||||
</up-text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="h-50 flex">
|
<wd-card>
|
||||||
<up-text color="#767676" size="24rpx" :text="`主料:${item.intro}`" :flex1="true"
|
<template #title>
|
||||||
align="left" wordWrap="normal" :show="true" prefixIcon=""
|
<!-- <u-alert :show-icon="true" title="温馨提示:请确认酒席需求" type="" effect="dark" description=" "></u-alert> -->
|
||||||
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
</template>
|
||||||
decoration="none">
|
<view>1.(不交定金)如若厨师接到更高价订单,可能会将您的订单取消。</view>
|
||||||
</up-text>
|
<view>2.(付定金)如若厨师的做席档期存在冲突,可能会致电与您沟通,并推荐您更换厨师。</view>
|
||||||
</view>
|
<view>3.如若档期冲突订单被厨师取消,定金将原路返回,请放心下单。</view>
|
||||||
<view class="h-50 flex ellipsis_text" >
|
<view>4.在此,感谢您对此平台以及厨师们的支持,您的支持就是我们前进的最大动力。</view>
|
||||||
<up-text color="#767676" size="24rpx" :text="`营养:${item.intro}`" :flex1="true"
|
|
||||||
align="left" wordWrap="normal" :show="true" prefixIcon=""
|
|
||||||
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
|
||||||
decoration="none">
|
|
||||||
</up-text>
|
|
||||||
<view @click.stop="addCart(item.id)">
|
|
||||||
<u-icon slot="right" label="" size="42rpx" name="plus-circle" color="#59CB56" labelColor="#59CB56"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</up-cell>
|
|
||||||
</view>
|
|
||||||
</z-paging>
|
|
||||||
|
|
||||||
|
<wd-form ref="form" :model="orderInfo" errorType="message">
|
||||||
|
<wd-cell-group border>
|
||||||
|
|
||||||
|
<view class="pb-4" />
|
||||||
|
<wd-input label="联系姓名" prop="customer_name" clearable v-model="orderInfo.customer_name" placeholder="请填写联系姓名"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: false,
|
||||||
|
validator: (value: string) => {
|
||||||
|
return /^[\u4e00-\u9fa5a-zA-Z0-9_]+$/.test(value)
|
||||||
|
},
|
||||||
|
message: '请输入姓名'
|
||||||
|
}
|
||||||
|
]" />
|
||||||
|
<wd-input label="联系电话" prop="phone" clearable v-model="orderInfo.phone" placeholder="请填写联系电话"
|
||||||
|
:rules="[{ required: false, pattern: /^1[3-9]\d{9}$/, message: '请输入有效手机号码' }]" />
|
||||||
|
|
||||||
|
<wd-select-picker label="宴席类型" prop="banquet_type" v-model="orderInfo.banquet_type" :columns="banquetType"
|
||||||
|
type="radio" :rules="[
|
||||||
|
{
|
||||||
|
required: false,
|
||||||
|
validator: (value: string) => {
|
||||||
|
return /^[\u4e00-\u9fa5a-zA-Z0-9_]+$/.test(value)
|
||||||
|
},
|
||||||
|
message: '请选择宴席类型'
|
||||||
|
}
|
||||||
|
]"></wd-select-picker>
|
||||||
|
|
||||||
|
<wd-col-picker label="做宴地址" v-model="orderInfo.district_name" prop="district_name" :columns="area"
|
||||||
|
:column-change="columnChange" placeholder="请填写做宴地址" @confirm="handleConfirm" :rules="[
|
||||||
|
{
|
||||||
|
required: false,
|
||||||
|
validator: (value: string) => {
|
||||||
|
if (value.length > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
|
},
|
||||||
|
message: '做宴地址不能为空,请填写'
|
||||||
|
}
|
||||||
|
]"></wd-col-picker>
|
||||||
|
|
||||||
|
<wd-input label="详细地址" prop="street_name" clearable v-model="orderInfo.street_name" placeholder="请填写详细地址"
|
||||||
|
:rules="[
|
||||||
|
{
|
||||||
|
required: false,
|
||||||
|
validator: (value: string) => {
|
||||||
|
return /^[\u4e00-\u9fa5a-zA-Z0-9_]+$/.test(value)
|
||||||
|
},
|
||||||
|
message: '请输入详细地址'
|
||||||
|
}
|
||||||
|
]" />
|
||||||
|
<wd-textarea label="备注" v-model="orderInfo.remark" placeholder="请填写备注" />
|
||||||
|
|
||||||
|
<!-- <wd-button plain hairline custom-style="width: calc(100vw - 100rpx);"
|
||||||
|
@click="handleSubmit(1)">确定预定(做席后再支付)</wd-button>
|
||||||
|
<wd-button hairline custom-style="width: calc(100vw - 100rpx);" @click="handleSubmit(1)">付定金锁定订单</wd-button> -->
|
||||||
|
|
||||||
|
</wd-cell-group>
|
||||||
|
</wd-form>
|
||||||
|
|
||||||
|
<!-- 一般的,检举内容由承办的党的委员会或纪律检查委员会将处理意见或复议、复查结论同申诉人见面,听取其意见。复议、复查的结论和决定,应交给申诉人一份。 -->
|
||||||
|
<template #footer>
|
||||||
|
<!-- <wd-button size="small" plain>查看详情</wd-button> -->
|
||||||
|
</template>
|
||||||
|
</wd-card>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { useColPickerData, useModal } from '@/hooks'
|
||||||
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 { setToken, getToken, isLogin } from '@/utils/auth';
|
||||||
|
const { colPickerData, findChildrenByCode } = useColPickerData()
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
search: {
|
totalPrice: 0,
|
||||||
category_id: '',
|
server_user: {
|
||||||
keyword: '',
|
phone: '',
|
||||||
page: 1,
|
public_name: '',
|
||||||
limit: 10,
|
},
|
||||||
|
order_id: 0,
|
||||||
|
|
||||||
|
address_string: '',
|
||||||
|
banquetType: this.getBanquetType(),
|
||||||
|
propShowOrder: false,
|
||||||
|
area: [],
|
||||||
|
value: [],
|
||||||
|
orderInfo: {
|
||||||
|
district_name: [],
|
||||||
|
street_name: '',
|
||||||
|
// cart_ids: [], 酒店
|
||||||
|
customer_name: '',
|
||||||
|
phone: '',
|
||||||
|
address: '',
|
||||||
|
remark: '',
|
||||||
|
banquet_type: '',
|
||||||
|
reservation_type: 1,
|
||||||
|
order_id: 0,
|
||||||
|
// table_number: 0, 酒店
|
||||||
|
// banquet_date: '', 酒店
|
||||||
},
|
},
|
||||||
// keyword_sp: '',
|
|
||||||
categoryIndex: 0,
|
|
||||||
childrenIndex: 0,
|
|
||||||
categoryList: [],
|
|
||||||
tabList: [],
|
|
||||||
good_list: [],
|
|
||||||
matchedItems_sp: [],
|
matchedItems_sp: [],
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad () {
|
onLoad (option) {
|
||||||
// if (isLogin()) {
|
this.order_id = option.id;;
|
||||||
this.getCategoryList()
|
this.orderInfo.order_id = option.id;
|
||||||
// }
|
this.getOrderDetail()
|
||||||
|
this.getArea()
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClickCategory (index: number) {
|
close () {
|
||||||
this.categoryIndex = index;
|
this.propShowOrder = false;
|
||||||
this.tabList = this.categoryList[index].children;
|
|
||||||
this.handleChildrenClick(0);
|
|
||||||
},
|
},
|
||||||
handleChildrenClick (index: number) {
|
//表单验证
|
||||||
this.childrenIndex = index;
|
handleSubmit (reservation_type) {
|
||||||
this.search.category_id = this.tabList[index].id;
|
// console.log(this.orderInfo);
|
||||||
this.$refs.pagingRefSP?.reload();
|
this.orderInfo.reservation_type = reservation_type; //付款类型
|
||||||
|
this.$refs.form.validate()
|
||||||
|
.then(({ valid, errors }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.orderInfo.address = this.address_string + this.orderInfo.street_name;
|
||||||
|
console.log(this.orderInfo);
|
||||||
|
this.addOrder();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log(error, 'error')
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getCategoryList () {
|
//提交订单
|
||||||
CommonApi.commonGet('/api/dishes/category').catch((res) => {
|
addOrder () {
|
||||||
|
CommonApi.commonPost('/api/banquet/order/createOrder', this.orderInfo).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
this.categoryList = res.data;
|
this.propShowOrder = true;
|
||||||
this.handleClickCategory(0)
|
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//搜索事件
|
|
||||||
searchSP(){
|
// 微信支付
|
||||||
this.$refs.pagingRefSP?.reload();
|
payOrder () {
|
||||||
// this.changeSP(1);
|
this.close();
|
||||||
},
|
},
|
||||||
//列表分页
|
//获取地址
|
||||||
changeSP (pageNo: number) {
|
getArea () {
|
||||||
console.log(pageNo);
|
this.area = [colPickerData.map(item => ({
|
||||||
this.search.page = pageNo;
|
value: item.value,
|
||||||
CommonApi.commonGet('/api/dishes/dishes', this.search).catch((res) => {
|
label: item.text
|
||||||
|
}))];
|
||||||
|
},
|
||||||
|
//选择地址后--记录地址字符串
|
||||||
|
handleConfirm (value) {
|
||||||
|
this.address_string = value.selectedItems.map(item => item.label).join('')
|
||||||
|
},
|
||||||
|
//地址改版事件
|
||||||
|
columnChange ({ selectedItem, resolve, finish }) {
|
||||||
|
try {
|
||||||
|
const areaData = findChildrenByCode(colPickerData, selectedItem.value);
|
||||||
|
if (areaData && areaData.length) {
|
||||||
|
resolve(areaData.map(item => ({
|
||||||
|
value: item.value,
|
||||||
|
label: item.text
|
||||||
|
})));
|
||||||
|
} else {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('处理列变更时出错:', error);
|
||||||
|
finish(); // 确保在发生错误时也能完成操作以避免卡顿
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//宴席类型
|
||||||
|
getBanquetType () {
|
||||||
|
CommonApi.commonGet('/api/banquet/dishes/banquetType').catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
// this.matchedItems_sp = res.data;
|
this.banquetType = res.data;
|
||||||
this.$refs.pagingRefSP?.complete(res.data);
|
res.data.forEach(item => {
|
||||||
|
item.label = item.name;
|
||||||
|
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.$u.toast(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// //购物车验证
|
||||||
|
getOrderDetail () {
|
||||||
|
CommonApi.commonPost('/api/banquet/order/detail', { order_id: this.order_id }).catch((res) => {
|
||||||
|
if (res.code === 1) {
|
||||||
|
|
||||||
|
console.log(res)
|
||||||
|
// this.matchedItems_sp = res.data.cart_list;
|
||||||
|
// this.totalPrice = res.data.total_price;
|
||||||
|
// this.server_user.phone = res.data.server_user.certification.phone;
|
||||||
|
// this.server_user.public_name = res.data.server_user.certification.public_name;
|
||||||
|
// this.$refs.pagingRefSP?.complete(res.data);
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
//点击详情
|
//点击详情
|
||||||
goodsDetail (id: number) {
|
cookDetail (id: number) {
|
||||||
console.log(id);
|
// console.log(id);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/goods/detail?id=${id}&is_add=1`
|
url: `/pages/banquet/cook/detail?id=${id}`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//加入购物车
|
|
||||||
addCart (id) {
|
|
||||||
CommonApi.commonPost('/api/cart/add',{
|
|
||||||
buy_now: false,
|
|
||||||
dishes_id: id,
|
|
||||||
}).catch((res) => {
|
|
||||||
if (res.code === 1) {
|
|
||||||
uni.$u.toast('加入购物车成功');
|
|
||||||
} else {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,332 +1,175 @@
|
|||||||
<style lang='scss'>
|
<style>
|
||||||
|
.ellipsis {
|
||||||
|
/* 在末尾显示省略号 */
|
||||||
|
width: 420rpx;
|
||||||
|
/* 防止文字换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隐藏超出部分的文字 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
/* 确保元素有宽度 */
|
||||||
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
height: 0px;
|
height: 0rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.disabled-date>.wd-month__day-container>.wd-month__day-text {
|
|
||||||
color: #ffffff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disabled-date {
|
|
||||||
border-radius: var(--wot-calendar-active-border, 8px);
|
|
||||||
background: var(--wot-calendar-active-color, var(--wot-color-theme, #366cff));
|
|
||||||
// background-color: #78da1c;
|
|
||||||
/* 禁用日期的背景颜色 */
|
|
||||||
color: #ffffff;
|
|
||||||
/* 禁用日期的文字颜色 */
|
|
||||||
pointer-events: none;
|
|
||||||
/* 禁用日期的点击事件 */
|
|
||||||
// opacity: 0.5;
|
|
||||||
/* 禁用日期的透明度 */
|
|
||||||
text-decoration: line-through;
|
|
||||||
/* 禁用日期的文字带有删除线 */
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<up-navbar class=" " style="font-weight: bold;" leftIcon="" title="食谱菜单" titleColor="#303133" bgColor="#FFFFFFFF"
|
<up-navbar class=" " :autoBack="true" style="font-weight: bold;"
|
||||||
titleWidth="600rpx" height="80rpx" leftIconSize="40rpx" leftIconColor="#303133" :safeAreaInsetTop="true"
|
leftIcon="arrow-left" title="订单列表" titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx"
|
||||||
:placeholder="true" :fixed="true"></up-navbar>
|
height="80rpx" leftIconSize="38rpx" leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true"
|
||||||
<up-search v-model="search.keyword" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2"
|
:fixed="true"></up-navbar>
|
||||||
placeholder="输入食谱" :clearabled="true" :showAction="false" inputAlign="left" borderColor="transparent"
|
<up-search v-model="search_sp.keyword" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2"
|
||||||
searchIconColor="#909399" color="#606266" placeholderColor="#909399" searchIcon="search" margin="10rpx"
|
placeholder="输入订单编号" :clearabled="true" :showAction="false" inputAlign="left" borderColor="transparent"
|
||||||
maxlength="-1" height="60rpx" @change="searchSP()">
|
searchIconColor="#909399" color="#606266" placeholderColor="#909399" searchIcon="search" margin="10rpx"
|
||||||
</up-search>
|
maxlength="-1" height="60rpx" @change="searchSP()">
|
||||||
<!-- <up-tabs v-model:current="currentTab" style="font-weight: bold;" :list="menu_list" key-name="name"
|
</up-search>
|
||||||
line-color="#18C936" line-width="80rpx" line-height="6rpx" line-bg-size="cover" :scrollable="true" /> -->
|
|
||||||
<!-- <u-scroll-list :indicator="false">
|
|
||||||
<view class="scroll-list" style="flex-direction: row;width: 56px;">
|
|
||||||
<view class="scroll-list__goods-item " v-for="(item, index) in categoryList" :key="index"
|
|
||||||
:class="(index === categoryIndex) ? 'row-active' : ''" @click="handleClickCategory(index)"
|
|
||||||
:style="{ backgroundColor: item.bgColor }">
|
|
||||||
<image class="scroll-list__goods-item__image"
|
|
||||||
:src="item.image ? item.image : 'https://s3.bmp.ovh/imgs/2024/12/16/35bc6d28ab1c8bc7.png'"
|
|
||||||
:class="(index === categoryIndex) ? 'border-row-active' : ''"></image>
|
|
||||||
<text class="scroll-list__goods-item__text">{{ item.name }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-scroll-list> -->
|
|
||||||
<wd-col-picker label="选择地址" v-model="value" :columns="area" :column-change="columnChange"
|
|
||||||
@confirm="handleConfirm"></wd-col-picker>
|
|
||||||
<wd-calendar :formatter="formatter" type="dates" :min-date="min_data" v-model="time_list"
|
|
||||||
@confirm="handleTimeConfirm" />
|
|
||||||
<wd-tabs v-model="currentTab" @change="handleChange" auto-line-width color="#59CB56" lineWidth="40rpx">
|
|
||||||
<block v-for="item in menu_list" :key="item">
|
|
||||||
<wd-tab :title="`${item.name}`" :name="item.id" setActive="item.name">
|
|
||||||
<view class="content">
|
|
||||||
</view>
|
|
||||||
</wd-tab>
|
|
||||||
</block>
|
|
||||||
</wd-tabs>
|
|
||||||
<!--
|
|
||||||
<wd-button>主要按钮</wd-button>
|
|
||||||
<wd-button type="success">成功按钮</wd-button>
|
|
||||||
<wd-button type="info">信息按钮</wd-button>
|
|
||||||
<wd-button type="warning">警告按钮</wd-button>
|
|
||||||
<wd-button type="error">危险按钮</wd-button> -->
|
|
||||||
<z-paging :fixed="false" height="calc(100vh - 440rpx)" width="200rpx" loading-more-default-text=""
|
|
||||||
style=" left:0; padding: 0px; position: fixed;" class="fv-page flex-col px-4">
|
|
||||||
<u-scroll-list :indicator="false">
|
|
||||||
<view class="scroll-list" style="flex-direction: column;">
|
|
||||||
<view class="scroll-list__goods-item-column " v-for="(item, index) in tabList" :key="index"
|
|
||||||
:class="(index === childrenIndex) ? 'column-active' : ''" @click="handleChildrenClick(index)"
|
|
||||||
:style="{ backgroundColor: item.bgColor }">
|
|
||||||
<!-- <image class="scroll-list__goods-item__image" :src="item.image"></image> -->
|
|
||||||
<slot name="tabItem">
|
|
||||||
</slot>
|
|
||||||
<!-- <view style="padding: 20px 0px;"> </view> -->
|
|
||||||
<text class="scroll-list__goods-item__text">{{ item.name }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</u-scroll-list>
|
|
||||||
</z-paging>
|
|
||||||
<z-paging ref="pagingRefSP" v-model="matchedItems_sp" @query="changeSP" :fixed="false" height="calc(100vh - 440rpx)"
|
|
||||||
width="calc(100vw - 200rpx)" style="right: 0; background-color: #FFFFFFFF; position: fixed;"
|
|
||||||
class="fv-page flex-col">
|
|
||||||
|
|
||||||
<view v-for="(item, index) in matchedItems_sp" :key="index">
|
<z-paging :fixed="false" height="calc(100vh - 380rpx)" width="calc(100vw - 50rpx)"
|
||||||
<up-cell :border='false' @click="goodsDetail(item.id)">
|
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" ref="pagingRefSP"
|
||||||
<template #icon>
|
v-model="matchedItems_sp" @query="changeSP" class="fv-page flex-col ">
|
||||||
<up-image :src="item.image" width="140rpx" height="140rpx"></up-image>
|
<view v-for="(item, index) in matchedItems_sp" :key="index">
|
||||||
</template>
|
<view class="address_box">
|
||||||
<template v-slot:title>
|
<view class=" pt-2 pb-2 ps-2 pe-2" style="">
|
||||||
<view class="h-50 flex">
|
<u-cell class="" style="line-height: 60rpx;" :border="false" @click="orderDetail(item.id)">
|
||||||
<up-text size="28rpx" :text="`${item.name}`" :flex1="true" align="left" wordWrap="normal" :show="true"
|
<template #title>
|
||||||
prefixIcon="" iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
<view class="h-50 flex">
|
||||||
</up-text>
|
<up-text class="" size="26rpx" color="#59CB56"
|
||||||
</view>
|
:text="` 宴席时间:${item.delivery_date} ${item.delivery_time} `" :flex1="true"
|
||||||
|
align="left" prefixIcon="clock" wordWrap="normal" :show="true"
|
||||||
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
</view>
|
||||||
|
<view class="h-50 flex">
|
||||||
|
<up-text class="" size="26rpx" color="#59CB56"
|
||||||
|
:text="`联系方式:${item.customer_name} ( ${item.phone})`" :flex1="true" align="left"
|
||||||
|
wordWrap="normal" :show="true" prefixIcon="map"
|
||||||
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
</view>
|
||||||
|
<view class="h-50 flex">
|
||||||
|
<up-text class="" size="26rpx" :text="item.address" margin="40rpx" :flex1="true"
|
||||||
|
align="left" wordWrap="normal" :show="true" prefixIcon=""
|
||||||
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
<!-- <view @click.stop="getopenLocation(item)">
|
||||||
|
<u-icon slot="right" label="查看地图" name="map"></u-icon>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="h-50 flex">
|
<view class="h-50 flex">
|
||||||
<up-text color="#767676" size="24rpx" :text="`主料:${item.intro}`" :flex1="true" align="left"
|
<up-text class="" size="26rpx" :text="`订单编号:${item.order_sn}`" margin="40rpx"
|
||||||
wordWrap="normal" :show="true" prefixIcon=""
|
:flex1="true" align="left" wordWrap="normal" :show="true" prefixIcon=""
|
||||||
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
</up-text>
|
decoration="none">
|
||||||
</view>
|
</up-text>
|
||||||
<view class="h-50 flex ellipsis_text">
|
</view>
|
||||||
<up-text color="#767676" size="24rpx" :text="`营养:${item.intro}`" :flex1="true" align="left"
|
|
||||||
wordWrap="normal" :show="true" prefixIcon=""
|
<view class="h-50 flex">
|
||||||
iconStyle="font-size:26rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
|
<up-text class="" size="26rpx" :text="`创建时间:${item.create_time}`" margin="40rpx"
|
||||||
</up-text>
|
:flex1="true" align="left" wordWrap="normal" :show="true" prefixIcon=""
|
||||||
<view @click.stop="addCart(item.id)">
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
<u-icon slot="right" label="" size="42rpx" name="plus-circle" color="#59CB56"
|
decoration="none">
|
||||||
labelColor="#59CB56"></u-icon>
|
</up-text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="h-50 flex">
|
||||||
</template>
|
<up-text class="" size="26rpx" :text="`付款金额:¥${item.pay_amount}`" margin="40rpx"
|
||||||
</up-cell>
|
:flex1="true" align="left" wordWrap="normal" :show="true" prefixIcon=""
|
||||||
</view>
|
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
|
||||||
</z-paging>
|
decoration="none">
|
||||||
|
</up-text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</u-cell>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</z-paging>
|
||||||
|
|
||||||
|
<up-button class="" style="" text="返回首页" type="primary" color="#59CB56" shape="circle" size="normal"
|
||||||
|
custom-style="width:calc(100vw - 50rpx)" @click="goBackHome">
|
||||||
|
</up-button>
|
||||||
|
<!-- </view> -->
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
// useColPickerData可以参考本章节顶部的介绍
|
const CACHE_ADDRESS = {};
|
||||||
// 导入路径根据自己实际情况调整,万不可一贴了之
|
import { CommonApi } from '@/api';
|
||||||
|
import { getCityV2 } from '@/api/api.js';
|
||||||
import { useColPickerData } from '@/hooks'
|
import { useLocation, useModal } from '@/hooks';
|
||||||
|
import { defineComponent } from 'vue';
|
||||||
import { defineComponent } from "vue";
|
|
||||||
import { CommonApi, UserApi } from "@/api";
|
|
||||||
import { get } from 'http';
|
|
||||||
// import { setToken, getToken, isLogin } from '@/utils/auth';
|
|
||||||
const { colPickerData, findChildrenByCode } = useColPickerData()
|
|
||||||
// const value = ref<string[]>([])
|
|
||||||
|
|
||||||
// const area = ref<any[]>([
|
|
||||||
|
|
||||||
// ])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
search: {
|
search_sp: {
|
||||||
category_id: '',
|
keyword: '',
|
||||||
keyword: '',
|
page: 1,
|
||||||
page: 1,
|
limit: 10,
|
||||||
limit: 10,
|
},
|
||||||
},
|
matchedItems_sp: [],
|
||||||
// area: useColPickerData().colPickerData.map((item) => {
|
addFrom_address: '',
|
||||||
// return {
|
};
|
||||||
// value: item.value,
|
},
|
||||||
// label: item.text
|
onShow () {
|
||||||
// }
|
//进入页面时刷新数据--避免加入购物车不显示
|
||||||
// }),
|
this.searchSP();
|
||||||
area: [],
|
},
|
||||||
value: [],
|
methods: {
|
||||||
currentTab: 0, // tab索引
|
|
||||||
min_data: new Date().getTime(),
|
|
||||||
isDisabledDate: [1754755200000, 1754755200000],
|
|
||||||
time_list: [],
|
|
||||||
menu_list: [{ id: 0, name: '第一餐' }, { id: 1, name: '第二餐' }, { id: 2, name: '第三餐' }],
|
|
||||||
// keyword_sp: '',
|
|
||||||
categoryIndex: 0,
|
|
||||||
childrenIndex: 0,
|
|
||||||
categoryList: [],
|
|
||||||
tabList: [],
|
|
||||||
good_list: [],
|
|
||||||
matchedItems_sp: [],
|
|
||||||
|
|
||||||
};
|
//搜索事件--直接刷新数据
|
||||||
},
|
searchSP () {
|
||||||
onLoad () {
|
// this.getAddressInfoListData();
|
||||||
// if (isLogin()) {
|
// console.log('搜索');
|
||||||
this.getCategoryList()
|
this.$refs.pagingRefSP?.reload();
|
||||||
// }
|
},
|
||||||
|
//列表分页
|
||||||
|
changeSP (pageNo: number) {
|
||||||
|
|
||||||
this.getArea()
|
console.log('列表分页',pageNo);
|
||||||
|
this.search_sp.page = pageNo;
|
||||||
},
|
console.log('列表分页',this.search_sp);
|
||||||
created () {
|
CommonApi.commonGet('/api/order/list', this.search_sp).catch((res) => {
|
||||||
|
if (res.code === 1) {
|
||||||
},
|
this.$refs.pagingRefSP?.complete(res.data);
|
||||||
methods: {
|
// console.log('刷新页面');
|
||||||
|
// res.data.forEach((item) => {
|
||||||
handleConfirm ({ value }) {
|
// console.log(item);
|
||||||
console.log(value)
|
// if (!this.createOrderData.cart_ids.includes(item.id)) {
|
||||||
},
|
// this.createOrderData.cart_ids.push(item.id);
|
||||||
getArea () {
|
// }
|
||||||
try {
|
// });
|
||||||
this.area = [colPickerData.map(item => ({
|
|
||||||
value: item.value,
|
|
||||||
label: item.text
|
|
||||||
}))];
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取区域数据时出错:', error);
|
|
||||||
uni.$u.toast('获取区域数据失败');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
columnChange ({ selectedItem, resolve, finish }) {
|
|
||||||
try {
|
|
||||||
const areaData = findChildrenByCode(colPickerData, selectedItem.value);
|
|
||||||
if (areaData && areaData.length) {
|
|
||||||
|
|
||||||
|
|
||||||
resolve(areaData.map(item => ({
|
|
||||||
value: item.value,
|
|
||||||
label: item.text
|
|
||||||
})));
|
|
||||||
} else {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('处理列变更时出错:', error);
|
|
||||||
finish(); // 确保在发生错误时也能完成操作以避免卡顿
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
formatter (day) {
|
|
||||||
const date = new Date(day.date)
|
|
||||||
const now = new Date()
|
|
||||||
const year = date.getFullYear()
|
|
||||||
const month = date.getMonth()
|
|
||||||
const da = date.getDate()
|
|
||||||
const nowYear = now.getFullYear()
|
|
||||||
const nowMonth = now.getMonth()
|
|
||||||
const nowDa = now.getDate()
|
|
||||||
|
|
||||||
if (year === nowYear && month === nowMonth && da === nowDa) {
|
|
||||||
day.topInfo = '今天'
|
|
||||||
}
|
|
||||||
// const disabledDates = ['2025-08-05', '2023-08-15'];
|
|
||||||
// const formattedDate = `${year}-${month}-${da}`;
|
|
||||||
if (this.isDisabledDate.includes(day.date)) {
|
|
||||||
day.topInfo = '已预定';
|
|
||||||
day.disabled = true; // 禁用日期
|
|
||||||
day.disabled_class = 'disabled-date'; // 添加自定义样式类
|
|
||||||
}
|
|
||||||
// if (day.type === 'start') {
|
|
||||||
// day.bottomInfo = '开始'
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (day.type === 'end') {
|
|
||||||
// day.bottomInfo = '结束'
|
|
||||||
// }
|
|
||||||
// if (day.type === 'same') {
|
|
||||||
// day.bottomInfo = '开始/结束'
|
|
||||||
// }
|
|
||||||
return day
|
|
||||||
},
|
|
||||||
|
|
||||||
handleTimeConfirm (res) {
|
|
||||||
console.log(res.value)
|
|
||||||
this.time_list = res.value
|
|
||||||
|
|
||||||
},
|
|
||||||
handleChange () {
|
|
||||||
this.$nextTick(() => { this.handleClickCategory(this.currentTab) });
|
|
||||||
},
|
|
||||||
handleClickCategory (index: number) {
|
|
||||||
|
|
||||||
console.log(index);
|
|
||||||
this.categoryIndex = index;
|
|
||||||
this.tabList = this.categoryList[index].children;
|
|
||||||
this.handleChildrenClick(0);
|
|
||||||
},
|
|
||||||
handleChildrenClick (index: number) {
|
|
||||||
this.childrenIndex = index;
|
|
||||||
this.search.category_id = this.tabList[index].id;
|
|
||||||
this.$refs.pagingRefSP?.reload();
|
|
||||||
},
|
|
||||||
|
|
||||||
getCategoryList () {
|
|
||||||
CommonApi.commonGet('/api/dishes/category').catch((res) => {
|
|
||||||
if (res.code === 1) {
|
|
||||||
this.categoryList = res.data;
|
|
||||||
this.handleClickCategory(0)
|
|
||||||
} else {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//搜索事件
|
|
||||||
searchSP () {
|
|
||||||
this.$refs.pagingRefSP?.reload();
|
|
||||||
// this.changeSP(1);
|
|
||||||
},
|
|
||||||
//列表分页
|
|
||||||
changeSP (pageNo: number) {
|
|
||||||
// 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);
|
|
||||||
// console.log(res);
|
|
||||||
} else {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
//点击详情
|
|
||||||
goodsDetail (id: number) {
|
|
||||||
// console.log(id);
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/common/goods/detail?id=${id}&is_add=1`
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
//加入购物车
|
|
||||||
addCart (id) {
|
|
||||||
CommonApi.commonPost('/api/cart/add', {
|
|
||||||
buy_now: false,
|
|
||||||
dishes_id: id,
|
|
||||||
}).catch((res) => {
|
|
||||||
if (res.code === 1) {
|
|
||||||
uni.$u.toast('加入购物车成功');
|
|
||||||
} else {
|
|
||||||
uni.$u.toast(res.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
uni.$u.toast(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 打开地图
|
||||||
|
getopenLocation (res) {
|
||||||
|
useLocation().openLocation(res.latitude, res.longitude,res.address,res.address)
|
||||||
|
},
|
||||||
|
//点击详情
|
||||||
|
orderDetail (id: number) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/banquet/order/detail?id=${id}`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goBackHome () {
|
||||||
|
uni.switchTab({
|
||||||
|
// url: '/pages/index/index'
|
||||||
|
url: '/pages/tab/user/index'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<up-cell-group :border="false">
|
<up-cell-group :border="false">
|
||||||
<view class="detail-box" v-for="(item, index) in matchedItems_sp" :key="index">
|
<view class="detail-box" v-for="(item, index) in matchedItems_sp" :key="index">
|
||||||
<u-cell :border="false" @click="goodsDetail(item.id)">
|
<u-cell :border="false" @click="cookDetail(item.id)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<wd-img :width="100" :height="100" :src="item.avatar" :enable-preview="false" :radius="8" :round=false
|
<wd-img :width="100" :height="100" :src="item.avatar" :enable-preview="false" :radius="8" :round=false
|
||||||
custom-class="margin-right-24" />
|
custom-class="margin-right-24" />
|
||||||
@ -132,10 +132,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
},
|
},
|
||||||
//点击详情
|
//点击详情
|
||||||
goodsDetail (id: number) {
|
cookDetail (id: number) {
|
||||||
// console.log(id);
|
// console.log(id);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/banquet/cook/detail?id=${id}&is_add=1`
|
url: `/pages/banquet/cook/detail?id=${id}`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
.wd-grid-item-img-cook {
|
.wd-grid-item-img-cook {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 180px;
|
height: 160px;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<up-navbar class=" " style="font-weight: bold;" leftIcon="" title="首页" titleColor="#303133" bgColor="#FFFFFFFF"
|
<up-navbar class=" " style="font-weight: bold;" leftIcon="" title="首页" titleColor="#303133" bgColor="#FFFFFFFF"
|
||||||
titleWidth="600rpx" height="80rpx" leftIconSize="40rpx" leftIconColor="#303133" :safeAreaInsetTop="true"
|
titleWidth="600rpx" height="80rpx" leftIconSize="40rpx" leftIconColor="#303133" :safeAreaInsetTop="true"
|
||||||
:placeholder="true" :fixed="true"></up-navbar>
|
:placeholder="true" :fixed="true"></up-navbar>
|
||||||
<view style="padding:0px 20rpx"> <u-swiper radius="20rpx" height="360rpx" :list="swiperList" indicator
|
<view style="padding:0px 20rpx"> <u-swiper radius="20rpx" height="420rpx" :list="swiperList" indicator
|
||||||
indicatorMode="dot" circular @click="handleClick"></u-swiper></view>
|
indicatorMode="dot" circular @click="handleClick"></u-swiper></view>
|
||||||
<wd-grid :gutter="10" :column="2" clickable>
|
<wd-grid :gutter="10" :column="2" clickable>
|
||||||
<wd-grid-item use-slot @click="goTabCook">
|
<wd-grid-item use-slot @click="goTabCook">
|
||||||
@ -29,23 +29,12 @@
|
|||||||
src="https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20250813/202508131655082b6295503.png" />
|
src="https://lihaiim.oss-cn-chengdu.aliyuncs.com/public/uploads/images/20250813/202508131655082b6295503.png" />
|
||||||
<!-- <view class="text font-bold">找酒店</view> -->
|
<!-- <view class="text font-bold">找酒店</view> -->
|
||||||
</wd-grid-item>
|
</wd-grid-item>
|
||||||
|
<view v-for="(item, index) in matchedItems_sp" :key="index" >
|
||||||
<wd-grid-item use-slot url="/pages/banquet/cook/detail?id=1&is_add=1">
|
<wd-grid-item use-slot :url="`/pages/banquet/cook/detail?id=${item.id}`">
|
||||||
<image class="wd-grid-item-img-cook" src="https://cdn.uviewui.com/uview/goods/1.jpg" />
|
<image class="wd-grid-item-img-cook" :src="`${item.certification.public_image ? item.certification.public_image : item.avatar }`" />
|
||||||
<view class="text font-bold">张德标</view>
|
<view class="text font-bold">{{item.certification.public_name}}</view>
|
||||||
</wd-grid-item>
|
</wd-grid-item>
|
||||||
<wd-grid-item use-slot url="/pages/banquet/cook/detail?id=2&is_add=1">
|
</view>
|
||||||
<image class="wd-grid-item-img-cook" src="https://cdn.uviewui.com/uview/goods/1.jpg" />
|
|
||||||
<view class="text font-bold">张德标</view>
|
|
||||||
</wd-grid-item>
|
|
||||||
<wd-grid-item use-slot url="/pages/banquet/cook/detail?id=3&is_add=1">
|
|
||||||
<image class="wd-grid-item-img-cook" src="https://cdn.uviewui.com/uview/goods/1.jpg" />
|
|
||||||
<view class="text font-bold">张德标</view>
|
|
||||||
</wd-grid-item>
|
|
||||||
<wd-grid-item use-slot url="/pages/banquet/cook/detail?id=4&is_add=1">
|
|
||||||
<image class="wd-grid-item-img-cook" src="https://cdn.uviewui.com/uview/goods/1.jpg" />
|
|
||||||
<view class="text font-bold">张德标</view>
|
|
||||||
</wd-grid-item>
|
|
||||||
</wd-grid>
|
</wd-grid>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -89,12 +78,12 @@ export default defineComponent({
|
|||||||
|
|
||||||
goTabCook () {
|
goTabCook () {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/banquet/cook/list'
|
url: '/pages/tab/banquet/cook'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goTabHotel () {
|
goTabHotel () {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/banquet/hotel/list'
|
url: '/pages/tab/banquet/hotel'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -103,9 +92,6 @@ export default defineComponent({
|
|||||||
handleClick (e) {
|
handleClick (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
},
|
},
|
||||||
// onChange (e) {
|
|
||||||
// console.log(e)
|
|
||||||
// },
|
|
||||||
|
|
||||||
handleClickCategory (index: number) {
|
handleClickCategory (index: number) {
|
||||||
this.categoryIndex = index;
|
this.categoryIndex = index;
|
||||||
@ -118,26 +104,12 @@ export default defineComponent({
|
|||||||
this.$refs.pagingRefSP?.reload();
|
this.$refs.pagingRefSP?.reload();
|
||||||
},
|
},
|
||||||
|
|
||||||
// getCategoryList () {
|
|
||||||
// CommonApi.commonGet('/api/dishes/category').catch((res) => {
|
|
||||||
// if (res.code === 1) {
|
|
||||||
// this.categoryList = res.data;
|
|
||||||
// this.handleClickCategory(0)
|
|
||||||
// } else {
|
|
||||||
// uni.$u.toast(res.msg);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
|
|
||||||
//列表分页
|
//列表分页
|
||||||
changeSP () {
|
changeSP () {
|
||||||
// console.log(pageNo);
|
|
||||||
// this.search.page = pageNo;
|
|
||||||
CommonApi.commonGet('/api/banquet/chef/list', this.search).catch((res) => {
|
CommonApi.commonGet('/api/banquet/chef/list', this.search).catch((res) => {
|
||||||
if (res.code === 1) {
|
if (res.code === 1) {
|
||||||
this.matchedItems_sp = res.data;
|
this.matchedItems_sp = res.data;
|
||||||
// this.$refs.pagingRefSP?.complete(res.data);
|
// this.$refs.pagingRefSP?.complete(res.data);
|
||||||
// console.log(res);
|
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.msg);
|
uni.$u.toast(res.msg);
|
||||||
}
|
}
|
||||||
@ -148,7 +120,7 @@ export default defineComponent({
|
|||||||
goodsDetail (id: number) {
|
goodsDetail (id: number) {
|
||||||
console.log(id);
|
console.log(id);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/common/goods/detail?id=${id}&is_add=1`
|
url: `/pages/common/goods/detail?id=${id}`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -29,10 +29,10 @@
|
|||||||
|
|
||||||
<u-cell icon="" title="微信号" is-link right-icon="lock" :value="userStore.user.code" :border="false" size="large"
|
<u-cell icon="" title="微信号" is-link right-icon="lock" :value="userStore.user.code" :border="false" size="large"
|
||||||
custom-style="padding:20rpx;font-size:28rpx" />
|
custom-style="padding:20rpx;font-size:28rpx" />
|
||||||
<u-cell icon="order" title="宴席" is-link value="" :border="false" size="large"
|
<u-cell icon="order" title="我的订单" is-link value="" :border="false" size="large"
|
||||||
custom-style="padding:20rpx;font-size:28rpx" @click="banquet" />
|
custom-style="padding:20rpx;font-size:28rpx" @click="banquet" />
|
||||||
<u-cell icon="order" title="订单详情" is-link value="" :border="false" size="large"
|
<!-- <u-cell icon="order" title="订单详情" is-link value="" :border="false" size="large"
|
||||||
custom-style="padding:20rpx;font-size:28rpx" @click="orderList" />
|
custom-style="padding:20rpx;font-size:28rpx" @click="orderList" /> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bg-white p-2">
|
<view class="bg-white p-2">
|
||||||
@ -96,7 +96,8 @@ function orderList () {
|
|||||||
function banquet () {
|
function banquet () {
|
||||||
uni.$u.route({
|
uni.$u.route({
|
||||||
type: 'navigateTo',
|
type: 'navigateTo',
|
||||||
url: '/pages/banquet/combo/index',
|
// url: '/pages/banquet/combo/index',
|
||||||
|
url: '/pages/banquet/order/list',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import pagesJson from '@/pages.json';
|
import pagesJson from '@/pages.json';
|
||||||
|
|
||||||
// 路径常量
|
// 路径常量
|
||||||
export const HOME_PATH = '/pages/tab/home/index';
|
export const HOME_PATH = '/pages/tab/banquet/index';
|
||||||
export const LOGIN_PATH = '/pages/common/login/index';
|
export const LOGIN_PATH = '/pages/common/login/index';
|
||||||
export const ERROR404_PATH = '/pages/common/404/index';
|
export const ERROR404_PATH = '/pages/common/404/index';
|
||||||
|
|
||||||
|
BIN
src/static/images/tabbar/cook.png
Normal file
BIN
src/static/images/tabbar/cook.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
BIN
src/static/images/tabbar/cook_selected.png
Normal file
BIN
src/static/images/tabbar/cook_selected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
BIN
src/static/images/tabbar/hotel.png
Normal file
BIN
src/static/images/tabbar/hotel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
src/static/images/tabbar/hotel_selected.png
Normal file
BIN
src/static/images/tabbar/hotel_selected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
x
Reference in New Issue
Block a user