完善功能
This commit is contained in:
111
bundle/combo/desc.vue
Normal file
111
bundle/combo/desc.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="main-title">秀湖公园篮球场会员卡注意事项</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">1. 实名制使用</view>
|
||||
<view class="section-content">会员卡实行一人一卡/实名绑定制,仅限登记本人或绑定家庭成员使用,严禁转借、共用、倒卖,一经核实,立即停用会员资格且不予退费。</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">2. 有效期规则</view>
|
||||
<view class="section-content">• 月卡有效期30天,季卡有效期90天,自开卡激活当日起算,到期自动失效。</view>
|
||||
<view class="section-content">• 会员卡一经办理,不予暂停、不予延期、不可折算退费。</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">3. 入场使用规范</view>
|
||||
<view class="section-content">• 仅限球场正常开放时段入场散客运动,不支持预约、包场、占场。</view>
|
||||
<view class="section-content">• 入场须主动出示会员卡或会员码,配合工作人员核验。</view>
|
||||
<view class="section-content">• 未成年人入场须有监护人陪同,自觉遵守球场安全管理规定。</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">4. 场地与安全责任</view>
|
||||
<view class="section-content">• 运动前请做好热身,量力而行,避免运动损伤,球场仅提供场地,不承担意外运动伤害责任。</view>
|
||||
<view class="section-content">• 爱护场地设施、篮板、地面、座椅等,人为损坏需照价赔偿。</view>
|
||||
<view class="section-content">• 严禁穿黑底鞋、高跟鞋、钉鞋入场;严禁携带宠物、玻璃制品、尖锐物品入场。</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">5. 文明运动要求</view>
|
||||
<view class="section-content">• 禁止在场内追逐打闹、争吵斗殴、恶意犯规、高空抛物等危险行为。</view>
|
||||
<view class="section-content">• 禁止随地吐痰、乱扔垃圾,保持场地整洁。</view>
|
||||
<view class="section-content">• 服从现场管理人员引导,对违规劝阻不听者,有权劝离或取消会员资格。</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">6. 天气与场地调整</view>
|
||||
<view class="section-content">遇雨雪、大风、高温、雷电等恶劣天气,或场地维护、市政活动等情况,球场可临时关闭,不另行补偿天数或费用。</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">7. 遗失与补办</view>
|
||||
<view class="section-content">会员卡遗失、损坏请及时到服务台挂失补办,补办需缴纳工本费,补办后原卡作废,会员权益不变。</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">8. 退费与终止</view>
|
||||
<view class="section-content">• 会员卡一经售出,非球场方重大故障原因,概不退费。</view>
|
||||
<view class="section-content">• 会员严重违反管理规定、屡教不改或造成不良影响的,管理方有权直接终止会员权益,不予退款。</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">9. 其他说明</view>
|
||||
<view class="section-content">会员权益仅限散客入场使用,不含教学、培训、装备租赁、饮品、停车等其他附加服务。</view>
|
||||
<view class="section-content">本球场保留根据运营需要调整会员规则的权利,调整内容将在现场公示后生效。</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #f7f8fa;
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 40rpx 30rpx 60rpx;
|
||||
background-color: #fff;
|
||||
margin: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
margin-bottom: 50rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #834B08;
|
||||
margin-bottom: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.section-content {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.8;
|
||||
margin-bottom: 12rpx;
|
||||
text-align: justify;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -103,7 +103,7 @@
|
||||
<text class="modal-title">温馨提示</text>
|
||||
<view class="close-icon" @click="closeInfoModal">×</view>
|
||||
</view>
|
||||
<view class="modal-desc">检测到您未填写相关信息,为不影响使用请尽快完善</view>
|
||||
<view class="modal-desc">{{ infoModalDesc }}</view>
|
||||
<view class="modal-btn" @click="goToFillInfo">立即去完善</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -115,7 +115,7 @@
|
||||
<view class="buy-modal-title">会员购买</view>
|
||||
|
||||
<view class="plan-list">
|
||||
<view class="plan-item" :class="{ active: selectedPlan === 1 }" @click="selectPlan(1)">
|
||||
<view class="plan-item" v-if="info.month_price && info.month_price > 0" :class="{ active: selectedPlan === 1 }" @click="selectPlan(1)">
|
||||
<view class="plan-name">月卡</view>
|
||||
<view class="plan-price">
|
||||
<text style="font-size: 24rpx; margin-right: 4rpx;">¥</text>
|
||||
@ -124,7 +124,7 @@
|
||||
<view class="plan-desc" v-if="info.m_price && info.m_price > 0">指导价{{ info.m_price }}元/月</view>
|
||||
<view class="check-mark"></view>
|
||||
</view>
|
||||
<view class="plan-item" :class="{ active: selectedPlan === 2 }" @click="selectPlan(2)">
|
||||
<view class="plan-item" v-if="info.seasonal_price && info.seasonal_price > 0" :class="{ active: selectedPlan === 2 }" @click="selectPlan(2)">
|
||||
<view class="plan-name">季卡</view>
|
||||
<view class="plan-price">
|
||||
<text style="font-size: 24rpx; margin-right: 4rpx;">¥</text>
|
||||
@ -135,13 +135,25 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="buy-modal-tips" v-if="!isRenewal">
|
||||
开通成功之后,需要录入人脸信息
|
||||
<view class="buy-modal-tips" v-if="!isRenewal" @click="openNoticeModal">
|
||||
<text style="font-weight: bold; font-size: 32rpx; margin-right: 4rpx;">·</text>查看注意事项
|
||||
</view>
|
||||
<view class="buy-modal-btn" @click="confirmBuy">{{ isRenewal ? '立即续费' : '立即开通' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 注意事项弹窗 -->
|
||||
<view class="buy-modal-container" v-if="showNoticeModal">
|
||||
<view class="buy-modal-mask" @click="closeNoticeModal"></view>
|
||||
<view class="buy-modal-content" style="height: 500rpx; display: flex; flex-direction: column;">
|
||||
<view class="buy-modal-title" style="margin-bottom: 30rpx; position: relative;">
|
||||
注意事项
|
||||
<view style="position: absolute; right: 0; top: 0; font-size: 40rpx; color: #999; padding: 0 10rpx;" @click="closeNoticeModal">×</view>
|
||||
</view>
|
||||
<view class="buy-modal-btn" @click="closeNoticeModal">我知道了</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 购买成功弹窗 -->
|
||||
<view class="success-modal-container" v-if="showSuccessModal">
|
||||
<view class="success-modal-mask" @click="closeSuccessModal"></view>
|
||||
@ -167,8 +179,10 @@ export default {
|
||||
navHeight: 44,
|
||||
comboType: 'adult', // 套餐类型:adult(成人卡) youth(青年卡) family(亲子卡)
|
||||
showInfoModal: false, // 完善信息提示弹窗
|
||||
infoModalDesc: '检测到您未填写相关信息,为不影响使用请尽快完善', // 完善信息提示文案
|
||||
showBuyModal: false, // 会员购买弹窗
|
||||
showSuccessModal: false, // 购买成功弹窗
|
||||
showNoticeModal: false, // 注意事项弹窗
|
||||
selectedPlan: 1, // 选择的套餐 1-月卡 2-季卡
|
||||
info: {
|
||||
order: {
|
||||
@ -215,6 +229,7 @@ export default {
|
||||
() => {
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
|
||||
handleGetDetails() {
|
||||
@ -224,6 +239,11 @@ export default {
|
||||
{ id: self.id },
|
||||
result => {
|
||||
self.info = result.data;
|
||||
if (self.info.month_price && self.info.month_price > 0) {
|
||||
self.selectedPlan = 1;
|
||||
} else if (self.info.seasonal_price && self.info.seasonal_price > 0) {
|
||||
self.selectedPlan = 2;
|
||||
}
|
||||
console.log("🚀 ~ self.info:", self.info)
|
||||
},
|
||||
false,
|
||||
@ -243,27 +263,37 @@ export default {
|
||||
|
||||
if (!self.result) {
|
||||
// 没有填写过信息,弹出完善信息提示弹窗
|
||||
self.infoModalDesc = '检测到您未填写相关信息,为不影响使用请尽快完善';
|
||||
self.showInfoModal = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
const birthDate = new Date(self.result.both);
|
||||
const getAge = (dateStr) => {
|
||||
if (!dateStr) return 0;
|
||||
const birthDate = new Date(dateStr);
|
||||
const today = new Date();
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
const m = today.getMonth() - birthDate.getMonth();
|
||||
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
||||
age--;
|
||||
}
|
||||
return age;
|
||||
};
|
||||
|
||||
if (self.result && self.result.group_id == 1 && age >= 18) {
|
||||
// 没有填写过信息,弹出完善信息提示弹窗
|
||||
self.showInfoModal = true;
|
||||
return false;
|
||||
let isAgeInvalid = false;
|
||||
if (self.result && self.result.group_id == 1) {
|
||||
if (getAge(self.result.both) >= 18) isAgeInvalid = true;
|
||||
} else if (self.result && self.result.group_id == 3) {
|
||||
if (self.result.child && self.result.child[0] && getAge(self.result.child[0].both) >= 18) isAgeInvalid = true;
|
||||
} else if (self.result && self.result.group_id == 4) {
|
||||
if (self.result.child && self.result.child[0] && getAge(self.result.child[0].both) >= 18) isAgeInvalid = true;
|
||||
if (self.result.child && self.result.child[1] && getAge(self.result.child[1].both) >= 18) isAgeInvalid = true;
|
||||
}
|
||||
|
||||
if (self.result && (self.result.group_id == 3 || self.result.group_id == 4) && age >= 18) {
|
||||
// 没有填写过信息,弹出完善信息提示弹窗
|
||||
if (isAgeInvalid) {
|
||||
// 没有填写过信息或者由于年龄不合规,弹出完善信息提示弹窗
|
||||
self.showInfoModal = true;
|
||||
self.infoModalDesc = '所填信息年龄已满18周岁,需要重新填写信息';
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -280,13 +310,15 @@ export default {
|
||||
}, 100);
|
||||
// 没有填写过信息,弹出完善信息提示弹窗
|
||||
self.showInfoModal = true;
|
||||
self.infoModalDesc = '检测到您未填写相关信息,为不影响使用请尽快完善';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (self.result.status == 1) {
|
||||
// 已经审核通过,弹出开通会员弹窗
|
||||
self.showBuyModal = true;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
},
|
||||
closeInfoModal() {
|
||||
@ -347,7 +379,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
self.handleGetDetails();
|
||||
self.showSuccessModal = true;
|
||||
}, 1000);
|
||||
}, 200);
|
||||
},
|
||||
fail: res => {
|
||||
setTimeout(() => {
|
||||
@ -383,6 +415,17 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
openNoticeModal() {
|
||||
uni.navigateTo({
|
||||
url: '/bundle/combo/desc'
|
||||
});
|
||||
// this.showNoticeModal = true;
|
||||
},
|
||||
|
||||
closeNoticeModal() {
|
||||
this.showNoticeModal = false;
|
||||
},
|
||||
|
||||
hanldeTakePhoto() {
|
||||
if (this.result.status == 0) {
|
||||
setTimeout(() => {
|
||||
@ -782,7 +825,8 @@ page {
|
||||
|
||||
.plan-list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: center;
|
||||
gap: 4%;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.plan-item {
|
||||
|
||||
@ -28,16 +28,30 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 子女 -->
|
||||
<!-- 子女1 -->
|
||||
<view v-if="id == 3 || id == 4"
|
||||
@click="handleTakePhoto('child')"
|
||||
@click="handleTakePhoto('child1')"
|
||||
class="photo-item" style="display: flex; align-items: center; justify-content: space-between; padding: 30rpx; background-color: #ffffff; border-radius: 12rpx; margin: 20rpx;">
|
||||
<view style="display: flex; align-items: center;">
|
||||
<image src="https://xh.stnav.com/uploads/sport/face2.png" style="width: 90rpx; height: 90rpx; margin-right: 20rpx;"></image>
|
||||
<view>子女录入</view>
|
||||
<view>子女1录入</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<text style="color: #666; font-size: 28rpx; margin-right: 10rpx;">{{ childFace ? '已录入' : '去录入' }}</text>
|
||||
<text style="color: #666; font-size: 28rpx; margin-right: 10rpx;">{{ child1Face ? '已录入' : '去录入' }}</text>
|
||||
<image src="/static/icon/right.png" style="width: 32rpx; height: 32rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 子女2 -->
|
||||
<view v-if="id == 4"
|
||||
@click="handleTakePhoto('child2')"
|
||||
class="photo-item" style="display: flex; align-items: center; justify-content: space-between; padding: 30rpx; background-color: #ffffff; border-radius: 12rpx; margin: 20rpx;">
|
||||
<view style="display: flex; align-items: center;">
|
||||
<image src="https://xh.stnav.com/uploads/sport/face2.png" style="width: 90rpx; height: 90rpx; margin-right: 20rpx;"></image>
|
||||
<view>子女2录入</view>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center;">
|
||||
<text style="color: #666; font-size: 28rpx; margin-right: 10rpx;">{{ child2Face ? '已录入' : '去录入' }}</text>
|
||||
<image src="/static/icon/right.png" style="width: 32rpx; height: 32rpx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
@ -57,7 +71,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 亲子卡2 -->
|
||||
<view v-if="id == 4"
|
||||
<view v-if="id == 3 || id == 4"
|
||||
@click="handleTakePhoto('parent2')"
|
||||
class="photo-item" style="display: flex; align-items: center; justify-content: space-between; padding: 30rpx; background-color: #ffffff; border-radius: 12rpx; margin: 20rpx;">
|
||||
<view style="display: flex; align-items: center;">
|
||||
@ -80,7 +94,8 @@
|
||||
order_id: 0,
|
||||
youthFace: '',
|
||||
adultFace: '',
|
||||
childFace: '',
|
||||
child1Face: '',
|
||||
child2Face: '',
|
||||
parent1Face: '',
|
||||
parent2Face: '',
|
||||
}
|
||||
@ -103,7 +118,14 @@
|
||||
if (result.data && result.data.face_url) {
|
||||
self.youthFace = result.data.face_url;
|
||||
self.adultFace = result.data.face_url;
|
||||
self.childFace = result.data.face_url;
|
||||
}
|
||||
|
||||
if (result.data && result.data.face_url) {
|
||||
self.child1Face = result.data.face_url;
|
||||
}
|
||||
|
||||
if (result.data && result.data.face_url1) {
|
||||
self.child2Face = result.data.face_url1;
|
||||
}
|
||||
|
||||
if (result.data && result.data.parent.length > 0) {
|
||||
@ -135,9 +157,16 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type === 'child' && this.childFace) {
|
||||
if (type === 'child1' && this.child1Face) {
|
||||
uni.previewImage({
|
||||
urls: [this.childFace]
|
||||
urls: [this.child1Face]
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type === 'child2' && this.child2Face) {
|
||||
uni.previewImage({
|
||||
urls: [this.child2Face]
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 家长基本信息2 -->
|
||||
<view class="form-card" v-if="id == 4">
|
||||
<view class="form-card" v-if="id == 3 || id == 4">
|
||||
<view class="section-title">
|
||||
家长2基本信息 <text class="required">*</text>
|
||||
</view>
|
||||
@ -124,23 +124,23 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 随行子女信息 -->
|
||||
<!-- 随行子女1信息 -->
|
||||
<view class="form-card" v-if="id == 3 || id == 4">
|
||||
<view class="section-title">
|
||||
随行子女信息 <text class="required">*</text>
|
||||
随行子女1信息 <text class="required">*</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<view class="label">姓名</view>
|
||||
<input class="input" type="text" placeholder="请填写姓名" placeholder-class="placeholder-style"
|
||||
v-model="formData.child.name" />
|
||||
v-model="formData.child[0].name" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<view class="label">出生年月</view>
|
||||
<picker mode="date" :end="endDate" @change="onChildDateChange">
|
||||
<view class="picker-view" :class="{ 'has-value': formData.child.both }">
|
||||
<text>{{ formData.child.both || '请选择出生年月' }}</text>
|
||||
<picker mode="date" :end="endDate" @change="(e) => onChildDateChange(e, 0)">
|
||||
<view class="picker-view" :class="{ 'has-value': formData.child[0].both }">
|
||||
<text>{{ formData.child[0].both || '请选择出生年月' }}</text>
|
||||
<image src="https://xh.stnav.com/uploads/sport/icon_down.png"
|
||||
style="width: 36rpx; height: 36rpx;" mode="aspectFit"></image>
|
||||
</view>
|
||||
@ -150,7 +150,37 @@
|
||||
<view class="form-item no-border">
|
||||
<view class="label">身份证号</view>
|
||||
<input class="input" type="idcard" placeholder="请输入身份证号码" placeholder-class="placeholder-style"
|
||||
v-model="formData.child.card" />
|
||||
v-model="formData.child[0].card" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 随行子女2信息 -->
|
||||
<view class="form-card" v-if="id == 4">
|
||||
<view class="section-title">
|
||||
随行子女2信息 <text class="required">*</text>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<view class="label">姓名</view>
|
||||
<input class="input" type="text" placeholder="请填写姓名" placeholder-class="placeholder-style"
|
||||
v-model="formData.child[1].name" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<view class="label">出生年月</view>
|
||||
<picker mode="date" :end="endDate" @change="(e) => onChildDateChange(e, 1)">
|
||||
<view class="picker-view" :class="{ 'has-value': formData.child[1].both }">
|
||||
<text>{{ formData.child[1].both || '请选择出生年月' }}</text>
|
||||
<image src="https://xh.stnav.com/uploads/sport/icon_down.png"
|
||||
style="width: 36rpx; height: 36rpx;" mode="aspectFit"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view class="form-item no-border">
|
||||
<view class="label">身份证号</view>
|
||||
<input class="input" type="idcard" placeholder="请输入身份证号码" placeholder-class="placeholder-style"
|
||||
v-model="formData.child[1].card" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -230,11 +260,10 @@ export default {
|
||||
{ id: 0, name: '', both: '', card: '' },
|
||||
{ id: 0, name: '', both: '', card: '' }
|
||||
],
|
||||
child: {
|
||||
name: '',
|
||||
both: '',
|
||||
card: '',
|
||||
},
|
||||
child: [
|
||||
{ id: 0, name: '', both: '', card: '' },
|
||||
{ id: 0, name: '', both: '', card: '' }
|
||||
],
|
||||
phone: '',
|
||||
group_id: 0
|
||||
},
|
||||
@ -289,27 +318,46 @@ export default {
|
||||
if (data.group_id == 3 || data.group_id == 4) {
|
||||
// 亲子卡
|
||||
if (data.parent && data.parent.length > 0) {
|
||||
self.formData.parents[0] = {
|
||||
self.$set(self.formData.parents, 0, {
|
||||
id: data.parent[0].id,
|
||||
name: data.parent[0].name,
|
||||
both: data.parent[0].both,
|
||||
card: data.parent[0].card,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (data.parent && data.parent.length > 1) {
|
||||
self.formData.parents[1] = {
|
||||
id: data.parent[0].id,
|
||||
self.$set(self.formData.parents, 1, {
|
||||
id: data.parent[1].id,
|
||||
name: data.parent[1].name,
|
||||
both: data.parent[1].both,
|
||||
card: data.parent[1].card,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
self.formData.child = {
|
||||
name: data.name,
|
||||
both: data.both,
|
||||
card: data.card,
|
||||
if (data.child && data.child.length > 0) {
|
||||
self.$set(self.formData.child, 0, {
|
||||
id: data.child[0].id,
|
||||
name: data.child[0].name,
|
||||
both: data.child[0].both,
|
||||
card: data.child[0].card,
|
||||
});
|
||||
} else {
|
||||
self.$set(self.formData.child, 0, {
|
||||
id: 0,
|
||||
name: data.name || '',
|
||||
both: data.both || '',
|
||||
card: data.card || '',
|
||||
});
|
||||
}
|
||||
|
||||
if (data.child && data.child.length > 1) {
|
||||
self.$set(self.formData.child, 1, {
|
||||
id: data.child[1].id,
|
||||
name: data.child[1].name,
|
||||
both: data.child[1].both,
|
||||
card: data.child[1].card,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -347,8 +395,8 @@ export default {
|
||||
this.formData.parents[index].both = e.detail.value;
|
||||
},
|
||||
|
||||
onChildDateChange(e) {
|
||||
this.formData.child.both = e.detail.value;
|
||||
onChildDateChange(e, index) {
|
||||
this.formData.child[index].both = e.detail.value;
|
||||
},
|
||||
|
||||
contactUs() {
|
||||
@ -424,8 +472,6 @@ export default {
|
||||
let err0 = validateCardAndAgeMatch(p0.card, p0.both, '家长1', 'adult');
|
||||
if (err0) return uni.showToast({ title: err0, icon: 'none' });
|
||||
|
||||
// id == 4 时(第二个亲子卡),还需要额外验证 parents[1] 属性
|
||||
if (self.id == 4) {
|
||||
let p1 = self.formData.parents[1];
|
||||
if (!p1 || !p1.name || !p1.both || !p1.card) {
|
||||
return uni.showToast({ title: '请填写完整家长2基本信息', icon: 'none' });
|
||||
@ -435,17 +481,29 @@ export default {
|
||||
}
|
||||
let err1 = validateCardAndAgeMatch(p1.card, p1.both, '家长2', 'adult');
|
||||
if (err1) return uni.showToast({ title: err1, icon: 'none' });
|
||||
}
|
||||
|
||||
let child = self.formData.child;
|
||||
if (!child || !child.name || !child.both || !child.card) {
|
||||
return uni.showToast({ title: '请填写完整随行子女信息', icon: 'none' });
|
||||
let child0 = self.formData.child[0];
|
||||
if (!child0 || !child0.name || !child0.both || !child0.card) {
|
||||
return uni.showToast({ title: '请填写完整随行子女1信息', icon: 'none' });
|
||||
}
|
||||
if (!regex.test(child.card)) {
|
||||
return uni.showToast({ title: '请输入正确的子女身份证号码', icon: 'none' });
|
||||
if (!regex.test(child0.card)) {
|
||||
return uni.showToast({ title: '请输入正确的子女1身份证号码', icon: 'none' });
|
||||
}
|
||||
let errC0 = validateCardAndAgeMatch(child0.card, child0.both, '子女1', 'child');
|
||||
if (errC0) return uni.showToast({ title: errC0, icon: 'none' });
|
||||
|
||||
// id == 4 时(第二个亲子卡),还需要额外验证 child[1] 属性
|
||||
if (self.id == 4) {
|
||||
let child1 = self.formData.child[1];
|
||||
if (!child1 || !child1.name || !child1.both || !child1.card) {
|
||||
return uni.showToast({ title: '请填写完整随行子女2信息', icon: 'none' });
|
||||
}
|
||||
if (!regex.test(child1.card)) {
|
||||
return uni.showToast({ title: '请输入正确的子女2身份证号码', icon: 'none' });
|
||||
}
|
||||
let errC1 = validateCardAndAgeMatch(child1.card, child1.both, '子女2', 'child');
|
||||
if (errC1) return uni.showToast({ title: errC1, icon: 'none' });
|
||||
}
|
||||
let errC = validateCardAndAgeMatch(child.card, child.both, '子女', 'child');
|
||||
if (errC) return uni.showToast({ title: errC, icon: 'none' });
|
||||
}
|
||||
|
||||
// 所有场景必填联系电话
|
||||
@ -483,7 +541,10 @@ export default {
|
||||
{ name: '', both: '', card: '' },
|
||||
{ name: '', both: '', card: '' }
|
||||
],
|
||||
child: { name: '', both: '', card: '' },
|
||||
child: [
|
||||
{ name: '', both: '', card: '' },
|
||||
{ name: '', both: '', card: '' }
|
||||
],
|
||||
phone: '',
|
||||
group_id: self.id
|
||||
};
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
seeOrder() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order/cg-my-order'
|
||||
url: '/pages/order/cg-my-order?type=' + this.ground_type
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@ -1078,6 +1078,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "人脸列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "combo/desc",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注意事项"
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
|
||||
Reference in New Issue
Block a user