From 8b0751dd8fc174ecf24841e41e90e316d3e678fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?=
=?UTF-8?q?=E9=98=B4?= <185154740@qq.com>
Date: Thu, 24 Feb 2022 17:06:18 +0800
Subject: [PATCH] 27609
---
src/mods/AppIntegralApply/add.vue | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/mods/AppIntegralApply/add.vue b/src/mods/AppIntegralApply/add.vue
index af04577..12152bf 100644
--- a/src/mods/AppIntegralApply/add.vue
+++ b/src/mods/AppIntegralApply/add.vue
@@ -10,6 +10,10 @@
+
+
+
+
@@ -47,7 +51,7 @@ export default {
data() {
return {
forms: {
- name: '',
+ phone: '',
auditTime: '',
applyIntegralType: '',
applyIntegralTypeValue: '',
@@ -67,6 +71,8 @@ export default {
var month = toDay.getMonth() + 1 < 10 ? '0' + (toDay.getMonth() + 1) : toDay.getMonth() + 1
var data = toDay.getDate() < 10 ? '0' + toDay.getDate() : toDay.getDate()
this.toDay = year + '-' + month + '-' + data
+
+ this.forms.phone = this.user.phone
})
},
onShow() {},
@@ -78,8 +84,13 @@ export default {
this.$refs.uForm.validate((valid) => {
if (valid) {
- if (!this.forms.name) {
- return this.$u.toast('请输入申请人')
+ if (!this.forms.phone) {
+ return this.$u.toast('请输入联系电话')
+ }
+
+ const regPhone = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
+ if (this.forms.phone && !regPhone.test(this.forms.phone)) {
+ return this.$u.toast('请输入正确的手机号')
}
if (!this.forms.applyIntegralType) {
@@ -100,6 +111,7 @@ export default {
this.$instance
.post(`/app/appvillagerintegraldeclare/addOrUpdate`, {
name: this.user.realName,
+ residentPhone: this.forms.phone,
applyIntegralType: this.forms.applyIntegralTypeValue,
description: this.forms.description,
applyFiles: imgs || [],