|
@@ -122,14 +122,19 @@
|
|
|
scrollHeight: '',
|
|
scrollHeight: '',
|
|
|
swiperHeight: '',
|
|
swiperHeight: '',
|
|
|
recordIndex: 0,
|
|
recordIndex: 0,
|
|
|
- userInfo: {},
|
|
|
|
|
|
|
+ tips: '',
|
|
|
|
|
+ re:'^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-9])|(18[0-9])|166|195|198|199|191|(147))\\d{8}$', //手机号正则表达式
|
|
|
labelStyle: {
|
|
labelStyle: {
|
|
|
fontSize: '28rpx',
|
|
fontSize: '28rpx',
|
|
|
color: '#333333',
|
|
color: '#333333',
|
|
|
fontWeight: 'bold'
|
|
fontWeight: 'bold'
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- tips: '',
|
|
|
|
|
|
|
+ userInfo: {
|
|
|
|
|
+ phone:'',
|
|
|
|
|
+ memberName:'',
|
|
|
|
|
+ phonenumber:'',
|
|
|
|
|
+ smsCode:''
|
|
|
|
|
+ },
|
|
|
rules: {
|
|
rules: {
|
|
|
phone: {
|
|
phone: {
|
|
|
type: 'string',
|
|
type: 'string',
|
|
@@ -176,7 +181,18 @@
|
|
|
|
|
|
|
|
selectUserMsg() {
|
|
selectUserMsg() {
|
|
|
//查询个人信息 todo
|
|
//查询个人信息 todo
|
|
|
- this.pageIndex = 1
|
|
|
|
|
|
|
+ this.$refs.uForm.validate().then(res => {
|
|
|
|
|
+ this.$api.getOldMember(this.userInfo).then((res) => {
|
|
|
|
|
+ console.log(res.data.data)
|
|
|
|
|
+
|
|
|
|
|
+ if (res.data.data){
|
|
|
|
|
+ this.pageIndex = 1
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ }).catch(errors => {
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
lastStep() {
|
|
lastStep() {
|
|
|
this.pageIndex = 0
|
|
this.pageIndex = 0
|
|
@@ -200,18 +216,23 @@
|
|
|
this.tips = text;
|
|
this.tips = text;
|
|
|
},
|
|
},
|
|
|
getCode() {
|
|
getCode() {
|
|
|
|
|
+ let regExp=new RegExp(this.re);
|
|
|
|
|
+ let b= regExp.test(this.userInfo.phonenumber)
|
|
|
|
|
+ if (!b){
|
|
|
|
|
+ uni.$u.toast('请输入正确的手机号')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
if (this.$refs.uCode.canGetCode) {
|
|
if (this.$refs.uCode.canGetCode) {
|
|
|
// 模拟向后端请求验证码
|
|
// 模拟向后端请求验证码
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title: '正在获取验证码'
|
|
title: '正在获取验证码'
|
|
|
})
|
|
})
|
|
|
- setTimeout(() => {
|
|
|
|
|
- uni.hideLoading();
|
|
|
|
|
- // 这里此提示会被this.start()方法中的提示覆盖
|
|
|
|
|
|
|
+ this.$api.getSmsCode({phonenumber: this.userInfo.phonenumber}).then(res=>{
|
|
|
uni.$u.toast('验证码已发送');
|
|
uni.$u.toast('验证码已发送');
|
|
|
// 通知验证码组件内部开始倒计时
|
|
// 通知验证码组件内部开始倒计时
|
|
|
this.$refs.uCode.start();
|
|
this.$refs.uCode.start();
|
|
|
- }, 2000);
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
uni.$u.toast('倒计时结束后再发送');
|
|
uni.$u.toast('倒计时结束后再发送');
|
|
|
}
|
|
}
|