Browse Source

滑块验证

master
luyisha 3 years ago
parent
commit
ced7e6d129
  1. BIN
      components/tf-verify-img/img/tf-arrows.png
  2. BIN
      components/tf-verify-img/img/tf-close.png
  3. 265
      components/tf-verify-img/tf-verify-img.vue
  4. 8
      i18n/lang/de.json
  5. 8
      i18n/lang/en.json
  6. 8
      i18n/lang/fra.json
  7. 8
      i18n/lang/it.json
  8. 8
      i18n/lang/jp.json
  9. 8
      i18n/lang/kor.json
  10. 8
      i18n/lang/pt.json
  11. 8
      i18n/lang/spa.json
  12. 8
      i18n/lang/tr.json
  13. 9
      i18n/lang/zh-TW.json
  14. 59
      layout/vCode.vue
  15. 48
      pages/reg/index.vue
  16. BIN
      static/verify/0.jpeg
  17. BIN
      static/verify/1.jpeg

BIN
components/tf-verify-img/img/tf-arrows.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

BIN
components/tf-verify-img/img/tf-close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

265
components/tf-verify-img/tf-verify-img.vue

@ -0,0 +1,265 @@
<template>
<view class="tf-Box-Bg">
<view class="tf-Box">
<view class="tf-Box-title">
<text class="text">{{$t('homeNewText.dd3')}}</text>
<image class="tf-close" src="img/tf-close.png" mode="aspectFit" @click.stop="close_"></image>
</view>
<canvas :style="{ width: canvasW + 'px', height: canvasH + 'px' }"
class="tf-Box-center" canvas-id="tf-verify-canvas" id="tf-verify-canvas"></canvas>
<movable-area class="tf-Box-BtnBox">
<view class="tf-Box-BtnBox-text">{{$t('homeNewText.dd4')}}</view>
<movable-view class="tf-Box-BtnNei" direction="all" :x="canvasX2" @change="changePath" @touchend="endTouch" @mouseup="endTouch">
<view class="tf-Box-BtnNei-leftBox" :style="{backgroundColor:verifyImgs[verifyIndex].color}"></view>
</movable-view>
</movable-area>
</view>
</view>
</template>
<script>
export default {
name:"tf-verify-img",
props:{
verifyImgs:{
type:Array,
default: function(){
return []
}
}
},
data() {
return {
verifyIndex:0,
canvasW:"",
canvasH:"",
canvasX2:0,//
canvasX:0,//X
ctx:false,
jgX:0,//X
dqImgPath:'',//
};
},
created() {
this.canvasW = uni.upx2px(580);
this.canvasH = uni.upx2px(290);
console.log("created");
},
mounted() {
this.$nextTick(()=>{
this.init()
})
},
methods:{
// minNummaxNum
randomNum(minNum,maxNum){
switch(arguments.length){
case 1:
return parseInt(Math.random()*minNum+1,10);
break;
case 2:
return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10);
break;
default:
return 0;
break;
}
},
close_(){
this.$emit('close');
},
init(){
if(this.verifyImgs.length==0){
uni.showToast({
title: 'verifyImgs不能为空',
icon:"none"
});
return;
}
console.log("init");
this.canvasX2--;
this.canvasX = 0;
this.verifyIndex = this.randomNum(0,this.verifyImgs.length-1);
this.ctx = uni.createCanvasContext('tf-verify-canvas',this);
console.log(this.ctx);
this.jgX = this.randomNum(uni.upx2px(150),uni.upx2px(450));
this.dqImgPath = this.verifyImgs[this.verifyIndex].src;
this.huatu();
},
endTouch(){
if(Math.abs(this.canvasX-this.jgX)<=5){
this.$emit('succeed')
}else{
uni.showToast({
title: this.$t('homeNewText.dd2'),
icon:"error"
});
this.init();
}
},
huatu(){
let this_ = this;
let r = uni.upx2px(10);
let XX = this.canvasX;
let YY = uni.upx2px(100);
let cs = uni.upx2px(20);
// this_.ctx.drawImage(this_.dqImgPath,0,0,this_.canvasW,this_.canvasH);
this_.ctx.drawImage(this_.dqImgPath,16,0,this_.canvasW,this_.canvasH);
//
this_.ctx.beginPath();
this_.ctx.moveTo(-2*r+this_.jgX+cs+2*r, YY-2*r+2*r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+5.5*r, YY-2*r+2*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+5.5*r, YY-2*r+3*r, XX-2+this_.jgX*r+cs+6.5*r, YY-2*r+3*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+7.5*r, YY-2*r+3*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+8.5*r, YY-2*r+3*r, -2*r+this_.jgX+cs+8.5*r, YY-2*r+2*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+12*r, YY-2*r+2*r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+12*r, YY-2*r+11*r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+8.5*r, YY-2*r+11*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+8.5*r, YY-2*r+12*r, -2*r+this_.jgX+cs+7.5*r, YY-2*r+12*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+6.5*r, YY-2*r+12*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+5.5*r, YY-2*r+12*r, -2*r+this_.jgX+cs+5.5*r, YY-2*r+11*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+2*r, YY-2*r+11*r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+2*r, YY-2*r+8*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+3*r, YY-2*r+8*r, -2*r+this_.jgX+cs+3*r, YY-2*r+7*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+3*r, YY-2*r+6*r);
this_.ctx.arcTo(-2*r+this_.jgX+cs+3*r, YY-2*r+5*r, -2*r+this_.jgX+cs+2*r, YY-2*r+5*r, r);
this_.ctx.lineTo(-2*r+this_.jgX+cs+2*r, YY-2*r+2*r);
this_.ctx.shadowBlur=10;
this_.ctx.shadowColor="#ffffff";
this_.ctx.fillStyle = "rgba(0,0,0,0.5)";
this_.ctx.fill();
this_.ctx.restore();
//
this_.ctx.beginPath();
this_.ctx.save();
this_.ctx.moveTo(XX-2*r+cs+2*r, YY-2*r+2*r);
this_.ctx.lineTo(XX-2*r+cs+5.5*r, YY-2*r+2*r);
this_.ctx.arcTo(XX-2*r+cs+5.5*r, YY-2*r+3*r, XX-2*r+cs+6.5*r, YY-2*r+3*r, r);
this_.ctx.lineTo(XX-2*r+cs+7.5*r, YY-2*r+3*r);
this_.ctx.arcTo(XX-2*r+cs+8.5*r, YY-2*r+3*r, XX-2*r+cs+8.5*r, YY-2*r+2*r, r);
this_.ctx.lineTo(XX-2*r+cs+12*r, YY-2*r+2*r);
this_.ctx.lineTo(XX-2*r+cs+12*r, YY-2*r+11*r);
this_.ctx.lineTo(XX-2*r+cs+8.5*r, YY-2*r+11*r);
this_.ctx.arcTo(XX-2*r+cs+8.5*r, YY-2*r+12*r, XX-2*r+cs+7.5*r, YY-2*r+12*r, r);
this_.ctx.lineTo(XX-2*r+cs+6.5*r, YY-2*r+12*r);
this_.ctx.arcTo(XX-2*r+cs+5.5*r, YY-2*r+12*r, XX-2*r+cs+5.5*r, YY-2*r+11*r, r);
this_.ctx.lineTo(XX-2*r+cs+2*r, YY-2*r+11*r);
this_.ctx.lineTo(XX-2*r+cs+2*r, YY-2*r+8*r);
this_.ctx.arcTo(XX-2*r+cs+3*r, YY-2*r+8*r, XX-2*r+cs+3*r, YY-2*r+7*r, r);
this_.ctx.lineTo(XX-2*r+cs+3*r, YY-2*r+6*r);
this_.ctx.arcTo(XX-2*r+cs+3*r, YY-2*r+5*r, XX-2*r+cs+2*r, YY-2*r+5*r, r);
this_.ctx.lineTo(XX-2*r+cs+2*r, YY-2*r+2*r);
this_.ctx.shadowBlur=10;
this_.ctx.shadowColor="#ffffff";
this_.ctx.fill();
this_.ctx.clip();
// this_.ctx.drawImage(this_.dqImgPath,this_.canvasX-this_.jgX,0,this_.canvasW,this_.canvasH);
this_.ctx.drawImage(this_.dqImgPath,this_.canvasX-this_.jgX+16,0,this_.canvasW,this_.canvasH);
this_.ctx.restore();
//
this_.ctx.draw();
},
changePath(e){
// #ifdef APP-NVUE
this.canvasX = e.detail.x;
// #endif
// #ifndef APP-NVUE
this.canvasX = e.target.x;
// #endif
this.huatu();
}
}
}
</script>
<style lang="less">
.tf-Box-Bg{
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
background-color: rgba(0,0,0,.3);
display: flex;
align-items: center;
justify-content: center;
.tf-Box{
width: 640upx;
height: 584upx;
background-color: #fff;
border-radius: 6upx;
box-shadow: 0 0 50upx 0upx rgba(0,0,0,.2);
.tf-Box-title{
height: 100upx;
line-height: 100upx;
// padding: 0 32upx;
padding: 0 16px;
border-bottom: 1px solid #E1E3E9;
flex-direction: row;
display: flex;
align-items: center;
justify-content: space-between;
.text{
font-size: 32upx;
flex: 1;
}
.tf-close{
width: 28upx;
height: 28upx;
}
}
.tf-Box-center{
margin-top: 30upx;
margin-bottom: 30upx;
align-self: center;
// padding: 0 32upx;
padding: 0 16px;
}
.tf-Box-BtnBox{
margin-top: 30upx;
margin-bottom: 30upx;
align-self: center;
width: 580upx;
height: 75upx;
line-height: 75upx;
text-align: center;
font-size: 28upx;
border-radius: 6upx;
border: 1px solid #E1E3E9;
background-color: #F7F8F9;
overflow: hidden;
position: relative;
.tf-Box-BtnBox-text{
width: 100%;
height: 75upx;
position: absolute;
top: 0;
left: 0;
color: #424649;
text-align: center;
}
.tf-Box-BtnNei{
height: 75upx;
width: 75upx;
background-color: #fff;
box-shadow: 0 0 10upx 0upx rgba(0,0,0,.2);
background-image: url(img/tf-arrows.png);
background-size: 34upx;
background-position: center;
background-repeat: no-repeat;
.tf-Box-BtnNei-leftBox{
position: absolute;
top: 0;
left: -580upx;
width: 580upx;
height: 100%;
}
}
}
}
}
</style>

