hookehuyr

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

......@@ -143,7 +143,7 @@ const getDayDifference = (startDate, endDate) => {
// 调用方法获取今天和明天的日期
const dates = getTodayAndTomorrow();
const emit = defineEmits(['on-dates-change']);
const emit = defineEmits(['on-dates-change', 'on-dates-close']);
const props = defineProps({
startDate: {
......@@ -202,6 +202,7 @@ const openSwitch = (param) => {
};
const closeSwitch = (param) => {
state[`${param}`] = false;
emit('on-dates-close');
};
/**
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-26 11:15:09
* @LastEditTime: 2023-12-26 18:08:01
* @FilePath: /meihuaApp/src/pages/book/index.vue
* @Description: 订房页面
-->
......@@ -9,7 +9,7 @@
<view class="book-page">
<view id="book-content" class="book-content">
<view id="book-cal" class="book-cal">
<calendar-select @on-dates-change="onDatesChange"></calendar-select>
<calendar-select @on-dates-change="onDatesChange" @on-dates-close="onDatesClose"></calendar-select>
</view>
<view class="book-type">
<!-- <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 {
name: "bookPage",
mixins: [mixin.init],
async onShow () {
Taro.showLoading({ mask: true, title: "加载中..." })
Taro.showLoading({ mask: true, title: "加载中..." });
// 获取活动和轮播信息
const { code, data } = await getListAPI({ page: this.page, limit: this.limit });
if (code) {
this.bookList = data;
this.page = this.page + 1;
Taro.hideLoading()
Taro.hideLoading();
console.warn('onShow');
}
},
onHide () { // 离开当前页面
......@@ -139,6 +140,8 @@ export default {
startDate,
endDate
}
},
onDatesClose () {
// 重置列表
this.flag = true;
this.page = 1;
......
<!--
* @Date: 2023-12-15 14:03:40
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-18 16:54:46
* @LastEditTime: 2023-12-26 17:58:58
* @FilePath: /meihuaApp/src/pages/payInfo/index.vue
* @Description: 文件描述
-->
......@@ -23,7 +23,7 @@ import { ref, onMounted } from "vue";
onMounted(() => {
setTimeout(() => {
Taro.redirectTo({
Taro.reLaunch({
url: '/pages/my/index',
})
}, 2000);
......