hookehuyr

修复订房获取列表日历查询问题

...@@ -143,7 +143,7 @@ const getDayDifference = (startDate, endDate) => { ...@@ -143,7 +143,7 @@ const getDayDifference = (startDate, endDate) => {
143 // 调用方法获取今天和明天的日期 143 // 调用方法获取今天和明天的日期
144 const dates = getTodayAndTomorrow(); 144 const dates = getTodayAndTomorrow();
145 145
146 -const emit = defineEmits(['on-dates-change']); 146 +const emit = defineEmits(['on-dates-change', 'on-dates-close']);
147 147
148 const props = defineProps({ 148 const props = defineProps({
149 startDate: { 149 startDate: {
...@@ -202,6 +202,7 @@ const openSwitch = (param) => { ...@@ -202,6 +202,7 @@ const openSwitch = (param) => {
202 }; 202 };
203 const closeSwitch = (param) => { 203 const closeSwitch = (param) => {
204 state[`${param}`] = false; 204 state[`${param}`] = false;
205 + emit('on-dates-close');
205 }; 206 };
206 207
207 /** 208 /**
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-12-26 11:15:09 4 + * @LastEditTime: 2023-12-26 18:08:01
5 * @FilePath: /meihuaApp/src/pages/book/index.vue 5 * @FilePath: /meihuaApp/src/pages/book/index.vue
6 * @Description: 订房页面 6 * @Description: 订房页面
7 --> 7 -->
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 <view class="book-page"> 9 <view class="book-page">
10 <view id="book-content" class="book-content"> 10 <view id="book-content" class="book-content">
11 <view id="book-cal" class="book-cal"> 11 <view id="book-cal" class="book-cal">
12 - <calendar-select @on-dates-change="onDatesChange"></calendar-select> 12 + <calendar-select @on-dates-change="onDatesChange" @on-dates-close="onDatesClose"></calendar-select>
13 </view> 13 </view>
14 <view class="book-type"> 14 <view class="book-type">
15 <!-- <nut-tabs v-model="value" @click="onTabClick" title-scroll title-gutter="10" name="tabName" background="#FFF" color="#4C2E08" animated-time="0"> 15 <!-- <nut-tabs v-model="value" @click="onTabClick" title-scroll title-gutter="10" name="tabName" background="#FFF" color="#4C2E08" animated-time="0">
...@@ -80,13 +80,14 @@ export default { ...@@ -80,13 +80,14 @@ export default {
80 name: "bookPage", 80 name: "bookPage",
81 mixins: [mixin.init], 81 mixins: [mixin.init],
82 async onShow () { 82 async onShow () {
83 - Taro.showLoading({ mask: true, title: "加载中..." }) 83 + Taro.showLoading({ mask: true, title: "加载中..." });
84 // 获取活动和轮播信息 84 // 获取活动和轮播信息
85 const { code, data } = await getListAPI({ page: this.page, limit: this.limit }); 85 const { code, data } = await getListAPI({ page: this.page, limit: this.limit });
86 if (code) { 86 if (code) {
87 this.bookList = data; 87 this.bookList = data;
88 this.page = this.page + 1; 88 this.page = this.page + 1;
89 - Taro.hideLoading() 89 + Taro.hideLoading();
90 + console.warn('onShow');
90 } 91 }
91 }, 92 },
92 onHide () { // 离开当前页面 93 onHide () { // 离开当前页面
...@@ -139,6 +140,8 @@ export default { ...@@ -139,6 +140,8 @@ export default {
139 startDate, 140 startDate,
140 endDate 141 endDate
141 } 142 }
143 + },
144 + onDatesClose () {
142 // 重置列表 145 // 重置列表
143 this.flag = true; 146 this.flag = true;
144 this.page = 1; 147 this.page = 1;
......
1 <!-- 1 <!--
2 * @Date: 2023-12-15 14:03:40 2 * @Date: 2023-12-15 14:03:40
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-12-18 16:54:46 4 + * @LastEditTime: 2023-12-26 17:58:58
5 * @FilePath: /meihuaApp/src/pages/payInfo/index.vue 5 * @FilePath: /meihuaApp/src/pages/payInfo/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -23,7 +23,7 @@ import { ref, onMounted } from "vue"; ...@@ -23,7 +23,7 @@ import { ref, onMounted } from "vue";
23 23
24 onMounted(() => { 24 onMounted(() => {
25 setTimeout(() => { 25 setTimeout(() => {
26 - Taro.redirectTo({ 26 + Taro.reLaunch({
27 url: '/pages/my/index', 27 url: '/pages/my/index',
28 }) 28 })
29 }, 2000); 29 }, 2000);
......