8
i18n/lang/de.json

@ -860,7 +860,7 @@
"dd1": "Sicher und stabil, ohne Unfälle",
"dd2": "Mehrere Sicherheitsstrategien und eine 100-prozentige Reservegarantie stellen sicher, dass es seit seiner Gründung zu keinen Sicherheitsvorfällen gekommen ist.",
"dd3": "Handeln Sie Krypto-Assets einfach und bequem",
"dd4": "Bei xxxxxx sind die Produkte leicht zu verstehen, der Transaktionsprozess bequem und die Blockchain-Asset-Service-Plattform aus einer Hand",
"dd4": "Bei CXIsux sind die Produkte leicht zu verstehen, der Transaktionsprozess bequem und die Blockchain-Asset-Service-Plattform aus einer Hand",
"dd5": "Derivate",
"dd6": "Sie können Verträge auf über 100 Kryptowährungen mit bis zu 150-facher Hebelwirkung handeln und hohe Gewinne erzielen",
"ee1": "Unterstützung mehrerer Terminals",
@ -868,6 +868,10 @@
"ee3": "Unterstützt eine breite Palette von Vermögenswerttypen, wobei alle Währungsinformationen verfügbar sind",
"ee4": "Verstehen Sie schnell den Prozess des Handels mit digitalen Vermögenswerten",
"ee5": "Beginnen Sie Ihre Verschlüsselungsreise",
"ee6": "Grafische Überprüfung"
"ee6": "Grafische Überprüfung",
"dd1": "Verifizierung erfolgreich",
"dd2": "Verifizierung fehlgeschlagen",
"dd3": "Bitte führen Sie die Sicherheitsüberprüfung durch",
"dd4": "Schieben Sie den Schieberegler, um das Rätsel zu lösen"
}
}

