Browse Source

注册图形验证码完善、增加提币验证码

master
luyisha 2 years ago
parent
commit
9dfb3e9016
  1. 4
      api/member.js
  2. 5
      api/serve/index.js
  3. 3
      i18n/lang/de.json
  4. 3
      i18n/lang/en.json
  5. 3
      i18n/lang/fra.json
  6. 3
      i18n/lang/it.json
  7. 3
      i18n/lang/jp.json
  8. 3
      i18n/lang/kor.json
  9. 3
      i18n/lang/pt.json
  10. 3
      i18n/lang/spa.json
  11. 3
      i18n/lang/tr.json
  12. 4
      i18n/lang/zh-TW.json
  13. 11
      layout/vCode.vue
  14. 51
      pages/assets/draw.vue
  15. 18
      pages/reg/index.vue

4
api/member.js

@ -132,6 +132,10 @@ class Member {
static Graph_che() {
return server.get(`/register/Graph_che`);
}
// 提币获取邮箱验证码
static getWdcode(){
return server.get(`/user/wdcode`);
}
}
export default Member;

5
api/serve/index.js

@ -86,9 +86,10 @@ x.fn = x.prototype = {
if(Cache.get(newMsg).data){
if(newMsg!='_user_walletImage'&& newMsg!='_user_getAuthInfo' && newMsg!='_user_withdrawalBalance'
&& newMsg!='_wallet_getBalance' && newMsg!='_contract_getMarketInfo'&& newMsg!='_contract_openNum'
&& newMsg!='_register_Graph_che'
&& newMsg!='_indexList'&& newMsg!='_user_subscribe'&& newMsg!='_contract_getSymbolDetail' && newMsg!='_user_withdrawalRecord'){
resolve(Cache.get(newMsg).data);
// resolve(Cache.get(newMsg).data);//获取缓存中的数据
}
uni.request({
@ -99,7 +100,7 @@ x.fn = x.prototype = {
dataType: this.dataType,
sslVerify: false,
success: (res) => {
console.info(res)
// console.info(res)
let message = res.data.message
let code = res.data.code
if (code != 200) {

3
i18n/lang/de.json

@ -67,7 +67,8 @@
"c4": "Geschätzte Spanne",
"c7": "Der aktuelle wert",
"c6": "Oranı artır",
"c5": "Ihre Überweisungsaufgabe wurde erfolgreich eingereicht, warten Sie bitte geduldig, und das Übertragungsergebnis wird per SMS oder E-Mail benachrichtigt. Bitte überprüfen Sie es sorgfältig. Bei Fragen wenden Sie sich bitte rechtzeitig an den Kundenservice."
"c5": "Ihre Überweisungsaufgabe wurde erfolgreich eingereicht, warten Sie bitte geduldig, und das Übertragungsergebnis wird per SMS oder E-Mail benachrichtigt. Bitte überprüfen Sie es sorgfältig. Bei Fragen wenden Sie sich bitte rechtzeitig an den Kundenservice.",
"GraphicValidation": "Grafische Überprüfung"
},
"base": {
"a0": "Titel",

3
i18n/lang/en.json

@ -108,7 +108,8 @@
"c4": "Size",
"c5": "your transfer order has been submitted successfully, please wait patiently, and the transfer result will be notified by SMS or e-mail. Please check it carefully. If you have any questions, please contact the customer service in time.",
"c6": "Increase ratio",
"c7": "Current valuation"
"c7": "Current valuation",
"GraphicValidation": "Graphical verification"
},
"base": {
"a0": "Title",

3
i18n/lang/fra.json

@ -67,7 +67,8 @@
"c4": "Marge estimée",
"c7": "La valorisation actuelle",
"c6": "Augmenter le rapport",
"c5": "votre commande de transfert a été soumise avec succès. Veuillez patienter. Les résultats du transfert seront notifiés par SMS ou e - mail. Veuillez vérifier et contacter le service à la clientèle en cas de doute."
"c5": "votre commande de transfert a été soumise avec succès. Veuillez patienter. Les résultats du transfert seront notifiés par SMS ou e - mail. Veuillez vérifier et contacter le service à la clientèle en cas de doute.",
"GraphicValidation": "Vérification graphique"
},
"base": {
"a0": "Titre",

3
i18n/lang/it.json

@ -67,7 +67,8 @@
"c4": "Margine stimato",
"c7": "Valutazione attuale",
"c6": "Aumenta il rapporto",
"c5": "l'ordine di trasferimento è stato presentato con successo, si prega di attendere pazientemente, e il risultato di trasferimento sarà notificato via SMS o e-mail. Si prega di controllare attentamente. Se avete domande, si prega di contattare il servizio clienti in tempo."
"c5": "l'ordine di trasferimento è stato presentato con successo, si prega di attendere pazientemente, e il risultato di trasferimento sarà notificato via SMS o e-mail. Si prega di controllare attentamente. Se avete domande, si prega di contattare il servizio clienti in tempo.",
"GraphicValidation": "Verifica grafica"
},
"base": {
"a0": "titolo",

3
i18n/lang/jp.json

@ -67,7 +67,8 @@
"c4": "仮勘定保証金",
"c6": "増加率",
"c7": "現在の評価値",
"c5": "あなたの振替注文書はすでに提出されました。待ってください。振り替え結果はメールやメールで通知されます。ご確認ください。問題があれば、すぐにカスタマーサービスに連絡してください。"
"c5": "あなたの振替注文書はすでに提出されました。待ってください。振り替え結果はメールやメールで通知されます。ご確認ください。問題があれば、すぐにカスタマーサービスに連絡してください。",
"GraphicValidation": "グラフィカルな検証"
},
"base": {
"a0": "タイトル",

3
i18n/lang/kor.json

@ -67,7 +67,8 @@
"c4":"보증금 예상",
"c6":"증가 비율",
"c7":"현재가치평가",
"c5": "당신 의 이월 주문 서 는 이미 제출 되 었 습 니 다. 인내심 을 가지 고 기 다 려 주 십시오. 이월 결 과 는 문자 나 우편 으로 통지 할 것 입 니 다. 수령 에 주의 하 십시오. 궁금 한 점 이 있 으 면 즉시 고객 센터 에 연락 하 십시오."
"c5": "당신 의 이월 주문 서 는 이미 제출 되 었 습 니 다. 인내심 을 가지 고 기 다 려 주 십시오. 이월 결 과 는 문자 나 우편 으로 통지 할 것 입 니 다. 수령 에 주의 하 십시오. 궁금 한 점 이 있 으 면 즉시 고객 센터 에 연락 하 십시오.",
"GraphicValidation": "그래픽 검증"
},
"base": {
"a0":"표제.",

3
i18n/lang/pt.json

@ -67,7 +67,8 @@
"c4":"Margem estimada",
"c6":"Aumentar proporção",
"c7":"A avaliação atual",
"c5": "Sua ordem de transfer ência FOI enviada com sucesso, por favor aguarde pacientemente, e o Resultado Da transferência será notificado por SMS ou e-mail. Por favor, verifique-o com cuidado. Se você tiver quaisquer perguntas, por favor contacte o serviço de cliente a tempo."
"c5": "Sua ordem de transfer ência FOI enviada com sucesso, por favor aguarde pacientemente, e o Resultado Da transferência será notificado por SMS ou e-mail. Por favor, verifique-o com cuidado. Se você tiver quaisquer perguntas, por favor contacte o serviço de cliente a tempo.",
"GraphicValidation": "Verificação gráfica"
},
"base": {
"a0":"Título",

3
i18n/lang/spa.json

@ -67,7 +67,8 @@
"c4":"margen estimado",
"c6":"Relación de aumento",
"c7":"La valoración actual",
"c5": "su orden de transferencia ha sido enviada con éxito, por favor espere pacientemente, los resultados de la transferencia serán notificados por SMS o correo electrónico. Por favor, preste atención a la recepción, si tiene alguna pregunta por favor póngase en contacto con el servicio al cliente a tiempo."
"c5": "su orden de transferencia ha sido enviada con éxito, por favor espere pacientemente, los resultados de la transferencia serán notificados por SMS o correo electrónico. Por favor, preste atención a la recepción, si tiene alguna pregunta por favor póngase en contacto con el servicio al cliente a tiempo.",
"GraphicValidation": "Verificación gráfica"
},
"base": {
"a0":"Título",

3
i18n/lang/tr.json

@ -67,7 +67,8 @@
"c4": "tahmin edilen margin",
"c6": "Oranı artır",
"c7": "Mevcut değerleme",
"c5": "Taşıma emriniz başarıyla teslim edildi, lütfen sabırlı bekleyin ve aktarım sonuçları SMS veya e-posta tarafından bildirilecek. Lütfen dikkatli kontrol edin. Bir sorununuz varsa, lütfen müşteri hizmetine zamanında temas edin."
"c5": "Taşıma emriniz başarıyla teslim edildi, lütfen sabırlı bekleyin ve aktarım sonuçları SMS veya e-posta tarafından bildirilecek. Lütfen dikkatli kontrol edin. Bir sorununuz varsa, lütfen müşteri hizmetine zamanında temas edin.",
"GraphicValidation": "Grafiksel doğrulama"
},
"base": {
"a0": "Başlık",

4
i18n/lang/zh-TW.json

@ -108,7 +108,8 @@
"c4": "數量",
"c5": "您的劃轉訂單已提交成功,請耐心等待,劃轉結果會以簡訊或郵件的管道通知。請注意查收,如有疑問請及時聯系客服",
"c6": "漲幅比例",
"c7": "當前估值"
"c7": "當前估值",
"GraphicValidation": "圖形驗證"
},
"base": {
"a0": "標題",
@ -840,4 +841,5 @@
"b7": "確認購買",
"b8": "確認出售"
}
}

11
layout/vCode.vue

@ -12,6 +12,7 @@
<script>
import vButton from './vButton.vue'
import serve from "@/api/serve";
import Member from "@/api/member";
export default {
name: "vCode",
props: {
@ -74,18 +75,14 @@ export default {
}
if (this.load) return;
this.inSend = true;
serve.post(this.url, this.data)
// .then(() => {
// this.inSend = false;
// this.load = true;
// this.countDown();
// this.$toast(this.$t('common.sendSuccess'));
// })
Member.sendEmailCode(this.data)
.then((res) => {
// ss
if(res.code=='4001'){
this.inSend = false
this.$toast(res.message);
//
this.$emit('reGetGraphChe')
}else{
this.inSend = false;
this.load = true;

51
pages/assets/draw.vue

@ -116,6 +116,19 @@
</v-input>
</view>
<view class="d-flex align-center p-y-xs m-t-ms justify-between color-light fn-15">
<span>{{ $t("safe.a5") }}</span>
</view>
<view class="d-flex align-end p-y-xs justify-between bg-form-panel-3 rounded-xs p-sm p-x-ms">
<v-input type="text" v-model="form.emailcode" class=" w-8/12 color-light fn-13"
:placeholder="$t('safe.a6')"></v-input>
<view class="d-flex align-end">
<view class="all color-theme-1 m-l-md flex-shrink" @click="getEmailCode">
<text v-if="!getEmailCodeLock">{{ $t("common.getCode") }}</text>
<text v-else>{{ daojishi }}</text>
</view>
</view>
</view>
</view>
<view class="form bg-panel-3 p-x-lg p-y-md">
<ul class="fn-md rounded-md m-y-xs line-height-2">
@ -211,6 +224,7 @@
<script>
import coinList from "./coin-list";
import Wallet from "@/api/wallet";
import Member from "@/api/member";
import formData from "@/utils/class/date";
export default {
@ -229,14 +243,18 @@ export default {
address: "",
addressType: "",
code_type: 1,
code: ''
code: '',
emailcode: '',
},
withdrawFee: {},
list: [],
page: 1,
loadMore: true,
secondaryShow: false,
type: 'draw'
type: 'draw',
getEmailCodeLock: false,
JStime: 0,
tiemr: null,
};
},
computed: {
@ -246,6 +264,9 @@ export default {
(item) => item.coin_name == this.coin
);
},
daojishi(){
return '('+this.JStime + 's' + ')';
}
},
watch: {
coin(n) {
@ -295,6 +316,28 @@ export default {
this.withdrawFee = res.data;
});
},
//
getEmailCode(){
if(this.getEmailCodeLock){return};
this.JStime = 300;
this.tiemr = setInterval(()=>{
if(this.JStime===0){
this.getEmailCodeLock = false;
clearInterval(this.tiemr);
return;
}
this.JStime--;
}, 1000)
this.getEmailCodeLock = true;
Member.getWdcode().then(res=>{
// console.log(res);
if(res.code=='4001'){
this.$toast(res.message);
}else{
this.$toast(this.$t('common.sendSuccess'));
}
})
},
//
toDraw() {
if (!this.form.address) {
@ -305,6 +348,10 @@ export default {
this.$toast(this.$t('assets.c2'))
return
}
if (!this.form.emailcode) {
this.$toast(this.$t('safe.a6'))
return
}
let data = this.withdrawFee
if (data.withdraw_switch == 1) {
this.secondaryShow = true

18
pages/reg/index.vue

@ -72,11 +72,11 @@
</view>
<!--图形验证码-->
<view class="form-item border-b m-b-md p-b-xs">
<view class="label m-b-xs">Captcha</view>
<v-input class="color-light" v-model="form.gr_code" placeholder='Please enter graphic results'>
<view class="label m-b-xs">{{$t('common.GraphicValidation')}}</view>
<v-input class="color-light" v-model="form.gr_code" :placeholder="$t('common.GraphicValidation')">
<template #right>
<!-- 邮箱 -->
<img :src="Graph_che" @click="gett_gc_code">
<img :src="Graph_che" @click="gett_gc_code" v-if="!hideImg">
</template>
</v-input>
</view>
@ -104,6 +104,7 @@
type:1
}"
v-show="form.type==2"
@reGetGraphChe="reGetGraphChe"
></v-code>
</template>
</v-input>
@ -178,7 +179,8 @@ export default {
gc_key:'', // tuxiangyanzheng key
check: false,
agreement: {},
country_code:''
country_code:'',
hideImg: false
};
},
@ -258,8 +260,16 @@ export default {
});
},
//
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;

Loading…
Cancel
Save