From e0e980875ddb4414d35148009af475f54aec51c4 Mon Sep 17 00:00:00 2001 From: luyisha Date: Fri, 13 Oct 2023 17:45:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E5=BD=A2=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/serve/index.js | 1 + layout/vCode.vue | 55 +++++++++++++++------------------ pages/reg/index.vue | 75 +++++++++++++++++++++++++-------------------- 3 files changed, 67 insertions(+), 64 deletions(-) diff --git a/api/serve/index.js b/api/serve/index.js index 5d1ae78..a07d797 100644 --- a/api/serve/index.js +++ b/api/serve/index.js @@ -87,6 +87,7 @@ x.fn = x.prototype = { if(newMsg!='_user_walletImage'&& newMsg!='_user_getAuthInfo' && newMsg!='_user_withdrawalBalance' && newMsg!='_wallet_getBalance' && newMsg!='_contract_getMarketInfo'&& newMsg!='_contract_openNum' && newMsg!='_user_primaryAuth' && newMsg!='_user_subscribeTokenList' + && newMsg!='_user_wdcode' && newMsg!='_register_Graph_che' && newMsg!='_register_sendEmailCode' && newMsg!='_user_subscribeRecords' && newMsg!='_user_subscribeNow' && newMsg!='_exchange_getMarketInfo' && newMsg!='_indexList'&& newMsg!='_user_subscribe'&& newMsg!='_contract_getSymbolDetail' && newMsg!='_user_withdrawalRecord'){ resolve(Cache.get(newMsg).data); diff --git a/layout/vCode.vue b/layout/vCode.vue index 1ad97a4..545f461 100644 --- a/layout/vCode.vue +++ b/layout/vCode.vue @@ -52,15 +52,6 @@ export default { watch: { sendAAA(n,o){ if(n){ - console.log(n, '-------'); - // setTimeout(()=>{ - // this.inSend = false; - // this.load = true; - // this.countDown(); - // this.$toast(this.$t('common.sendSuccess')); - // this.$emit('changeSendAAA', false) - // }, 500) - // return; this.send(); } } @@ -84,7 +75,7 @@ export default { methods: { // 发送验证码 send() { - console.log(this.sendAAA, '-------this.sendAAA'); + // console.log(this.sendAAA, '-------this.sendAAA'); if(this.data.phone==''){ this.$toast(this.$t('reg.a3')) return @@ -95,28 +86,30 @@ export default { } if (this.load) return; this.inSend = true; - if(this.url==="/register/sendEmailCode" && !this.sendAAA){ - this.$emit('changeSLider', true); - - }else{ + // if(this.url==="/register/sendEmailCode" && !this.sendAAA){ + // this.$emit('changeSLider', true); + // return; + // } // serve.post(this.url, this.data) - Member.sendEmailCode(this.data) - .then((res) => { - if(res.code=='4001'){ - this.inSend = false - this.$toast(res.message); - }else{ - this.inSend = false; - this.load = true; - this.countDown(); - this.$toast(this.$t('common.sendSuccess')); - this.$emit('changeSendAAA', false) - } - }) - .catch(() => { - this.inSend = false; - }); - } + Member.sendEmailCode(this.data) + .then((res) => { + if(res.code=='4001'){ + this.inSend = false + this.$toast(res.message); + //如果返回报错,让图形重新获取一次 + this.$emit('reGetGraphChe') + }else{ + this.inSend = false; + this.load = true; + this.countDown(); + this.$toast(this.$t('common.sendSuccess')); + // this.$emit('changeSendAAA', false) + } + }) + .catch(() => { + this.inSend = false; + }); + }, countDown() { diff --git a/pages/reg/index.vue b/pages/reg/index.vue index 7a4fe7d..e524760 100644 --- a/pages/reg/index.vue +++ b/pages/reg/index.vue @@ -70,26 +70,26 @@ - - - {{$t('homeNewText.ee6')}} - - - - - + + + {{$t('homeNewText.ee6')}} + + + + + {{$t('reg.a6')}} @@ -109,12 +109,12 @@ url="/register/sendEmailCode" :data="{ email:form.account, - type:1 + type:1, + gc_code: form.gr_code, + gc_key: gc_key }" v-show="form.type==2" - @changeSLider="changeSLider" - :sendAAA="sendAAA" - @changeSendAAA="sendAAA = false" + @reGetGraphChe="reGetGraphChe" > @@ -194,15 +194,16 @@ export default { agreement: {}, country_code:'', - showVerify:false, - imgs:[{ - src:'/static/verify/0.jpeg', - color:'#38a7b7' - },{ - src:'/static/verify/1.jpeg', - color:'#485967' - }], - sendAAA: false, + showVerify:false, + imgs:[{ + src:'/static/verify/0.jpeg', + color:'#38a7b7' + },{ + src:'/static/verify/1.jpeg', + color:'#485967' + }], + sendAAA: false, + hideImg: false }; }, @@ -282,9 +283,17 @@ export default { console.log(error); }); }, + // 重新请求图形验证码 + reGetGraphChe(){ + this.hideImg = true; + this.gett_gc_code(); + }, gett_gc_code(){ Member.Graph_che().then((res)=>{ + if(res.code==200){ + this.hideImg = false; + } console.log("gc",res.data.img) this.Graph_che = res.data.img; this.gc_key= res.data.key;