8
i18n/lang/en.json

@ -863,7 +863,7 @@
"dd1": "Safe and stable with zero accidents",
"dd2": "Multiple security strategies and 100% reserve guarantee ensure that no security incidents have occurred since its establishment.",
"dd3": "Trade crypto assets simply and conveniently",
"dd4": "In xxxxxx, the products are easy to understand, the transaction process is convenient, and the one-stop blockchain asset service platform",
"dd4": "In CXIsux, the products are easy to understand, the transaction process is convenient, and the one-stop blockchain asset service platform",
"dd5": "Derivatives",
"dd6": "You can trade contracts on 100+ cryptocurrencies with up to 150x leverage and earn high profits",
"ee1": "Multiple terminal support",
@ -871,7 +871,11 @@
"ee3": "Supports a wide range of asset types, with all currency information available",
"ee4": "Quickly understand the digital asset trading process",
"ee5": "Start your encryption journey",
"ee6": "Graphical verification"
"ee6": "Graphical verification",
"dd1": "Verification successful",
"dd2": "verification failed",
"dd3": "Please complete the security verification",
"dd4": "Slide the slider to complete the puzzle"
}
}

8
i18n/lang/fra.json

@ -861,7 +861,7 @@
"dd1": "Sûr et stable avec zéro accident",
"dd2": "De multiples stratégies de sécurité et une garantie de réserve à 100 % garantissent qu'aucun incident de sécurité ne s'est produit depuis sa création.",
"dd3": "Échangez des actifs cryptographiques de manière simple et pratique",
"dd4": "Dans xxxxxx, les produits sont faciles à comprendre, le processus de transaction est pratique et la plateforme unique de services d'actifs blockchain",
"dd4": "Dans CXIsux, les produits sont faciles à comprendre, le processus de transaction est pratique et la plateforme unique de services d'actifs blockchain",
"dd5": "Dérivés",
"dd6": "Vous pouvez négocier des contrats sur plus de 100 crypto-monnaies avec un effet de levier jusqu'à 150x et réaliser des bénéfices élevés",
"ee1": "Prise en charge de plusieurs terminaux",
@ -869,6 +869,10 @@
"ee3": "Prend en charge un large éventail de types d'actifs, avec toutes les informations sur les devises disponibles",
"ee4": "Comprendre rapidement le processus de trading d'actifs numériques",
"ee5": "Commencez votre voyage de chiffrement",
"ee6": "Vérification graphique"
"ee6": "Vérification graphique",
"dd1": "Vérification réussie",
"dd2": "échec de la vérification",
"dd3": "Veuillez compléter la vérification de sécurité",
"dd4": "Faites glisser le curseur pour terminer le puzzle"
}
}

