|
@@ -19,12 +19,12 @@
|
|
</view>
|
|
</view>
|
|
<view class="dljt-input-row require-row">
|
|
<view class="dljt-input-row require-row">
|
|
<view class="input-title">身份证号</view>
|
|
<view class="input-title">身份证号</view>
|
|
- <input class="form-input" name="input" v-model="formData.name" placeholder="请输入身份证号" />
|
|
|
|
|
|
+ <input class="form-input" name="input" v-model="formData.idcard" placeholder="请输入身份证号" />
|
|
</view>
|
|
</view>
|
|
<view class="dljt-input-row require-row">
|
|
<view class="dljt-input-row require-row">
|
|
<view class="input-title">预报专业</view>
|
|
<view class="input-title">预报专业</view>
|
|
<uni-data-select class="form-select" v-model="formData.zhuanye" :localdata="range"
|
|
<uni-data-select class="form-select" v-model="formData.zhuanye" :localdata="range"
|
|
- @change="change" placeholder="请选择预报专业"></uni-data-select>
|
|
|
|
|
|
+ placeholder="请选择预报专业"></uni-data-select>
|
|
</view>
|
|
</view>
|
|
<view class="dljt-input-row require-row">
|
|
<view class="dljt-input-row require-row">
|
|
<view class="input-title">联系电话</view>
|
|
<view class="input-title">联系电话</view>
|
|
@@ -71,7 +71,9 @@
|
|
import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
|
|
import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
|
|
import {
|
|
import {
|
|
formatDateToYearMonthDay,
|
|
formatDateToYearMonthDay,
|
|
- getStringByHtml3
|
|
|
|
|
|
+ getStringByHtml3,
|
|
|
|
+ validateIdCard,
|
|
|
|
+ validatePhone
|
|
} from "@/utils/common.js"
|
|
} from "@/utils/common.js"
|
|
import MtaFooter from "@/components/MtaFooter.vue"
|
|
import MtaFooter from "@/components/MtaFooter.vue"
|
|
import default1 from '@/static/images/common/news-bj1.jpg'
|
|
import default1 from '@/static/images/common/news-bj1.jpg'
|
|
@@ -93,27 +95,31 @@
|
|
|
|
|
|
if (!formData.name) {
|
|
if (!formData.name) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: '请输入姓名'
|
|
|
|
|
|
+ title: '请输入姓名',
|
|
|
|
+ icon: 'error'
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (!formData.idcard) {
|
|
|
|
|
|
+ if (!validateIdCard(formData.idcard)) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: '请输入身份证号'
|
|
|
|
|
|
+ title: '请输入有效身份证号',
|
|
|
|
+ icon: 'error'
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (!formData.zhuanye) {
|
|
if (!formData.zhuanye) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: '请选择预报专业'
|
|
|
|
|
|
+ title: '请选择预报专业',
|
|
|
|
+ icon: 'error'
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (!formData.dianhua) {
|
|
|
|
|
|
+ if (!validatePhone(formData.dianhua)) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: '请输入联系电话'
|
|
|
|
|
|
+ title: '请输入有效联系电话',
|
|
|
|
+ icon: 'error'
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|