Showing
4 changed files
with
17 additions
and
17 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-01-16 10:06:47 | 2 | * @Date: 2024-01-16 10:06:47 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-30 10:50:03 | 4 | + * @LastEditTime: 2024-01-30 15:43:22 |
| 5 | * @FilePath: /xysBooking/src/components/qrCode.vue | 5 | * @FilePath: /xysBooking/src/components/qrCode.vue |
| 6 | * @Description: 预约码卡组件 | 6 | * @Description: 预约码卡组件 |
| 7 | --> | 7 | --> |
| ... | @@ -61,7 +61,7 @@ import { Cookies, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils | ... | @@ -61,7 +61,7 @@ import { Cookies, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils |
| 61 | //import { } from '@/utils/generateModules.js' | 61 | //import { } from '@/utils/generateModules.js' |
| 62 | //import { } from '@/utils/generateIcons.js' | 62 | //import { } from '@/utils/generateIcons.js' |
| 63 | //import { } from '@/composables' | 63 | //import { } from '@/composables' |
| 64 | - | 64 | +import { formatDatetime } from '@/utils/tools'; |
| 65 | import { qrcodeListAPI, qrcodeStatusAPI, billPersonAPI } from '@/api/index' | 65 | import { qrcodeListAPI, qrcodeStatusAPI, billPersonAPI } from '@/api/index' |
| 66 | import { useGo } from '@/hooks/useGo' | 66 | import { useGo } from '@/hooks/useGo' |
| 67 | const go = useGo(); | 67 | const go = useGo(); |
| ... | @@ -205,11 +205,11 @@ onMounted(async () => { | ... | @@ -205,11 +205,11 @@ onMounted(async () => { |
| 205 | // 生成二维码地址 | 205 | // 生成二维码地址 |
| 206 | item.qr_code_url = 'http://oa.onwall.cn/admin?m=srv&a=get_qrcode&key=' + item.qr_code; | 206 | item.qr_code_url = 'http://oa.onwall.cn/admin?m=srv&a=get_qrcode&key=' + item.qr_code; |
| 207 | // 二维码使用时间 | 207 | // 二维码使用时间 |
| 208 | - let begin_time = item.begin_time.slice(0, -3); | 208 | + let begin_time = item.begin_time.slice(0, -6); |
| 209 | - let end_time = item.end_time.slice(0, -3); | 209 | + let end_time = item.end_time.slice(0, -6); |
| 210 | let str = begin_time + ' ' + end_time; | 210 | let str = begin_time + ' ' + end_time; |
| 211 | // | 211 | // |
| 212 | - item.datetime = `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`; | 212 | + item.datetime = formatDatetime({ begin_time: item.begin_time, end_time: item.end_time }) |
| 213 | item.sort = 0; | 213 | item.sort = 0; |
| 214 | }); | 214 | }); |
| 215 | const { code: status_code, data: status_data } = await qrcodeStatusAPI({ qr_code: data[select_index.value]?.qr_code }); | 215 | const { code: status_code, data: status_data } = await qrcodeStatusAPI({ qr_code: data[select_index.value]?.qr_code }); | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Date: 2022-04-18 15:59:42 | 2 | * @Date: 2022-04-18 15:59:42 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-30 14:00:25 | 4 | + * @LastEditTime: 2024-01-30 15:43:33 |
| 5 | * @FilePath: /xysBooking/src/utils/tools.js | 5 | * @FilePath: /xysBooking/src/utils/tools.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -72,8 +72,8 @@ const strExist = (array, str) => { | ... | @@ -72,8 +72,8 @@ const strExist = (array, str) => { |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | const formatDatetime = (data) => { // 格式化日期 | 74 | const formatDatetime = (data) => { // 格式化日期 |
| 75 | - let begin_time = data?.begin_time.slice(0, -3); | 75 | + let begin_time = data?.begin_time.slice(0, -6); |
| 76 | - let end_time = data?.end_time.slice(0, -3); | 76 | + let end_time = data?.end_time.slice(0, -6); |
| 77 | let str = begin_time + ' ' + end_time; | 77 | let str = begin_time + ' ' + end_time; |
| 78 | return `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`; | 78 | return `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`; |
| 79 | } | 79 | } | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2024-01-15 13:35:51 | 2 | * @Date: 2024-01-15 13:35:51 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-30 15:21:55 | 4 | + * @LastEditTime: 2024-01-30 15:37:28 |
| 5 | * @FilePath: /xysBooking/src/views/booking.vue | 5 | * @FilePath: /xysBooking/src/views/booking.vue |
| 6 | * @Description: 预约页面 | 6 | * @Description: 预约页面 |
| 7 | --> | 7 | --> |
| ... | @@ -51,7 +51,7 @@ | ... | @@ -51,7 +51,7 @@ |
| 51 | <div class="left"> | 51 | <div class="left"> |
| 52 | <van-icon v-if="checked_time !== index" :name="icon_select1" /> | 52 | <van-icon v-if="checked_time !== index" :name="icon_select1" /> |
| 53 | <van-icon v-else :name="icon_select2" /> | 53 | <van-icon v-else :name="icon_select2" /> |
| 54 | - {{ item.begin_time }}-{{ item.end_time }} | 54 | + {{ item.begin_time.slice(0, -3) }}-{{ item.end_time.slice(0, -3) }} |
| 55 | <span class="price">¥ {{ item.price }}</span> | 55 | <span class="price">¥ {{ item.price }}</span> |
| 56 | </div> | 56 | </div> |
| 57 | <div class="right"> | 57 | <div class="right"> |
| ... | @@ -289,7 +289,7 @@ const nextBtn = () => { | ... | @@ -289,7 +289,7 @@ const nextBtn = () => { |
| 289 | show_error.value = true; | 289 | show_error.value = true; |
| 290 | error_message.value = '请选择日期和时间段'; | 290 | error_message.value = '请选择日期和时间段'; |
| 291 | } else { | 291 | } else { |
| 292 | - go('/submit', { date: checked_day.value, time: `${timePeriod.value[checked_time.value]['begin_time']}-${timePeriod.value[checked_time.value]['end_time']}`, price: checked_day_price.value }); | 292 | + go('/submit', { date: checked_day.value, time: `${timePeriod.value[checked_time.value]['begin_time'].slice(0, -3)}-${timePeriod.value[checked_time.value]['end_time'].slice(0, -3)}`, price: checked_day_price.value }); |
| 293 | } | 293 | } |
| 294 | } | 294 | } |
| 295 | </script> | 295 | </script> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-06-21 10:23:09 | 2 | * @Date: 2023-06-21 10:23:09 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2024-01-30 15:20:20 | 4 | + * @LastEditTime: 2024-01-30 15:35:17 |
| 5 | * @FilePath: /xysBooking/src/views/index.vue | 5 | * @FilePath: /xysBooking/src/views/index.vue |
| 6 | * @Description: 预约页首页 | 6 | * @Description: 预约页首页 |
| 7 | --> | 7 | --> |
| ... | @@ -33,7 +33,7 @@ | ... | @@ -33,7 +33,7 @@ |
| 33 | <div class="booking-wrapper"> | 33 | <div class="booking-wrapper"> |
| 34 | <div class="booking" @click="toBooking"> | 34 | <div class="booking" @click="toBooking"> |
| 35 | <div><van-icon size="3rem" color="#FFFFFF" :name="icon_1" /></div> | 35 | <div><van-icon size="3rem" color="#FFFFFF" :name="icon_1" /></div> |
| 36 | - <div style="color: #FFF;">马上预约</div> | 36 | + <div style="color: #FFF;">开始预约</div> |
| 37 | </div> | 37 | </div> |
| 38 | </div> | 38 | </div> |
| 39 | </div> | 39 | </div> |
| ... | @@ -171,16 +171,16 @@ useClickAway(root, () => { | ... | @@ -171,16 +171,16 @@ useClickAway(root, () => { |
| 171 | font-size: 1.1rem; | 171 | font-size: 1.1rem; |
| 172 | 172 | ||
| 173 | .booking-wrapper { | 173 | .booking-wrapper { |
| 174 | - height: 25vh; | 174 | + height: 19vh; |
| 175 | - width: 25vh; | 175 | + width: 19vh; |
| 176 | border-radius: 50%; | 176 | border-radius: 50%; |
| 177 | background-color: rgba(166, 121, 57, 0.26); | 177 | background-color: rgba(166, 121, 57, 0.26); |
| 178 | display: flex; | 178 | display: flex; |
| 179 | align-items: center; | 179 | align-items: center; |
| 180 | justify-content: center; | 180 | justify-content: center; |
| 181 | .booking { | 181 | .booking { |
| 182 | - height: 21.5vh; | 182 | + height: 17vh; |
| 183 | - width: 21.5vh; | 183 | + width: 17vh; |
| 184 | border-radius: 50%; | 184 | border-radius: 50%; |
| 185 | background-color: #A67939; | 185 | background-color: #A67939; |
| 186 | display: flex; | 186 | display: flex; | ... | ... |
-
Please register or login to post a comment