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 14:03:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1ce43f90ee0903cb9fd6d3467496a6811d3bd82
f1ce43f9
1 parent
2c78d3ef
fix 格式化日期的方法提到外面去
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
48 deletions
src/components/qrCodeSearch.vue
src/utils/tools.js
src/views/bookingDetail.vue
src/views/bookingList.vue
src/views/callback.vue
src/views/notice.vue
src/views/success.vue
src/components/qrCodeSearch.vue
View file @
f1ce43f
<!--
* @Date: 2024-01-16 10:06:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-
29 17:11:29
* @LastEditTime: 2024-01-
30 14:01:43
* @FilePath: /xysBooking/src/components/qrCodeSearch.vue
* @Description: 预约码卡组件
-->
...
...
@@ -41,7 +41,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { formatDatetime } from '@/utils/tools';
import { qrcodeListAPI, qrcodeStatusAPI, billPersonAPI, queryQrCodeAPI } from '@/api/index'
const $route = useRoute();
const $router = useRouter();
...
...
@@ -54,13 +54,6 @@ const props = defineProps({
},
});
const formatDatetime = (data) => { // 格式化日期
let begin_time = data.begin_time?.slice(0, -3);
let end_time = data.end_time?.slice(0, -3);
let str = begin_time + ' ' + end_time;
return `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`;
}
const userinfo = ref({});
watch(
...
...
src/utils/tools.js
View file @
f1ce43f
/*
* @Date: 2022-04-18 15:59:42
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
2-06-30 13:54:32
* @FilePath: /
tswj
/src/utils/tools.js
* @LastEditTime: 202
4-01-30 14:00:25
* @FilePath: /
xysBooking
/src/utils/tools.js
* @Description: 文件描述
*/
import
dayjs
from
'dayjs'
;
...
...
@@ -71,4 +71,11 @@ const strExist = (array, str) => {
return
exist
.
length
>
0
}
export
{
formatDate
,
wxInfo
,
hasEllipsis
,
parseQueryString
,
strExist
};
const
formatDatetime
=
(
data
)
=>
{
// 格式化日期
let
begin_time
=
data
?.
begin_time
.
slice
(
0
,
-
3
);
let
end_time
=
data
?.
end_time
.
slice
(
0
,
-
3
);
let
str
=
begin_time
+
' '
+
end_time
;
return
`
${
str
.
split
(
' '
)[
0
]}
${
str
.
split
(
' '
)[
1
]}
-
${
str
.
split
(
' '
)[
3
]}
`
;
}
export
{
formatDate
,
wxInfo
,
hasEllipsis
,
parseQueryString
,
strExist
,
formatDatetime
};
...
...
src/views/bookingDetail.vue
View file @
f1ce43f
<!--
* @Date: 2024-01-16 13:19:23
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-30 1
0:55:56
* @LastEditTime: 2024-01-30 1
4:00:47
* @FilePath: /xysBooking/src/views/bookingDetail.vue
* @Description: 预约记录详情
-->
...
...
@@ -56,6 +56,7 @@ import qrCode from '@/components/qrCode';
import { showConfirmDialog } from 'vant';
import { showSuccessToast, showFailToast } from 'vant';
import { billInfoAPI, icbcRefundAPI } from '@/api/index'
import { formatDatetime } from '@/utils/tools';
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
...
...
@@ -110,13 +111,6 @@ const CodeStatus = {
REFUNDING: '11'
}
const formatDatetime = (data) => { // 格式化日期
let begin_time = data?.begin_time.slice(0, -3);
let end_time = data?.end_time.slice(0, -3);
let str = begin_time + ' ' + end_time;
return `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`;
}
onMounted(async () => {
const { code, data } = await billInfoAPI({ pay_id });
if (code) {
...
...
src/views/bookingList.vue
View file @
f1ce43f
<!--
* @Date: 2024-01-16 11:37:10
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-
27 11:26:24
* @LastEditTime: 2024-01-
30 14:02:01
* @FilePath: /xysBooking/src/views/bookingList.vue
* @Description: 预约记录列表页
-->
...
...
@@ -33,6 +33,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { billListAPI } from '@/api/index'
import { formatDatetime } from '@/utils/tools';
import reserveCard from '@/components/reserveCard.vue'
const $route = useRoute();
const $router = useRouter();
...
...
@@ -47,13 +48,6 @@ const loading = ref(false);
const finished = ref(false);
const finishedTextStatus = ref(false);
const formatDatetime = (data) => { // 格式化日期
let begin_time = data.begin_time.slice(0, -3);
let end_time = data.end_time.slice(0, -3);
let str = begin_time + ' ' + end_time;
return `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`;
}
onMounted(async () => {
const { code, data } = await billListAPI({ page: page.value, row_num: limit.value });
if (code) {
...
...
src/views/callback.vue
View file @
f1ce43f
<!--
* @Date: 2024-01-26 10:24:45
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-
29 14:50:15
* @LastEditTime: 2024-01-
30 14:02:16
* @FilePath: /xysBooking/src/views/callback.vue
* @Description: 反馈页面
-->
...
...
@@ -41,19 +41,12 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
//import { } from '@/utils/generateModules.js'
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { formatDatetime } from '@/utils/tools';
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
const billInfo = ref({});
const formatDatetime = (data) => { // 格式化日期
let begin_time = data.begin_time.slice(0, -3);
let end_time = data.end_time.slice(0, -3);
let str = begin_time + ' ' + end_time;
return `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`;
}
const PAY_STATUS = {
SUCCESS: '0',
FAIL: '1',
...
...
src/views/notice.vue
View file @
f1ce43f
<!--
* @Date: 2024-01-15 11:43:01
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-
29 06:59:32
* @LastEditTime: 2024-01-
30 13:37:37
* @FilePath: /xysBooking/src/views/notice.vue
* @Description: 文件描述
-->
...
...
@@ -24,7 +24,7 @@
<p>10、您若有任何问题和困难,请向身边的法师或义工咨询、求助,或直接与客堂联系。电话:0512-65349545.</p>
<p>11、预约如需退款,请在初七之后,到客堂办理。</p> -->
<p v-for="(item, index) in note_text" :key="index">{{ item }}</p>
<p>谢谢您的支持与配合。祝您新春吉祥、万事如意</p>
<p>谢谢您的支持与配合。祝您新春吉祥、万事如意
。
</p>
</div>
<div style="height: 8rem"></div>
<div class="footer">
...
...
src/views/success.vue
View file @
f1ce43f
<!--
* @Date: 2024-01-15 18:28:25
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-
24 10:45:51
* @LastEditTime: 2024-01-
30 14:02:25
* @FilePath: /xysBooking/src/views/success.vue
* @Description: 预约成功提示页面
-->
...
...
@@ -39,7 +39,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { billInfoAPI, payPrepareAPI } from '@/api/index'
import { formatDatetime } from '@/utils/tools';
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
...
...
@@ -55,13 +55,6 @@ const goToDetail = () => {
const billInfo = ref({});
const formatDatetime = (data) => { // 格式化日期
let begin_time = data.begin_time.slice(0, -3);
let end_time = data.end_time.slice(0, -3);
let str = begin_time + ' ' + end_time;
return `${str.split(' ')[0]} ${str.split(' ')[1]}-${str.split(' ')[3]}`;
}
onMounted(async () => {
// 获取订单详情
const { code, data } = await billInfoAPI({ pay_id: $route.query.pay_id });
...
...
Please
register
or
login
to post a comment