8
i18n/lang/it.json

@ -860,7 +860,7 @@
"dd1": "Sicuro e stabile con zero incidenti",
"dd2": "Molteplici strategie di sicurezza e una garanzia di riserva del 100% assicurano che non si sia verificato alcun incidente di sicurezza dalla sua istituzione.",
"dd3": "Scambia risorse crittografiche in modo semplice e conveniente",
"dd4": "In xxxxxx, i prodotti sono facili da comprendere, il processo di transazione è conveniente e la piattaforma di servizi asset blockchain unica",
"dd4": "In CXIsux, i prodotti sono facili da comprendere, il processo di transazione è conveniente e la piattaforma di servizi asset blockchain unica",
"dd5": "Derivati",
"dd6": "Puoi scambiare contratti su oltre 100 criptovalute con una leva fino a 150x e ottenere profitti elevati",
"ee1": "Supporto di terminali multipli",
@ -868,6 +868,10 @@
"ee3": "Supporta un'ampia gamma di tipi di asset, con tutte le informazioni sulla valuta disponibili",
"ee4": "Comprendi rapidamente il processo di trading delle risorse digitali",
"ee5": "Inizia il tuo viaggio nella crittografia",
"ee6": "Verifica grafica"
"ee6": "Verifica grafica",
"dd1": "Verifica riuscita",
"dd2": "verifica fallita",
"dd3": "Completa la verifica di sicurezza",
"dd4": "Fai scorrere il cursore per completare il puzzle"
}
}

