This commit is contained in:
zmr900709 2020-06-22 22:58:29 +08:00
parent dcff321674
commit 5a8ce60255
2 changed files with 39 additions and 4 deletions

View File

@ -156,9 +156,9 @@
success: function() {
console.log('success');
//
uni.switchTab({
url: '/pages/index/index'
});
uni.navigateTo({
url : '/pageA/topick/topick'
})
}
});

View File

@ -80,11 +80,35 @@
methods: {
//
loginIn(){
let type_phone = this.$u.test.mobile( this.member_mobile)
if( this.member_mobile == ''){
this.$refs.uToast.show({
title: '手机号不能为空',
type: 'error'
})
return false;
}
if (type_phone == false) {
this.$refs.uToast.show({
title: '手机号格式不正确',
type: 'error'
});
return false;
}
if( this.sms_code == ''){
this.$refs.uToast.show({
title: '验证码不能为空',
type: 'error'
})
return false;
}
this.$u.api.phoneRegister({
member_mobile: this.member_mobile,
sms_code: this.sms_code
}).then((res) => {
console.log(res)
console.log('3333333333',res);
//
// console.log(res)
if(res.errCode == 0){
//
@ -93,6 +117,10 @@
data: res.data,
success: function () {
console.log('success');
//
uni.navigateTo({
url : '/pageA/topick/topick'
})
}
});
//
@ -108,6 +136,13 @@
type: 'error'
})
}
if(res.errCode == 2){
this.$refs.uToast.show({
title: res.message,
type: 'primary',
url: '/pageA/login/login'
})
}
})
},
// checkbox