部分操作添加无网判断
This commit is contained in:
parent
cd14abc277
commit
5be1b85c5c
@ -29,8 +29,12 @@ export default {
|
||||
this.getQuestionAnswer()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useBasicStore, ['routeJump']),
|
||||
...mapActions(useBasicStore, ['routeJump', 'getNetworkType']),
|
||||
async getQuestionAnswer() {
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
const { code, data, message } = await getQuestionAnswerRequest()
|
||||
if(code === 0) {
|
||||
this.questionAnswer = data
|
||||
|
||||
@ -43,7 +43,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ['updateUserInfo']),
|
||||
...mapActions(useBasicStore, ['routeJump', 'backAndToast']),
|
||||
...mapActions(useBasicStore, ['routeJump', 'backAndToast', 'getNetworkType']),
|
||||
updateInputEmail(data) {
|
||||
this.email = data.detail.value
|
||||
},
|
||||
@ -61,6 +61,10 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
const { code } = await getEmailCodeRequest({
|
||||
account: this.email,
|
||||
channel: '2',
|
||||
@ -84,6 +88,10 @@ export default {
|
||||
return
|
||||
}
|
||||
if (this.verificationCode.length === 6 && test.digits(this.verificationCode)) {
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
if(this.pending){
|
||||
return
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ['updateUserInfo']),
|
||||
...mapActions(useBasicStore, ['backAndToast']),
|
||||
...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']),
|
||||
updateInput(data) {
|
||||
this.nickname = data.detail.value
|
||||
console.log(data)
|
||||
@ -40,6 +40,10 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
if(this.pending) {
|
||||
return
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ['updateUserInfo']),
|
||||
...mapActions(useBasicStore, ['backAndToast']),
|
||||
...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']),
|
||||
updateNewPassword (data) {
|
||||
this.password = data.detail.value
|
||||
},
|
||||
@ -44,6 +44,10 @@ export default {
|
||||
if (this.text !== '获取验证码') {
|
||||
return
|
||||
}
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
const { code, message } = await getEmailCodeRequest({
|
||||
channel: '1',
|
||||
codeType: 9
|
||||
@ -92,6 +96,10 @@ export default {
|
||||
})
|
||||
return
|
||||
}
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
if(this.pending) {
|
||||
return
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ['updateUserInfo']),
|
||||
...mapActions(useBasicStore, ['backAndToast']),
|
||||
...mapActions(useBasicStore, ['backAndToast', 'getNetworkType']),
|
||||
async updateAnswer() {
|
||||
console.log('答案', this.answer)
|
||||
for(let i = 0; i < this.answer.length; i++) {
|
||||
@ -97,6 +97,10 @@ export default {
|
||||
return
|
||||
}
|
||||
}
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
if(this.pending) {
|
||||
return
|
||||
}
|
||||
|
||||
@ -29,11 +29,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useUserStore, ['updateUserInfo']),
|
||||
...mapActions(useBasicStore, ['routeJump']),
|
||||
...mapActions(useBasicStore, ['routeJump', 'getNetworkType']),
|
||||
async getEmailCode() {
|
||||
if(this.text !== '获取验证码') {
|
||||
return
|
||||
}
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
const { code } = await getEmailCodeRequest({
|
||||
channel: '2',
|
||||
codeType: 7
|
||||
@ -49,6 +53,10 @@ export default {
|
||||
},
|
||||
async toUpdateEmail() {
|
||||
if(this.verificationCode.length === 6 && test.digits(this.verificationCode)) {
|
||||
const netWork = await this.getNetworkType()
|
||||
if(!netWork) {
|
||||
return
|
||||
}
|
||||
const { code, data, message } = await unbindEmailTokenRequest({
|
||||
verificationCode: this.verificationCode
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user