Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
meihua-island-book
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-12-21 14:39:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8e4a713b6f63f7cea9c0e991751ba5acac053876
8e4a713b
1 parent
a49442d7
fix
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
src/components/roomCard.vue
src/pages/confirm/index.vue
src/pages/index/index.vue
src/components/roomCard.vue
View file @
8e4a713
<!--
* @Date: 2023-12-13 13:42:23
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-21 14:
07:08
* @LastEditTime: 2023-12-21 14:
16:26
* @FilePath: /meihuaApp/src/components/roomCard.vue
* @Description: 房间详情组件
-->
...
...
@@ -105,6 +105,12 @@ watch(
const dates = getTodayAndTomorrow();
const handleTap = () => {
if (!startDate.value) {
startDate.value = dates.today;
}
if (!endDate.value) {
endDate.value = dates.tomorrow;
}
Taro.navigateTo({
url: `../detail/index?id=abc&start_date=${startDate.value}&end_date=${endDate.value}`,
})
...
...
@@ -114,9 +120,6 @@ onMounted(() => {
if (props.calenderInfo) {
startDate.value = props.calenderInfo.startDate;
endDate.value = props.calenderInfo.endDate;
} else {
startDate.value = dates.today;
endDate.value = dates.tomorrow;
}
// console.warn('选择的日期', props.calenderInfo);
// console.warn('房间详情的属性', props.data);
...
...
src/pages/confirm/index.vue
View file @
8e4a713
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-21 14:
02:4
3
* @LastEditTime: 2023-12-21 14:
17:1
3
* @FilePath: /meihuaApp/src/pages/confirm/index.vue
* @Description: 确认订单页面
-->
...
...
@@ -195,7 +195,6 @@ const payData = ref({});
onMounted(() => {
const { id, start_date, end_date, between_date, start_date_week, end_date_week } = getCurrentPageParam();
// console.log(id, start_date, end_date, between_date, start_date_week, end_date_week );
booking_info.value.days = between_date;
let check_in = start_date.split('-');
let check_out = end_date.split('-');
...
...
@@ -230,11 +229,15 @@ const goPay = () => {
});
return;
} else {
console.warn(formData);
// show_pay.value = true;
// payData.value.id = '123';
// payData.value.price = room_price_info.value.discount * book_count.value * booking_info.value.days;
// payData.value.remain_time = '30:00';
// TODO: 保存订房信息
console.warn('保存订房信息', formData);
// TODO: 跳转支付页面
setTimeout(() => {
show_pay.value = true;
payData.value.id = '123';
payData.value.price = room_price_info.value.discount * book_count.value * booking_info.value.days;
payData.value.remain_time = '1000';
}, 1000);
}
}
...
...
src/pages/index/index.vue
View file @
8e4a713
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-21 1
0:10:57
* @LastEditTime: 2023-12-21 1
4:21:16
* @FilePath: /meihuaApp/src/pages/index/index.vue
* @Description: 首页
-->
...
...
@@ -31,17 +31,11 @@ import { ref } from 'vue';
import roomCard from '@/components/roomCard.vue'
// import arrowDownImg from '@/assets/images/arrow-down.png'
import navBar from '@/components/navBar.vue'
import { useDidShow } from '@tarojs/taro'
//
import { useDidShow } from '@tarojs/taro'
// TAG: 模拟onShow事件
useDidShow(() => {
//
useDidShow(() => {
// console.warn(AUTHOR)
})
// const goTo = (id) => {
// Taro.navigateTo({
// url: '../activityDetail/index?id=' + id
// })
// }
// })
// 分享功能
wx.showShareMenu({
...
...
Please
register
or
login
to post a comment