8
i18n/lang/jp.json

@ -860,7 +860,7 @@
"dd1": "事故ゼロで安全・安定",
"dd2": "複数のセキュリティ戦略と 100% の予備保証により、設立以来セキュリティ事故が発生していないことを保証します。",
"dd3": "暗号資産を簡単かつ便利に取引",
"dd4": "xxxxxx では、製品が理解しやすく、取引プロセスが便利で、ワンストップのブロックチェーン資産サービス プラットフォームを提供します",
"dd4": "CXIsux では、製品が理解しやすく、取引プロセスが便利で、ワンストップのブロックチェーン資産サービス プラットフォームを提供します",
"dd5": "デリバティブ",
"dd6": "最大 150 倍のレバレッジで 100 以上の暗号通貨の契約を取引し、高い利益を得ることができます",
"ee1": "複数端末のサポート",
@ -868,6 +868,10 @@
"ee3": "幅広い資産タイプをサポートし、すべての通貨情報を利用可能",
"ee4": "デジタル資産の取引プロセスをすぐに理解する",
"ee5": "暗号化への取り組みを始めましょう",
"ee6": "グラフィカルな検証"
"ee6": "グラフィカルな検証",
"dd1": "検証成功",
"dd2": "検証に失敗しました",
"dd3": "セキュリティ検証を完了してください",
"dd4": "スライダーをスライドさせてパズルを完成させます"
}
}

8
i18n/lang/kor.json

@ -860,7 +860,7 @@
"dd1": "무사고로 안전하고 안정적입니다.",
"dd2": "다양한 보안 전략과 100% 예비 보장을 통해 설립 이후 보안 사고가 발생하지 않았음을 보장합니다.",
"dd3": "간단하고 편리하게 암호화폐 자산을 거래하세요",
"dd4": "xxxxxx에서는 상품을 이해하기 쉽고, 거래 과정이 편리하며, 원스톱 블록체인 자산 서비스 플랫폼입니다.",
"dd4": "CXIsux에서는 상품을 이해하기 쉽고, 거래 과정이 편리하며, 원스톱 블록체인 자산 서비스 플랫폼입니다.",
"dd5": "파생상품",
"dd6": "최대 150배의 레버리지로 100개 이상의 암호화폐 계약을 거래하고 높은 수익을 올릴 수 있습니다",
"ee1": "다중 터미널 지원",
@ -868,6 +868,10 @@
"ee3": "모든 통화 정보를 사용할 수 있는 다양한 자산 유형을 지원합니다.",
"ee4": "디지털 자산 거래 프로세스를 빠르게 이해하세요",
"ee5": "암호화 여정을 시작하세요",
"ee6": "그래픽 검증"
"ee6": "그래픽 검증",
"dd1": "확인 성공",
"dd2": "확인 실패",
"dd3": "보안인증을 완료해주세요",
"dd4": "슬라이더를 밀어서 퍼즐을 완성하세요"
}
}

8
i18n/lang/pt.json

@ -858,7 +858,7 @@
"dd1": "Seguro e estável com zero acidentes",
"dd2": "Múltiplas estratégias de segurança e garantia de 100% de reserva garantem que nenhum incidente de segurança ocorreu desde a sua criação.",
"dd3": "Negocie ativos criptográficos de forma simples e conveniente",
"dd4": "Em xxxxxx, os produtos são fáceis de entender, o processo de transação é conveniente e a plataforma completa de serviços de ativos blockchain",
"dd4": "Em CXIsux, os produtos são fáceis de entender, o processo de transação é conveniente e a plataforma completa de serviços de ativos blockchain",
"dd5": "Derivados",
"dd6": "Você pode negociar contratos em mais de 100 criptomoedas com alavancagem de até 150x e obter lucros elevados",
"ee1": "Suporte a vários terminais",
@ -866,6 +866,10 @@
"ee3": "Suporta uma ampla variedade de tipos de ativos, com todas as informações monetárias disponíveis",
"ee4": "Entenda rapidamente o processo de negociação de ativos digitais",
"ee5": "Comece sua jornada de criptografia",
"ee6": "Verificação gráfica"
"ee6": "Verificação gráfica",
"dd1": "Verificação bem-sucedida",
"dd2": "falha na verificação",
"dd3": "Por favor, complete a verificação de segurança",
"dd4": "Deslize o controle deslizante para completar o quebra-cabeça"
}
}

