Showing
10 changed files
with
141 additions
and
44 deletions
| ... | @@ -14,13 +14,12 @@ declare module '@vue/runtime-core' { | ... | @@ -14,13 +14,12 @@ declare module '@vue/runtime-core' { |
| 14 | NavBar: typeof import('./src/components/navBar.vue')['default'] | 14 | NavBar: typeof import('./src/components/navBar.vue')['default'] |
| 15 | NutActionSheet: typeof import('@nutui/nutui-taro')['ActionSheet'] | 15 | NutActionSheet: typeof import('@nutui/nutui-taro')['ActionSheet'] |
| 16 | NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'] | 16 | NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'] |
| 17 | - NutAvatarCropper: typeof import('@nutui/nutui-taro')['AvatarCropper'] | 17 | + NutBacktop: typeof import('@nutui/nutui-taro')['Backtop'] |
| 18 | NutButton: typeof import('@nutui/nutui-taro')['Button'] | 18 | NutButton: typeof import('@nutui/nutui-taro')['Button'] |
| 19 | NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'] | 19 | NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'] |
| 20 | NutCol: typeof import('@nutui/nutui-taro')['Col'] | 20 | NutCol: typeof import('@nutui/nutui-taro')['Col'] |
| 21 | NutConfigProvider: typeof import('@nutui/nutui-taro')['ConfigProvider'] | 21 | NutConfigProvider: typeof import('@nutui/nutui-taro')['ConfigProvider'] |
| 22 | - NutCountdown: typeof import('@nutui/nutui-taro')['Countdown'] | 22 | + NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview'] |
| 23 | - NutEmpty: typeof import('@nutui/nutui-taro')['Empty'] | ||
| 24 | NutInput: typeof import('@nutui/nutui-taro')['Input'] | 23 | NutInput: typeof import('@nutui/nutui-taro')['Input'] |
| 25 | NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'] | 24 | NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'] |
| 26 | NutNumberKeyboard: typeof import('@nutui/nutui-taro')['NumberKeyboard'] | 25 | NutNumberKeyboard: typeof import('@nutui/nutui-taro')['NumberKeyboard'] |
| ... | @@ -34,7 +33,6 @@ declare module '@vue/runtime-core' { | ... | @@ -34,7 +33,6 @@ declare module '@vue/runtime-core' { |
| 34 | NutTabs: typeof import('@nutui/nutui-taro')['Tabs'] | 33 | NutTabs: typeof import('@nutui/nutui-taro')['Tabs'] |
| 35 | NutTag: typeof import('@nutui/nutui-taro')['Tag'] | 34 | NutTag: typeof import('@nutui/nutui-taro')['Tag'] |
| 36 | NutTextarea: typeof import('@nutui/nutui-taro')['Textarea'] | 35 | NutTextarea: typeof import('@nutui/nutui-taro')['Textarea'] |
| 37 | - NutToast: typeof import('@nutui/nutui-taro')['Toast'] | ||
| 38 | OrderCard: typeof import('./src/components/orderCard.vue')['default'] | 36 | OrderCard: typeof import('./src/components/orderCard.vue')['default'] |
| 39 | Picker: typeof import('./src/components/time-picker-data/picker.vue')['default'] | 37 | Picker: typeof import('./src/components/time-picker-data/picker.vue')['default'] |
| 40 | PosterBuilder: typeof import('./src/components/PosterBuilder/index.vue')['default'] | 38 | PosterBuilder: typeof import('./src/components/PosterBuilder/index.vue')['default'] | ... | ... |
src/assets/images/banner1@2x.png
0 → 100644
1.36 MB
src/assets/images/icon_checked@2x.png
0 → 100644
19.4 KB
src/assets/images/img1@2x.png
0 → 100644
430 KB
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-12-13 13:42:23 | 2 | * @Date: 2023-12-13 13:42:23 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-12-15 14:01:57 | 4 | + * @LastEditTime: 2023-12-19 15:02:45 |
| 5 | * @FilePath: /meihuaApp/src/components/roomCard.vue | 5 | * @FilePath: /meihuaApp/src/components/roomCard.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | - <div class="room-card-component" @tap="handleTap"> | 9 | + <view class="room-card-component" @tap="handleTap"> |
| 10 | - <image style="width: 100%; height: 10rem;" mode="aspectFill" src="https://img.yzcdn.cn/vant/cat.jpeg" /> | 10 | + <image style="width: 100%; height: 10rem;" mode="aspectFill" src="https://cdn.ipadbiz.cn/meihua/img1@2x.png" /> |
| 11 | <view style="padding: 0.5rem;"> | 11 | <view style="padding: 0.5rem;"> |
| 12 | <nut-row> | 12 | <nut-row> |
| 13 | <nut-col span="18"> | 13 | <nut-col span="18"> |
| ... | @@ -20,23 +20,40 @@ | ... | @@ -20,23 +20,40 @@ |
| 20 | </nut-col> | 20 | </nut-col> |
| 21 | </nut-row> | 21 | </nut-row> |
| 22 | </view> | 22 | </view> |
| 23 | - </div> | 23 | + <view style="width: 100%; height: 10rem; position: absolute; left: 0; top: 0; background-color: rgba(0, 0, 0, 0.5);"> |
| 24 | + <view style="position: absolute; left: calc(50% - 200rpx / 2); right: 0; top: 50rpx;"> | ||
| 25 | + <image style="width: 200rpx; height: 200rpx;" mode="aspectFill" src="https://cdn.ipadbiz.cn/meihua/icon_checked@2x.png" /> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | + </view> | ||
| 24 | </template> | 29 | </template> |
| 25 | 30 | ||
| 26 | <script setup> | 31 | <script setup> |
| 27 | -import { ref } from 'vue' | 32 | +import { ref, defineProps, onMounted } from 'vue' |
| 28 | import Taro from '@tarojs/taro' | 33 | import Taro from '@tarojs/taro' |
| 29 | 34 | ||
| 35 | +const props = defineProps({ | ||
| 36 | + status: { | ||
| 37 | + type: String, | ||
| 38 | + default: '', | ||
| 39 | + }, | ||
| 40 | +}); | ||
| 41 | + | ||
| 30 | const handleTap = () => { | 42 | const handleTap = () => { |
| 31 | Taro.navigateTo({ | 43 | Taro.navigateTo({ |
| 32 | url: '../detail/index', | 44 | url: '../detail/index', |
| 33 | }) | 45 | }) |
| 34 | } | 46 | } |
| 35 | 47 | ||
| 48 | +onMounted(() => { | ||
| 49 | + console.warn(props.status); | ||
| 50 | +}) | ||
| 51 | + | ||
| 36 | </script> | 52 | </script> |
| 37 | 53 | ||
| 38 | <style lang="less"> | 54 | <style lang="less"> |
| 39 | .room-card-component { | 55 | .room-card-component { |
| 56 | + position: relative; | ||
| 40 | margin: 1rem; | 57 | margin: 1rem; |
| 41 | background-color: white; | 58 | background-color: white; |
| 42 | box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.1); | 59 | box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.1); | ... | ... |
| 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-19 11:19:03 | 4 | + * @LastEditTime: 2023-12-19 15:01:47 |
| 5 | * @FilePath: /meihuaApp/src/pages/book/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/book/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -12,13 +12,13 @@ | ... | @@ -12,13 +12,13 @@ |
| 12 | <calendar-select @on-dates-change="onDatesChange"></calendar-select> | 12 | <calendar-select @on-dates-change="onDatesChange"></calendar-select> |
| 13 | </view> | 13 | </view> |
| 14 | <view class="book-type"> | 14 | <view class="book-type"> |
| 15 | - <nut-tabs v-model="value" 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"> |
| 16 | - <nut-tab-pane v-for="item in list" :title="'Tab ' + item" :pane-key="item"> | 16 | + <nut-tab-pane v-for="item in tabList" :title="item.title" :pane-key="item.key"> |
| 17 | <view v-if="showContent" class="book-list"> | 17 | <view v-if="showContent" class="book-list"> |
| 18 | <scroll-view ref="refScrollView" :style="scrollStyle" :scroll-y="true" :scroll-with-animation="true" @scrolltolower="onScrollToLower"> | 18 | <scroll-view ref="refScrollView" :style="scrollStyle" :scroll-y="true" :scroll-with-animation="true" @scrolltolower="onScrollToLower"> |
| 19 | - <view v-for="(item, index) in 10" :key="index"> | 19 | + <view v-for="(item, index) in bookList" :key="index"> |
| 20 | - <room-card :key="index"></room-card> | 20 | + <room-card :key="index" :status="item.status"></room-card> |
| 21 | - <view v-if="index === 9" style="height: 2rem;"></view> | 21 | + <view v-if="index === bookList.length - 1" style="height: 2rem;"></view> |
| 22 | </view> | 22 | </view> |
| 23 | </scroll-view> | 23 | </scroll-view> |
| 24 | </view> | 24 | </view> |
| ... | @@ -32,7 +32,7 @@ | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | ||
| 33 | <script setup> | 33 | <script setup> |
| 34 | import Taro from '@tarojs/taro' | 34 | import Taro from '@tarojs/taro' |
| 35 | -import { ref } from "vue"; | 35 | +import { ref, onMounted } from "vue"; |
| 36 | import navBar from '@/components/navBar.vue' | 36 | import navBar from '@/components/navBar.vue' |
| 37 | import calendarSelect from '@/components/calendarSelect.vue' | 37 | import calendarSelect from '@/components/calendarSelect.vue' |
| 38 | import roomCard from '@/components/roomCard.vue' | 38 | import roomCard from '@/components/roomCard.vue' |
| ... | @@ -42,7 +42,40 @@ const onDatesChange = ({ startDate, endDate }) => { | ... | @@ -42,7 +42,40 @@ const onDatesChange = ({ startDate, endDate }) => { |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | const value = ref('0'); | 44 | const value = ref('0'); |
| 45 | -const list = new Array(5).fill(0).map((_, index) => index); | 45 | + |
| 46 | +const tabList = ref([{ | ||
| 47 | + title: '全部', | ||
| 48 | + key: '0', | ||
| 49 | +}, { | ||
| 50 | + title: '总统套房', | ||
| 51 | + key: '1', | ||
| 52 | +}, { | ||
| 53 | + title: '豪华套间', | ||
| 54 | + key: '2', | ||
| 55 | +}, { | ||
| 56 | + title: '家庭豪华间', | ||
| 57 | + key: '3', | ||
| 58 | +}, { | ||
| 59 | + title: '连排别墅', | ||
| 60 | + key: '4', | ||
| 61 | +}]); | ||
| 62 | + | ||
| 63 | +const bookList = ref([]); | ||
| 64 | + | ||
| 65 | +onMounted(() => { | ||
| 66 | + for (let index = 0; index < 5; index++) { | ||
| 67 | + bookList.value.push({ | ||
| 68 | + id: index, | ||
| 69 | + title: '标题', | ||
| 70 | + price: 100, | ||
| 71 | + status: 'all', | ||
| 72 | + }); | ||
| 73 | + } | ||
| 74 | +}); | ||
| 75 | + | ||
| 76 | +const onTabClick = ({ title, paneKey, disabled }) => { | ||
| 77 | + console.warn(title, paneKey); | ||
| 78 | +} | ||
| 46 | </script> | 79 | </script> |
| 47 | 80 | ||
| 48 | <script> | 81 | <script> | ... | ... |
| 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-16 08:29:08 | 4 | + * @LastEditTime: 2023-12-19 15:34:49 |
| 5 | * @FilePath: /meihuaApp/src/pages/confirm/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/confirm/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
| 14 | <view style="color: #7D7C7C; font-size: 0.8rem; margin-top: 0.15rem;">两室 宜住3人</view> | 14 | <view style="color: #7D7C7C; font-size: 0.8rem; margin-top: 0.15rem;">两室 宜住3人</view> |
| 15 | </nut-col> | 15 | </nut-col> |
| 16 | <nut-col :span="8"> | 16 | <nut-col :span="8"> |
| 17 | - <image style="width: 100%; height: 50px; border-radius: 0.25rem;" mode="aspectFill" src="https://img.yzcdn.cn/vant/cat.jpeg" /> | 17 | + <image style="width: 100%; height: 50px; border-radius: 0.25rem;" mode="aspectFill" src="https://cdn.ipadbiz.cn/meihua/img1@2x.png" /> |
| 18 | </nut-col> | 18 | </nut-col> |
| 19 | </nut-row> | 19 | </nut-row> |
| 20 | </view> | 20 | </view> |
| ... | @@ -24,7 +24,7 @@ | ... | @@ -24,7 +24,7 @@ |
| 24 | <view style="font-weight: bold; color: #0B0B0B; font-size: 1rem;">预定房间数</view> | 24 | <view style="font-weight: bold; color: #0B0B0B; font-size: 1rem;">预定房间数</view> |
| 25 | </nut-col> | 25 | </nut-col> |
| 26 | <nut-col :span="8" style="text-align: center;"> | 26 | <nut-col :span="8" style="text-align: center;"> |
| 27 | - <nut-input-number v-model="value" min="1" button-size="30" input-width="50" /> | 27 | + <nut-input-number v-model="book_count" min="1" button-size="30" input-width="50" @blur="onBookCountBlur" /> |
| 28 | </nut-col> | 28 | </nut-col> |
| 29 | </nut-row> | 29 | </nut-row> |
| 30 | </view> | 30 | </view> |
| ... | @@ -79,13 +79,13 @@ | ... | @@ -79,13 +79,13 @@ |
| 79 | <nut-radio-group v-model="radioVal" direction="horizontal"> | 79 | <nut-radio-group v-model="radioVal" direction="horizontal"> |
| 80 | <nut-radio label="1"> | 80 | <nut-radio label="1"> |
| 81 | 本人入住 | 81 | 本人入住 |
| 82 | - <template #icon> <Checklist /> </template> | 82 | + <template #icon><IconFont name="checked"></IconFont></template> |
| 83 | - <template #checkedIcon> <Checklist color="red" /> </template> | 83 | + <template #checkedIcon><IconFont name="checked" color="red"></IconFont></template> |
| 84 | </nut-radio> | 84 | </nut-radio> |
| 85 | <nut-radio label="2"> | 85 | <nut-radio label="2"> |
| 86 | 帮别人订 | 86 | 帮别人订 |
| 87 | - <template #icon> <Checklist /> </template> | 87 | + <template #icon><IconFont name="checked"></IconFont></template> |
| 88 | - <template #checkedIcon> <Checklist color="red" /> </template> | 88 | + <template #checkedIcon><IconFont name="checked" color="red"></IconFont></template> |
| 89 | </nut-radio> | 89 | </nut-radio> |
| 90 | </nut-radio-group> | 90 | </nut-radio-group> |
| 91 | </view> | 91 | </view> |
| ... | @@ -144,9 +144,9 @@ | ... | @@ -144,9 +144,9 @@ |
| 144 | import Taro from '@tarojs/taro' | 144 | import Taro from '@tarojs/taro' |
| 145 | import { ref, reactive, onMounted } from "vue"; | 145 | import { ref, reactive, onMounted } from "vue"; |
| 146 | import { getCurrentPageParam } from "@/utils/weapp"; | 146 | import { getCurrentPageParam } from "@/utils/weapp"; |
| 147 | -import { Checklist } from '@nutui/icons-vue-taro'; | 147 | +import { IconFont } from '@nutui/icons-vue-taro'; |
| 148 | const radioVal = ref('1'); | 148 | const radioVal = ref('1'); |
| 149 | -const value = ref(1); | 149 | +const book_count = ref(1); |
| 150 | const visible = ref(false); | 150 | const visible = ref(false); |
| 151 | const basicData = reactive({ | 151 | const basicData = reactive({ |
| 152 | name: '', | 152 | name: '', |
| ... | @@ -160,7 +160,9 @@ onMounted(() => { | ... | @@ -160,7 +160,9 @@ onMounted(() => { |
| 160 | }); | 160 | }); |
| 161 | 161 | ||
| 162 | const goPay = () => { | 162 | const goPay = () => { |
| 163 | - | 163 | + Taro.navigateTo({ |
| 164 | + url: '/pages/payInfo/index?id=123', | ||
| 165 | + }); | ||
| 164 | } | 166 | } |
| 165 | 167 | ||
| 166 | function showKeyBoard() { | 168 | function showKeyBoard() { |
| ... | @@ -170,6 +172,12 @@ function showKeyBoard() { | ... | @@ -170,6 +172,12 @@ function showKeyBoard() { |
| 170 | function close() { | 172 | function close() { |
| 171 | visible.value = false; | 173 | visible.value = false; |
| 172 | } | 174 | } |
| 175 | + | ||
| 176 | +const onBookCountBlur = (evt) => { | ||
| 177 | + if (isNaN(evt.detail.value)){ | ||
| 178 | + book_count.value = 1; | ||
| 179 | + } | ||
| 180 | +} | ||
| 173 | </script> | 181 | </script> |
| 174 | 182 | ||
| 175 | <script> | 183 | <script> | ... | ... |
| 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-15 17:10:51 | 4 | + * @LastEditTime: 2023-12-19 15:21:03 |
| 5 | * @FilePath: /meihuaApp/src/pages/detail/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/detail/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | <view style="position: relative; height: 100vh;"> | 9 | <view style="position: relative; height: 100vh;"> |
| 10 | <nut-swiper :init-page="page" :pagination-visible="true" pagination-color="#426543" auto-play="5000"> | 10 | <nut-swiper :init-page="page" :pagination-visible="true" pagination-color="#426543" auto-play="5000"> |
| 11 | - <nut-swiper-item v-for="(item, index) in 3" :key="index"> | 11 | + <nut-swiper-item v-for="(item, index) in state.imgData" :key="index"> |
| 12 | - <image style="width: 100%; height: 150px;" mode="aspectFill" src="https://img.yzcdn.cn/vant/cat.jpeg" /> | 12 | + <image @tap="showFn" style="width: 100%; height: 150px;" mode="aspectFill" :src="item.src" /> |
| 13 | </nut-swiper-item> | 13 | </nut-swiper-item> |
| 14 | </nut-swiper> | 14 | </nut-swiper> |
| 15 | <view style="padding: 1rem;"> | 15 | <view style="padding: 1rem;"> |
| 16 | <view style="color: #0B0B0B; font-size: 1rem; font-weight: bold;">非凡魅力豪华总统套房</view> | 16 | <view style="color: #0B0B0B; font-size: 1rem; font-weight: bold;">非凡魅力豪华总统套房</view> |
| 17 | <view style="color: #7D7C7C; font-size: 0.8rem;">两室 宜住3人</view> | 17 | <view style="color: #7D7C7C; font-size: 0.8rem;">两室 宜住3人</view> |
| 18 | </view> | 18 | </view> |
| 19 | - <view id="book-cal" class="book-cal"> | 19 | + <view vif="!showBook" style="width: 100%; height: 1rpx; background-color: rgb(244, 244, 244);"></view> |
| 20 | + <view v-if="showBook" id="book-cal" class="book-cal"> | ||
| 20 | <calendar-select @on-dates-change="onDatesChange"></calendar-select> | 21 | <calendar-select @on-dates-change="onDatesChange"></calendar-select> |
| 21 | </view> | 22 | </view> |
| 22 | <view style="padding: 1rem; text-align: center; font-weight: bold;">房间介绍</view> | 23 | <view style="padding: 1rem; text-align: center; font-weight: bold;">房间介绍</view> |
| 23 | <view style="padding: 0 1rem;">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem quibusdam nostrum numquam quaerat corporis totam similique expedita, omnis ratione aut magnam nihil. Modi repudiandae at minus enim beatae fugit. Modi.</view> | 24 | <view style="padding: 0 1rem;">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quidem quibusdam nostrum numquam quaerat corporis totam similique expedita, omnis ratione aut magnam nihil. Modi repudiandae at minus enim beatae fugit. Modi.</view> |
| 24 | - <view style="position: fixed; bottom: 0; left: 0; right: 0; background-color: #fff; height: 4rem; padding: 30rpx 30rpx 20rpx 30rpx;box-shadow: 0px -5px 4px 0px rgba(0,0,0,0.07);"> | 25 | + <view v-if="showBook" style="position: fixed; bottom: 0; left: 0; right: 0; background-color: #fff; height: 4rem; padding: 30rpx 30rpx 20rpx 30rpx;box-shadow: 0px -5px 4px 0px rgba(0,0,0,0.07);"> |
| 25 | <nut-row> | 26 | <nut-row> |
| 26 | <nut-col :span="18"> | 27 | <nut-col :span="18"> |
| 27 | <view style="height: 2rem; margin-left: 0.5rem; display: flex; align-items: center;"> | 28 | <view style="height: 2rem; margin-left: 0.5rem; display: flex; align-items: center;"> |
| ... | @@ -34,17 +35,27 @@ | ... | @@ -34,17 +35,27 @@ |
| 34 | </nut-col> | 35 | </nut-col> |
| 35 | </nut-row> | 36 | </nut-row> |
| 36 | </view> | 37 | </view> |
| 38 | + <nut-image-preview :show="state.showPreview" :images="state.imgData" :is-Loop="false" @close="hideFn" /> | ||
| 37 | </view> | 39 | </view> |
| 38 | </template> | 40 | </template> |
| 39 | 41 | ||
| 40 | <script setup> | 42 | <script setup> |
| 41 | import Taro from '@tarojs/taro' | 43 | import Taro from '@tarojs/taro' |
| 42 | -import { ref } from "vue"; | 44 | +import { ref, computed, reactive } from "vue"; |
| 43 | import calendarSelect from '@/components/calendarSelect.vue' | 45 | import calendarSelect from '@/components/calendarSelect.vue' |
| 44 | 46 | ||
| 47 | +// TODO: 到时候根据后端实际字段修改 | ||
| 48 | +// const book_status = ref('已约满'); | ||
| 49 | +const book_status = ref(''); | ||
| 50 | + | ||
| 51 | +const showBook = computed(() => { | ||
| 52 | + return book_status.value !== '已约满' | ||
| 53 | +}); | ||
| 54 | + | ||
| 45 | const onDatesChange = ({ startDate, endDate }) => { | 55 | const onDatesChange = ({ startDate, endDate }) => { |
| 46 | console.warn(startDate, endDate); | 56 | console.warn(startDate, endDate); |
| 47 | } | 57 | } |
| 58 | + | ||
| 48 | const page = ref(1); | 59 | const page = ref(1); |
| 49 | 60 | ||
| 50 | const goToConfirm = () => { | 61 | const goToConfirm = () => { |
| ... | @@ -52,6 +63,32 @@ const goToConfirm = () => { | ... | @@ -52,6 +63,32 @@ const goToConfirm = () => { |
| 52 | url: '/pages/confirm/index?id=123', | 63 | url: '/pages/confirm/index?id=123', |
| 53 | }) | 64 | }) |
| 54 | } | 65 | } |
| 66 | + | ||
| 67 | +const state = reactive({ | ||
| 68 | + showPreview: false, | ||
| 69 | + imgData: [ | ||
| 70 | + { | ||
| 71 | + src: 'https://cdn.ipadbiz.cn/meihua/img1@2x.png' | ||
| 72 | + }, | ||
| 73 | + { | ||
| 74 | + src: 'https://cdn.ipadbiz.cn/meihua/banner1@2x.png' | ||
| 75 | + }, | ||
| 76 | + { | ||
| 77 | + src: 'https://cdn.ipadbiz.cn/meihua/img1@2x.png' | ||
| 78 | + }, | ||
| 79 | + { | ||
| 80 | + src: 'https://cdn.ipadbiz.cn/meihua/img1@2x.png' | ||
| 81 | + } | ||
| 82 | + ] | ||
| 83 | +}); | ||
| 84 | + | ||
| 85 | +const showFn = () => { | ||
| 86 | + state.showPreview = true; | ||
| 87 | +}; | ||
| 88 | + | ||
| 89 | +const hideFn = () => { | ||
| 90 | + state.showPreview = false; | ||
| 91 | +}; | ||
| 55 | </script> | 92 | </script> |
| 56 | 93 | ||
| 57 | <script> | 94 | <script> | ... | ... |
| 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-14 17:20:42 | 4 | + * @LastEditTime: 2023-12-19 14:37:58 |
| 5 | - * @FilePath: /meihua-island-book/src/pages/index/index.config.js | 5 | + * @FilePath: /meihuaApp/src/pages/index/index.config.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| 8 | export default { | 8 | export default { |
| 9 | - navigationBarTitleText: '梅花岛', | 9 | + navigationBarTitleText: '梅花岛民宿', |
| 10 | usingComponents: { | 10 | usingComponents: { |
| 11 | }, | 11 | }, |
| 12 | enableShareAppMessage: true | 12 | enableShareAppMessage: true | ... | ... |
| 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-15 13:25:58 | 4 | + * @LastEditTime: 2023-12-19 14:35:59 |
| 5 | * @FilePath: /meihuaApp/src/pages/index/index.vue | 5 | * @FilePath: /meihuaApp/src/pages/index/index.vue |
| 6 | * @Description: 首页 | 6 | * @Description: 首页 |
| 7 | --> | 7 | --> |
| 8 | <template> | 8 | <template> |
| 9 | - <div> | 9 | + <view> |
| 10 | <scroll-view :style="scrollStyle" :scroll-y="true" :scroll-top="scrollTop" :scroll-with-animation="true" @scroll="onScroll" @scrolltoupper="onScrollToUpper" @scrolltolower="onScrollToLower"> | 10 | <scroll-view :style="scrollStyle" :scroll-y="true" :scroll-top="scrollTop" :scroll-with-animation="true" @scroll="onScroll" @scrolltoupper="onScrollToUpper" @scrolltolower="onScrollToLower"> |
| 11 | <view style="position: relative;"> | 11 | <view style="position: relative;"> |
| 12 | - <image :style="coverStyle" mode="aspectFill" src="https://img.yzcdn.cn/vant/cat.jpeg" /> | 12 | + <image :style="coverStyle" mode="aspectFill" src="https://cdn.ipadbiz.cn/meihua/banner1@2x.png" /> |
| 13 | - <div class="arrow-down" @tap="onArrowDown"> | 13 | + <!-- <div class="arrow-down" @tap="onArrowDown"> |
| 14 | <image style="width: 2rem; height: 2rem;" :src="arrowDownImg"/> | 14 | <image style="width: 2rem; height: 2rem;" :src="arrowDownImg"/> |
| 15 | - </div> | 15 | + </div> --> |
| 16 | + <view @tap="onArrowDown" style="position: absolute; right: 0; left: calc(50% - 30rpx); bottom: 1%;"> | ||
| 17 | + <IconFont color="#f9f9f9" size="30" name="joy-smile" class="nut-icon-am-jump nut-icon-am-infinite"></IconFont> | ||
| 16 | </view> | 18 | </view> |
| 17 | - <view style="text-align: center; font-weight: bold; font-size: 1.25rem; margin-top: 1rem;">热门推荐</view> | 19 | + </view> |
| 20 | + <view style="text-align: center; font-weight: bold; font-size: 1.25rem; padding: 1rem 0 0.25rem; background-color: #f9f9f9;">热门推荐</view> | ||
| 18 | <view style="background-color: #f9f9f9; overflow: auto;"> | 21 | <view style="background-color: #f9f9f9; overflow: auto;"> |
| 19 | - <room-card v-for="(item, index) in 20" :key="index"></room-card> | 22 | + <room-card v-for="(item, index) in 5" :key="index"></room-card> |
| 20 | </view> | 23 | </view> |
| 21 | </scroll-view> | 24 | </scroll-view> |
| 22 | <view style="height: 6rem;"></view> | 25 | <view style="height: 6rem;"></view> |
| 23 | <nav-bar activated="index" /> | 26 | <nav-bar activated="index" /> |
| 24 | - </div> | 27 | + </view> |
| 25 | </template> | 28 | </template> |
| 26 | 29 | ||
| 27 | <script setup> | 30 | <script setup> |
| 28 | import Taro from '@tarojs/taro' | 31 | import Taro from '@tarojs/taro' |
| 32 | +import { IconFont } from '@nutui/icons-vue-taro'; | ||
| 29 | import { ref } from 'vue'; | 33 | import { ref } from 'vue'; |
| 30 | import roomCard from '@/components/roomCard.vue' | 34 | import roomCard from '@/components/roomCard.vue' |
| 31 | import arrowDownImg from '@/assets/images/arrow-down.png' | 35 | import arrowDownImg from '@/assets/images/arrow-down.png' | ... | ... |
-
Please register or login to post a comment