hookehuyr

fix

<!--
* @Date: 2023-06-13 13:26:46
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-15 13:06:31
* @LastEditTime: 2024-01-18 11:10:18
* @FilePath: /xysBooking/index.html
* @Description: 文件描述
* @Description: 西园寺预约
-->
<!DOCTYPE html>
<html lang='zh'>
......
<!--
* @Date: 2023-06-13 13:26:46
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-15 17:46:14
* @LastEditTime: 2024-01-18 11:11:46
* @FilePath: /xysBooking/src/App.vue
* @Description: 启动页
-->
<template>
<!-- <div> -->
<router-view></router-view>
<!-- </div> -->
<router-view></router-view>
</template>
<script setup>
......
<!--
* @Date: 2024-01-15 17:39:29
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-18 10:23:30
* @LastEditTime: 2024-01-18 11:14:49
* @FilePath: /xysBooking/src/views/addVisitor.vue
* @Description: 文件描述
* @Description: 添加参观者页面
-->
<template>
<div class="add-visitor-page">
......@@ -63,33 +63,31 @@ import { addPersonAPI } from '@/api/index'
const $route = useRoute();
const $router = useRouter();
useTitle($route.meta.title);
const go = useGo();
const username = ref('');
const idCode = ref('');
const isError = ref(false);
const show_error = ref(false);
const error_message = ref('');
const checkUsername = () => {
const checkUsername = () => { // 检查用户名是否为空
let flag = true;
if (username.value) {
} else {
if (!username.value) {
show_error.value = true;
error_message.value = '参观者名称不能为空';
flag = false;
}
return flag;
}
const checkIdCode = () => {
const checkIdCode = () => { // 检查身份证号是否为空
let flag = true;
if (idCode.value.length === 15) { // 15位身份证号码不校验
flag = true;
} else {
if (validateCIN(idCode.value)) {
} else {
if (!validateCIN(idCode.value)) {
show_error.value = true;
error_message.value = '请检查身份证号码';
flag = false;
......@@ -116,14 +114,15 @@ const columns = [
{ text: '身份证', value: '1' },
{ text: '其他证件', value: '3' },
];
const fieldValue = ref('身份证');
const id_type = ref('1');
const onConfirm = ({ selectedOptions }) => {
const onConfirm = ({ selectedOptions }) => { // 切换类型回调
showPicker.value = false;
//
fieldValue.value = selectedOptions[0].text;
id_type.value = selectedOptions[0].value;
fieldValue.value = selectedOptions[0].text; // 选中的文字
id_type.value = selectedOptions[0].value; // 选中的value
};
</script>
......@@ -156,7 +155,7 @@ const onConfirm = ({ selectedOptions }) => {
justify-content: center;
.save-btn {
background-color: #A67939;
padding: 0.8rem 8rem;
padding: 0.8rem 10rem;
color: #FFF;
border-radius: 5px;
}
......
<!--
* @Date: 2024-01-15 13:35:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-18 09:53:50
* @LastEditTime: 2024-01-18 10:40:58
* @FilePath: /xysBooking/src/views/booking.vue
* @Description: 预约页面
* @Version: 1.0.0
......@@ -379,7 +379,7 @@ const nextBtn = () => {
box-shadow: 0rem -0.33rem 0.25rem 0rem rgba(0,0,0,0.12);
.button {
color: #FFF;
padding: 0.85rem 8rem;
padding: 0.85rem 9rem;
border-radius: 8px;
}
}
......
<!--
* @Date: 2024-01-16 13:33:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-18 10:36:04
* @LastEditTime: 2024-01-18 11:11:00
* @FilePath: /xysBooking/src/views/me.vue
* @Description: 文件描述
* @Description: 我的页面
-->
<template>
<div class="me-page">
......
<!--
* @Date: 2024-01-15 16:25:51
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-01-18 10:36:40
* @LastEditTime: 2024-01-18 11:05:25
* @FilePath: /xysBooking/src/views/submit.vue
* @Description: 预约人员信息
-->
......@@ -9,7 +9,7 @@
<div class="submit-page">
<div @click="goToBooking" class="visit-time">
<div>参访时间</div>
<div>{{ date }} {{ time }}&nbsp;<van-icon name="arrow" /></div>
<div><span style="font-size: 0.95rem;">{{ date }} {{ time }}</span>&nbsp;<van-icon name="arrow" /></div>
</div>
<div @click="goToVisitor" class="add-visitors">
<div><van-icon name="plus" /> 添加参观者</div>
......