8
i18n/lang/spa.json

@ -861,7 +861,7 @@
"dd1": "Seguro y estable con cero accidentes.",
"dd2": "Múltiples estrategias de seguridad y una garantía de reserva del 100% garantizan que no se hayan producido incidentes de seguridad desde su creación.",
"dd3": "Opere con criptoactivos de forma sencilla y cómoda",
"dd4": "En xxxxxx, los productos son fáciles de entender, el proceso de transacción es conveniente y la plataforma integral de servicios de activos blockchain",
"dd4": "En CXIsux, los productos son fáciles de entender, el proceso de transacción es conveniente y la plataforma integral de servicios de activos blockchain",
"dd5": "Derivados",
"dd6": "Puede negociar contratos en más de 100 criptomonedas con un apalancamiento de hasta 150x y obtener grandes ganancias",
"ee1": "Soporte para múltiples terminales",
@ -869,6 +869,10 @@
"ee3": "Admite una amplia gama de tipos de activos, con toda la información monetaria disponible",
"ee4": "Comprenda rápidamente el proceso de negociación de activos digitales",
"ee5": "Comience su viaje de cifrado",
"ee6": "Verificación gráfica"
"ee6": "Verificación gráfica",
"dd1": "Verificación exitosa",
"dd2": "Fallo en la verificación",
"dd3": "Por favor completa la verificación de seguridad.",
"dd4": "Desliza el control deslizante para completar el rompecabezas."
}
}

8
i18n/lang/tr.json

@ -858,7 +858,7 @@
"dd1": "Sıfır kazayla güvenli ve istikrarlı",
"dd2": "Çoklu güvenlik stratejileri ve %100 rezerv garantisi, kuruluşundan bu yana hiçbir güvenlik olayının yaşanmamasını sağlar.",
"dd3": "Kripto varlıklarıyla basit ve rahat bir şekilde ticaret yapın",
"dd4": "Xxxxxxx'te ürünlerin anlaşılması kolaydır, işlem süreci uygundur ve tek noktadan blockchain varlık hizmeti platformu",
"dd4": "CXIsuxx'te ürünlerin anlaşılması kolaydır, işlem süreci uygundur ve tek noktadan blockchain varlık hizmeti platformu",
"dd5": "Türevler",
"dd6": "100'den fazla kripto para birimindeki sözleşmelerle 150 katına kadar kaldıraçla işlem yapabilir ve yüksek kar elde edebilirsiniz",
"ee1": "Çoklu terminal desteği",
@ -866,7 +866,11 @@
"ee3": "Tüm para birimi bilgilerinin mevcut olduğu çok çeşitli varlık türlerini destekler",
"ee4": "Dijital varlık alım satım sürecini hızla anlayın",
"ee5": "Şifreleme yolculuğunuza başlayın",
"ee6": "Grafiksel doğrulama"
"ee6": "Grafiksel doğrulama",
"dd1": "Doğrulama başarılı",
"dd2": "doğrulama başarısız oldu",
"dd3": "Lütfen güvenlik doğrulamasını tamamlayın",
"dd4": "Bulmacayı tamamlamak için kaydırıcıyı kaydırın"
}
}

9
i18n/lang/zh-TW.json

@ -861,7 +861,7 @@
"dd1": "安全穩定零事故",
"dd2": "多重安全策略保障、100%備用金保證,成立至今未發生安全事故、",
"dd3": "簡單便捷交易加密資產",
"dd4": "在xxxxxx,產品簡單易懂、交易流程便捷,一站式區塊鏈資產服務平台",
"dd4": "在CXIsux,產品簡單易懂、交易流程便捷,一站式區塊鏈資產服務平台",
"dd5": "衍生性商品",
"dd6": "您可以高達150倍的槓桿率交易100+加密貨幣的合約,賺取高額收益",
"ee1": "多終端支持",
@ -869,7 +869,12 @@
"ee3": "支持豐富的資產種類,幣種信息一應俱全",
"ee4": "快速瞭解數字資產交易流程",
"ee5": "開啓加密之旅",
"ee6": "圖形驗證"
"ee6": "圖形驗證",
"dd1": "驗證成功",
"dd2": "驗證失敗",
"dd3": "請完成安全驗證",
"dd4": "滑動滑桿完成拼圖"
}
}

