|
@@ -55,6 +55,7 @@ import { createNamespacedHelpers } from 'vuex'
|
55
|
55
|
const { mapActions: actions } = createNamespacedHelpers('userCenter')
|
56
|
56
|
const { mapActions: mapLoginActions } = createNamespacedHelpers('login')
|
57
|
57
|
const { mapState: mapUserState } = createNamespacedHelpers('userCenter')
|
|
58
|
+let canSubmit
|
58
|
59
|
export default {
|
59
|
60
|
data () {
|
60
|
61
|
return {
|
|
@@ -105,6 +106,10 @@ export default {
|
105
|
106
|
return url.replace('sales.html', 'user.html') + '#/' + val + '?hideTabbar=1'
|
106
|
107
|
},
|
107
|
108
|
submit () {
|
|
109
|
+ if (!canSubmit) {
|
|
110
|
+ return
|
|
111
|
+ }
|
|
112
|
+ canSubmit = false
|
108
|
113
|
if (!this.postData.captcha) {
|
109
|
114
|
this.$toast('请填写验证码')
|
110
|
115
|
return
|
|
@@ -118,13 +123,16 @@ export default {
|
118
|
123
|
setTimeout(() => {
|
119
|
124
|
window.location.replace(this.getUrl('mainPage/coffeeIndex'))
|
120
|
125
|
}, 2000)
|
|
126
|
+ }).catch(() => {
|
|
127
|
+ canSubmit = true
|
121
|
128
|
})
|
122
|
129
|
}
|
123
|
130
|
},
|
124
|
131
|
created () {
|
|
132
|
+ canSubmit = true
|
125
|
133
|
if (this.userInfo.customer.MapUser) {
|
|
134
|
+ // this.showPage = true
|
126
|
135
|
window.location.replace(this.getUrl('mainPage/coffeeIndex'))
|
127
|
|
- // window.location.href = this.getUrl('mainPage/coffeeIndex')
|
128
|
136
|
} else {
|
129
|
137
|
this.showPage = true
|
130
|
138
|
}
|