From 7bbe57d536ff60d841222bd397b6adfac1ce52b1 Mon Sep 17 00:00:00 2001 From: sjeam <359824901@qq.com> Date: Wed, 13 Aug 2025 17:04:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=B4=E5=B8=AD2.1=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/banquet/cook/list.vue | 114 +------------------------------ src/pages/banquet/home/index.vue | 111 ++++++++---------------------- src/static/images/cook.png | Bin 0 -> 482975 bytes src/static/images/hotel.png | Bin 0 -> 530618 bytes 4 files changed, 30 insertions(+), 195 deletions(-) create mode 100644 src/static/images/cook.png create mode 100644 src/static/images/hotel.png diff --git a/src/pages/banquet/cook/list.vue b/src/pages/banquet/cook/list.vue index 207a574..847ab4f 100644 --- a/src/pages/banquet/cook/list.vue +++ b/src/pages/banquet/cook/list.vue @@ -80,17 +80,10 @@ export default defineComponent({ data () { return { search: { - // category_id: '', keyword: '', page: 1, limit: 10, }, - // area: useColPickerData().colPickerData.map((item) => { - // return { - // value: item.value, - // label: item.text - // } - // }), area: [], value: [], currentTab: 0, // tab索引 @@ -109,116 +102,15 @@ export default defineComponent({ }; }, onLoad () { - // if (isLogin()) { - this.getCategoryList() - // } - - this.getArea() + // this.getCategoryList() + // this.getArea() }, created () { }, methods: { - - handleConfirm ({ value }) { - console.log(value) - }, - 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(); diff --git a/src/pages/banquet/home/index.vue b/src/pages/banquet/home/index.vue index 2bd6f18..e5fa740 100644 --- a/src/pages/banquet/home/index.vue +++ b/src/pages/banquet/home/index.vue @@ -1,7 +1,7 @@