|
@@ -95,17 +95,40 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- sendSms({
|
|
|
- mobile: this.phoneNumber
|
|
|
- }).then(res => {
|
|
|
+ queryUserByPhone({ mobile: this.phoneNumber }).then(res => {
|
|
|
let result = res.data
|
|
|
if(result.code == 200) {
|
|
|
- this.countDownStatus = false
|
|
|
- this.$refs.countdown.start() // 倒计时开始
|
|
|
+ if(result.data == 1) {
|
|
|
+ sendSms({
|
|
|
+ mobile: this.phoneNumber
|
|
|
+ }).then(res => {
|
|
|
+ let result = res.data
|
|
|
+ if(result.code == 200) {
|
|
|
+ this.countDownStatus = false
|
|
|
+ this.$refs.countdown.start() // 倒计时开始
|
|
|
+ } else {
|
|
|
+ this.$toast(result.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$dialog.confirm({
|
|
|
+ message: '此手机号尚未注册<br/>是否注册?',
|
|
|
+ confirmButtonText: '注册'
|
|
|
+ }).then(() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/appRegister',
|
|
|
+ query: {
|
|
|
+ groupId: this.groupId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => { });
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$toast(result.msg)
|
|
|
}
|
|
|
- })
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
onCodeLogin() { // 短信登录
|
|
|
if(this.isClick) {
|
|
@@ -141,6 +164,18 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ } else if(s.code == 99) {
|
|
|
+ this.$dialog.confirm({
|
|
|
+ message: '此手机号尚未注册<br/>是否注册?',
|
|
|
+ confirmButtonText: '注册'
|
|
|
+ }).then(() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/appRegister',
|
|
|
+ query: {
|
|
|
+ groupId: this.groupId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => { });
|
|
|
} else {
|
|
|
this.$toast(s.msg)
|
|
|
}
|
|
@@ -192,6 +227,18 @@ export default {
|
|
|
groupId: this.groupId
|
|
|
}
|
|
|
})
|
|
|
+ } else if(s.code == 99) {
|
|
|
+ this.$dialog.confirm({
|
|
|
+ message: '此手机号尚未注册<br/>是否注册?',
|
|
|
+ confirmButtonText: '注册'
|
|
|
+ }).then(() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/appRegister',
|
|
|
+ query: {
|
|
|
+ groupId: this.groupId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => { });
|
|
|
} else {
|
|
|
this.$toast(s.msg)
|
|
|
}
|