This commit is contained in:
Gdpao
2020-08-07 19:56:47 +08:00
parent 71e984b2ed
commit 502e020000
17 changed files with 238 additions and 136 deletions

View File

@@ -101,7 +101,7 @@
},
onLoad() {
// 数据的请求
this.apiwelcome();
// this.apiwelcome();
},
onShow() {
let pages = getCurrentPages();
@@ -123,7 +123,9 @@
...mapMutations(['loginIn']),
apiwelcome() {
this.$u.api.sendSmsCode({}).then((res) => {
console.log(res)
if (res.errCode == 0) {
console.log(res)
}
})
},
// 协议跳转
@@ -148,21 +150,18 @@
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;
}
@@ -176,7 +175,6 @@
if (res.data == '') {
this.$refs.uToast.show({
title: res.message,
type: 'error'
})
return false
} else {
@@ -205,7 +203,6 @@
} else {
this.$refs.uToast.show({
title: res.message,
type: 'error'
})
}
})

View File

@@ -109,28 +109,24 @@
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;
}
if (this.is_check) {
this.$refs.uToast.show({
title: '请同意协议!',
type: 'error'
})
return false;
}
@@ -138,10 +134,6 @@
member_mobile: this.member_mobile,
sms_code: this.sms_code
}).then((res) => {
console.log('3333333333',res);
// 校验手机号
// console.log(res)
if(res.errCode == 0){
//存储一个字符传值
me.loginIn(res.data.token);
@@ -159,20 +151,18 @@
// type: 'success',
// url: '/pageA/topick/topick'
// })
}
if(res.errCode == 1){
this.$refs.uToast.show({
title: res.message,
type: 'error'
})
}
if(res.errCode == 2){
} else if(res.errCode == 2){
this.$refs.uToast.show({
title: res.message,
type: 'primary',
url: '/pageA/login/login'
})
}
} else {
this.$refs.uToast.show({
title: res.message,
type: 'primary'
})
}
})
},
// 选中某个复选框时由checkbox时触发
@@ -196,7 +186,6 @@
// console.log("调用父组件的方法")
// console.log('2222',this._data.member_mobile)
let member_mobile = this._data.member_mobile;
}
},
components: {