v
This commit is contained in:
parent
dcff321674
commit
5a8ce60255
@ -156,9 +156,9 @@
|
|||||||
success: function() {
|
success: function() {
|
||||||
console.log('success');
|
console.log('success');
|
||||||
// 跳转首页
|
// 跳转首页
|
||||||
uni.switchTab({
|
uni.navigateTo({
|
||||||
url: '/pages/index/index'
|
url : '/pageA/topick/topick'
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -80,11 +80,35 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 用户注册
|
// 用户注册
|
||||||
loginIn(){
|
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({
|
this.$u.api.phoneRegister({
|
||||||
member_mobile: this.member_mobile,
|
member_mobile: this.member_mobile,
|
||||||
sms_code: this.sms_code
|
sms_code: this.sms_code
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res)
|
console.log('3333333333',res);
|
||||||
|
// 校验手机号
|
||||||
|
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
if(res.errCode == 0){
|
if(res.errCode == 0){
|
||||||
// 缓存用户的信息
|
// 缓存用户的信息
|
||||||
@ -93,6 +117,10 @@
|
|||||||
data: res.data,
|
data: res.data,
|
||||||
success: function () {
|
success: function () {
|
||||||
console.log('success');
|
console.log('success');
|
||||||
|
// 跳转选择页面
|
||||||
|
uni.navigateTo({
|
||||||
|
url : '/pageA/topick/topick'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 注册返回参数
|
// 注册返回参数
|
||||||
@ -108,6 +136,13 @@
|
|||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if(res.errCode == 2){
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'primary',
|
||||||
|
url: '/pageA/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 选中某个复选框时,由checkbox时触发
|
// 选中某个复选框时,由checkbox时触发
|
||||||
|
Loading…
x
Reference in New Issue
Block a user