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