59
layout/vCode.vue

@ -44,7 +44,26 @@ export default {
type: String,
require: false,
},
sendAAA: {
type: Boolean
}
},
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();
}
}
},
components:{
vButton
},
@ -64,6 +83,7 @@ export default {
methods: {
//
send() {
console.log(this.sendAAA, '-------this.sendAAA');
if(this.data.phone==''){
this.$toast(this.$t('reg.a3'))
return
@ -74,22 +94,29 @@ export default {
}
if (this.load) return;
this.inSend = true;
serve.post(this.url, this.data)
.then((res) => {
// ss
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'));
}
})
.catch(() => {
this.inSend = false;
});
if(this.url==="/register/sendEmailCode" && !this.sendAAA){
this.$emit('changeSLider', true);
}else{
serve.post(this.url, this.data)
.then((res) => {
// ss
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;
});
}
},
countDown() {
clearInterval(this.Interval);

48
pages/reg/index.vue

@ -71,7 +71,7 @@
</template>
</view>
<!--图形验证码-->
<view class="form-item border-b m-b-md p-b-xs">
<view class="form-item border-b m-b-md p-b-xs" v-if="0">
<view class="label m-b-xs">{{$t('homeNewText.ee6')}}</view>
<v-input class="color-light" v-model="form.gr_code" :placeholder="$t('homeNewText.ee6')">
<template #right>
@ -99,7 +99,9 @@
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"
></v-code> -->
@ -107,11 +109,12 @@
url="/register/sendEmailCode"
:data="{
email:form.account,
gc_code: form.gr_code,
gc_key: gc_key,
type:1
}"
v-show="form.type==2"
@changeSLider="changeSLider"
:sendAAA="sendAAA"
@changeSendAAA="sendAAA = false"
></v-code>
</template>
</v-input>
@ -152,8 +155,12 @@
<v-link class="color-sell" v-if="agreement.clause" :to="{path:'/pages/notice/detail',query:{id:agreement.clause.id}}">{{agreement.clause.title}}</v-link>
</view>
</view>
<tf-verify-img @succeed="chenggong" @close="showVerify = false" v-if="showVerify" :verifyImgs="imgs"></tf-verify-img>
<v-button type="blue" block class="w-max m-b-md rounded-md" @click="register">{{$t('reg.b9')}}</v-button>
</view>
</view>
</view>
<view class="m-x-lg p-x-lg">
<view class="p-y-md border-t fn-center">
@ -167,6 +174,8 @@
<script>
import Member from "@/api/member";
import app from "app.js";
import tfVerifyImg from '@/components/tf-verify-img/tf-verify-img.vue';
export default {
data() {
return {
@ -186,12 +195,23 @@ export default {
gc_key:'', // tuxiangyanzheng key
check: false,
agreement: {},
country_code:''
country_code:'',
showVerify:false,
imgs:[{
src:'/static/verify/0.jpeg',
color:'#38a7b7'
},{
src:'/static/verify/1.jpeg',
color:'#485967'
}],
sendAAA: false,
};
},
computed: {
},
components:{tfVerifyImg},
methods: {
register() {
if (!this.form.account) {
@ -299,6 +319,22 @@ export default {
this.agreement = res.data;
});
},
//
changeSLider(){
this.showVerify = true;
},
open(){
console.log("open");
this.showVerify = true;
},
chenggong(){
uni.showToast({
title: this.$t('homeNewText.dd1')
});
this.showVerify = false;
this.sendAAA = true;
}
},
mounted() {
this.gett_gc_code();

BIN
static/verify/0.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

BIN
static/verify/1.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Loading…
Cancel
Save