Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
xysBooking
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
2024-01-30 15:45:48 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f23be61c6b2e3fb6ee0aa04bba8bae1508385b8b
f23be61c
1 parent
9e0bcbf4
日期显示隐藏秒数,首页入口显示样式调整
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
src/components/qrCode.vue
src/utils/tools.js
src/views/booking.vue
src/views/index.vue
src/components/qrCode.vue
View file @
f23be61
<!--
* @Date: 2024-01-16 10:06:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-30 1
0:50:03
* @LastEditTime: 2024-01-30 1
5:43:22
* @FilePath: /xysBooking/src/components/qrCode.vue
* @Description: 预约码卡组件
-->
...
...
@@ -61,7 +61,7 @@ import { Cookies, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { formatDatetime } from '@/utils/tools';
import { qrcodeListAPI, qrcodeStatusAPI, billPersonAPI } from '@/api/index'
import { useGo } from '@/hooks/useGo'
const go = useGo();
...
...
@@ -205,11 +205,11 @@ onMounted(async () => {
// 生成二维码地址
item.qr_code_url = 'http://oa.onwall.cn/admin?m=srv&a=get_qrcode&key=' + item.qr_code;
// 二维码使用时间
let begin_time = item.begin_time.slice(0, -
3
);
let end_time = item.end_time.slice(0, -
3
);
let begin_time = item.begin_time.slice(0, -
6
);
let end_time = item.end_time.slice(0, -
6
);
let str = begin_time + ' ' + end_time;
//
item.datetime =
`${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`;
item.datetime =
formatDatetime({ begin_time: item.begin_time, end_time: item.end_time })
item.sort = 0;
});
const { code: status_code, data: status_data } = await qrcodeStatusAPI({ qr_code: data[select_index.value]?.qr_code });
...
...
src/utils/tools.js
View file @
f23be61
/*
* @Date: 2022-04-18 15:59:42
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-30 1
4:00:25
* @LastEditTime: 2024-01-30 1
5:43:33
* @FilePath: /xysBooking/src/utils/tools.js
* @Description: 文件描述
*/
...
...
@@ -72,8 +72,8 @@ const strExist = (array, str) => {
}
const
formatDatetime
=
(
data
)
=>
{
// 格式化日期
let
begin_time
=
data
?.
begin_time
.
slice
(
0
,
-
3
);
let
end_time
=
data
?.
end_time
.
slice
(
0
,
-
3
);
let
begin_time
=
data
?.
begin_time
.
slice
(
0
,
-
6
);
let
end_time
=
data
?.
end_time
.
slice
(
0
,
-
6
);
let
str
=
begin_time
+
' '
+
end_time
;
return
`
${
str
.
split
(
' '
)[
0
]}
${
str
.
split
(
' '
)[
1
]}
-
${
str
.
split
(
' '
)[
3
]}
`
;
}
...
...
src/views/booking.vue
View file @
f23be61
<!--
* @Date: 2024-01-15 13:35:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-30 15:
21:55
* @LastEditTime: 2024-01-30 15:
37:28
* @FilePath: /xysBooking/src/views/booking.vue
* @Description: 预约页面
-->
...
...
@@ -51,7 +51,7 @@
<div class="left">
<van-icon v-if="checked_time !== index" :name="icon_select1" />
<van-icon v-else :name="icon_select2" />
{{ item.begin_time
}}-{{ item.end_time
}}
{{ item.begin_time
.slice(0, -3) }}-{{ item.end_time.slice(0, -3)
}}
<span class="price">¥ {{ item.price }}</span>
</div>
<div class="right">
...
...
@@ -289,7 +289,7 @@ const nextBtn = () => {
show_error.value = true;
error_message.value = '请选择日期和时间段';
} else {
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 });
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 });
}
}
</script>
...
...
src/views/index.vue
View file @
f23be61
<!--
* @Date: 2023-06-21 10:23:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-30 15:
20:20
* @LastEditTime: 2024-01-30 15:
35:17
* @FilePath: /xysBooking/src/views/index.vue
* @Description: 预约页首页
-->
...
...
@@ -33,7 +33,7 @@
<div class="booking-wrapper">
<div class="booking" @click="toBooking">
<div><van-icon size="3rem" color="#FFFFFF" :name="icon_1" /></div>
<div style="color: #FFF;">
马上
预约</div>
<div style="color: #FFF;">
开始
预约</div>
</div>
</div>
</div>
...
...
@@ -171,16 +171,16 @@ useClickAway(root, () => {
font-size: 1.1rem;
.booking-wrapper {
height:
25
vh;
width:
25
vh;
height:
19
vh;
width:
19
vh;
border-radius: 50%;
background-color: rgba(166, 121, 57, 0.26);
display: flex;
align-items: center;
justify-content: center;
.booking {
height:
21.5
vh;
width:
21.5
vh;
height:
17
vh;
width:
17
vh;
border-radius: 50%;
background-color: #A67939;
display: flex;
...
...
Please
register
or
login
to post a comment