uniapp 会员申请提示修改
parent
2eec6a0739
commit
95f8e31dac
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<view class="box-phone">
|
||||
<u--form :model="form" :rules="rules" ref="uForm" labelWidth="100">
|
||||
<u--form :model="form" :rules="rules" ref="uForm" labelWidth="100" errorType="toast">
|
||||
<u-form-item label="姓名" prop="userName">
|
||||
<u--input v-model="form.userName" maxlength="11" placeholder="请输入您的姓名"></u--input>
|
||||
</u-form-item>
|
||||
|
@ -88,13 +88,13 @@
|
|||
required: true,
|
||||
message: '姓名不能为空',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change', 'blur']
|
||||
trigger: ['blur']
|
||||
}],
|
||||
userPhone: [{
|
||||
required: true,
|
||||
message: '手机号不能为空',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change', 'blur']
|
||||
trigger: ['blur']
|
||||
},
|
||||
{
|
||||
pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[1-25-9])\d{8}$/g,
|
||||
|
@ -103,14 +103,14 @@
|
|||
return String(value);
|
||||
},
|
||||
message: '手机号不正确(190.193号段不可充值)',
|
||||
trigger: ['change', 'blur']
|
||||
trigger: ['blur']
|
||||
},
|
||||
],
|
||||
confirmPhone: [{
|
||||
required: true,
|
||||
message: '手机号确认不能为空',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change', 'blur']
|
||||
trigger: ['blur']
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
|
@ -118,7 +118,7 @@
|
|||
return this.form.userPhone == this.form.confirmPhone
|
||||
},
|
||||
message: '手机号不一致',
|
||||
trigger: ['change', 'blur'],
|
||||
trigger: ['blur'],
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -145,19 +145,9 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
verify(){
|
||||
this.$refs.uForm.validate().then(async res => {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
});
|
||||
try{
|
||||
const res = await memberByHomeGradeInfo(this.form.confirmPhone)
|
||||
this.memberData = res.data
|
||||
} finally{
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
async verify(){
|
||||
const res = await memberByHomeGradeInfo(this.form.confirmPhone)
|
||||
this.memberData = res.data
|
||||
},
|
||||
handleMember(value, index) {
|
||||
if (!!parseInt(value.isExist)) return
|
||||
|
@ -267,6 +257,7 @@
|
|||
::v-deep .u-form-item__body__right__message{
|
||||
margin-top: 10rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.phone-money {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<view class="box">
|
||||
<view class="box-phone">
|
||||
<u--form :model="form" :rules="rules" ref="uForm" labelWidth="100">
|
||||
<u-form-item label="姓名" prop="userName" >
|
||||
<u--form :model="form" :rules="rules" ref="uForm" labelWidth="100" errorType="toast">
|
||||
<u-form-item label="姓名" prop="userName">
|
||||
<u--input v-model="form.userName" maxlength="11" placeholder="请输入您的姓名"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="手机号" prop="phone" >
|
||||
|
@ -82,14 +82,14 @@ import store from '@/store/index';
|
|||
required: true,
|
||||
message: '姓名不能为空',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change', 'blur']
|
||||
trigger: ['blur']
|
||||
}],
|
||||
userPhone: [
|
||||
{
|
||||
required: true,
|
||||
message: '手机号不能为空',
|
||||
// 触发器可以同时用blur和change
|
||||
trigger: ['change', 'blur']
|
||||
trigger: [ 'blur']
|
||||
},
|
||||
{
|
||||
pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[1-25-9])\d{8}$/g,
|
||||
|
@ -98,7 +98,7 @@ import store from '@/store/index';
|
|||
return String(value);
|
||||
},
|
||||
message: '手机号不正确(190.193号段不可充值)',
|
||||
trigger: ['change', 'blur']
|
||||
trigger: ['blur']
|
||||
},
|
||||
]
|
||||
}
|
||||
|
@ -224,6 +224,7 @@ import store from '@/store/index';
|
|||
::v-deep .u-form-item__body__right__message{
|
||||
margin-top: 10rpx;
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue