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 || [],