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
2026-01-22 11:25:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8d0527032642031f0f36b6e0eafb408cb4ecd6ab
8d052703
1 parent
b107d0e4
feat(预约): 添加period_type参数到预约和提交流程
在预约和提交页面中添加period_type参数,确保时间段类型信息能正确传递到后端API
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
src/views/booking.vue
src/views/submit.vue
src/views/booking.vue
View file @
8d05270
...
...
@@ -308,7 +308,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'].slice(0, -3)}-${timePeriod.value[checked_time.value]['end_time'].slice(0, -3)}`, 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
, period_type: timePeriod.value[checked_time.value].period_type
});
}
}
</script>
...
...
src/views/submit.vue
View file @
8d05270
<!--
* @Date: 2024-01-15 16:25:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
4-01-30 15:18:5
8
* @FilePath: /xysBooking/src/views/submit.vue
* @LastEditTime: 202
6-01-22 11:21:0
8
* @FilePath: /
git/
xysBooking/src/views/submit.vue
* @Description: 预约人员信息
-->
<template>
...
...
@@ -17,8 +17,8 @@
<div v-if="visitorList.length" class="visitors-list">
<div v-for="(item, index) in visitorList" :key="index" @click="addVisitor(item)" class="visitor-item">
<div style="margin-right: 1rem;">
<van-icon v-if="!checked_visitors.includes(item.id)" :name="icon_check1"
/>
<van-icon v-else :name="icon_check2"
/>
<van-icon v-if="!checked_visitors.includes(item.id)" :name="icon_check1"
style="margin-right: 0.25rem;" />
<van-icon v-else :name="icon_check2"
style="margin-right: 0.25rem;" />
</div>
<div>
<p style="color: #A67939;">{{ item.name }}</p>
...
...
@@ -108,6 +108,7 @@ const addVisitor = (item) => {
const date = $route.query.date;
const time = $route.query.time;
const price = $route.query.price;
const period_type = $route.query.period_type;
const total = computed(() => {
return price * checked_visitors.value.length;
...
...
@@ -125,7 +126,7 @@ const submitBtn = async () => {
showToast('请先添加参观者')
} else {
// TAG: 提交订单跳转到支付页面
const { code, data } = await addReserveAPI({ reserve_date: date, begin_time: time.split('-')[0], end_time: time.split('-')[1], person_id_list: JSON.stringify(checked_visitors.value) });
const { code, data } = await addReserveAPI({ reserve_date: date, begin_time: time.split('-')[0], end_time: time.split('-')[1], person_id_list: JSON.stringify(checked_visitors.value)
, period_type
});
if (code) {
const pay_url = `/srv/?f=reserve&a=icbc_pay&pay_id=${data.pay_id}`;
location.href = pay_url; // 跳转支付页面
...
...
@@ -134,7 +135,7 @@ const submitBtn = async () => {
}
onMounted(async () => {
const { code, data } = await personListAPI({ reserve_date: date, begin_time: time.split('-')[0], end_time: time.split('-')[1] });
const { code, data } = await personListAPI({ reserve_date: date, begin_time: time.split('-')[0], end_time: time.split('-')[1]
, period_type
});
if (code) {
visitorList.value = data;
}
...
...
Please
register
or
login
to post a comment