Browse Source

提币验证码、注册图形码

master
luyisha 3 years ago
parent
commit
bac011e386
  1. 2
      api/serve/index.js
  2. 16
      layout/vCode.vue
  3. 4
      layout/vDropdwon.vue
  4. 76
      pages/assets/draw.vue
  5. 28
      pages/reg/index.vue

2
api/serve/index.js

@ -90,7 +90,7 @@ x.fn = x.prototype = {
&& newMsg!='_user_wdcode' && newMsg!='_register_Graph_che' && newMsg!='_register_sendEmailCode' && newMsg!='_user_wdcode' && newMsg!='_register_Graph_che' && newMsg!='_register_sendEmailCode'
&& newMsg!='_user_subscribeRecords' && newMsg!='_user_subscribeNow' && newMsg!='_exchange_getMarketInfo' && newMsg!='_user_subscribeRecords' && newMsg!='_user_subscribeNow' && newMsg!='_exchange_getMarketInfo'
&& newMsg!='_indexList'&& newMsg!='_user_subscribe'&& newMsg!='_contract_getSymbolDetail' && newMsg!='_user_withdrawalRecord'){ && newMsg!='_indexList'&& newMsg!='_user_subscribe'&& newMsg!='_contract_getSymbolDetail' && newMsg!='_user_withdrawalRecord'){
resolve(Cache.get(newMsg).data); // resolve(Cache.get(newMsg).data);//获取缓存中的数据
} }
uni.request({ uni.request({

16
layout/vCode.vue

@ -45,16 +45,9 @@ export default {
type: String, type: String,
require: false, require: false,
}, },
sendAAA: {
type: Boolean
}
}, },
watch: { watch: {
sendAAA(n,o){
if(n){
this.send();
}
}
}, },
components:{ components:{
vButton vButton
@ -75,7 +68,6 @@ export default {
methods: { methods: {
// //
send() { send() {
// console.log(this.sendAAA, '-------this.sendAAA');
if(this.data.phone==''){ if(this.data.phone==''){
this.$toast(this.$t('reg.a3')) this.$toast(this.$t('reg.a3'))
return return
@ -86,11 +78,6 @@ export default {
} }
if (this.load) return; if (this.load) return;
this.inSend = true; this.inSend = true;
// if(this.url==="/register/sendEmailCode" && !this.sendAAA){
// this.$emit('changeSLider', true);
// return;
// }
// serve.post(this.url, this.data)
Member.sendEmailCode(this.data) Member.sendEmailCode(this.data)
.then((res) => { .then((res) => {
if(res.code=='4001'){ if(res.code=='4001'){
@ -103,7 +90,6 @@ export default {
this.load = true; this.load = true;
this.countDown(); this.countDown();
this.$toast(this.$t('common.sendSuccess')); this.$toast(this.$t('common.sendSuccess'));
// this.$emit('changeSendAAA', false)
} }
}) })
.catch(() => { .catch(() => {

4
layout/vDropdwon.vue

@ -58,7 +58,7 @@ export default {
leverShow:{ leverShow:{
deep: true, deep: true,
handler:function(newVal,oldVal) { handler:function(newVal,oldVal) {
console.log(newVal, '下拉组件leverShow更新'); // console.log(newVal, 'leverShow');
this.$nextTick(() => { this.$nextTick(() => {
this.text=this.list[newVal].label; this.text=this.list[newVal].label;
}) })
@ -67,7 +67,7 @@ export default {
list:{ list:{
deep: true, deep: true,
handler:function(newVal,oldVal) { handler:function(newVal,oldVal) {
console.log(newVal, '下拉组件list更新'); // console.log(newVal, 'list');
if(this.contract==1&&this.list){ if(this.contract==1&&this.list){
this.text=this.list[1].label this.text=this.list[1].label
}else if(this.contract==0&&this.list){ }else if(this.contract==0&&this.list){

76
pages/assets/draw.vue

@ -116,16 +116,30 @@
</v-input> </v-input>
</view> </view>
<view class="d-flex align-center p-y-xs m-t-ms justify-between color-light fn-15"> <view class="d-flex align-center p-y-xs m-t-ms justify-between color-light fn-15">
<span>{{ $t("reg.a8") }}</span> <span>{{ $t("reg.a8") }}</span>
<!-- <span class="color-light">{{ withdrawFee.withdrawal_fee }} {{coin}}</span> --> <!-- <span class="color-light">{{ withdrawFee.withdrawal_fee }} {{coin}}</span> -->
</view> </view>
<view class="d-flex align-end p-y-xs justify-between bg-form-panel-3 rounded-xs p-y-sm"> <view class="d-flex align-end p-y-xs justify-between bg-form-panel-3 rounded-xs p-y-sm">
<v-input type="password" v-model="form.password" class="p-x-ms color-light w-max fn-13 rounded-xs" :placeholder="$t('reg.a9')"> <v-input type="password" v-model="form.password" class="p-x-ms color-light w-max fn-13 rounded-xs" :placeholder="$t('reg.a9')">
</v-input> </v-input>
</view> </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>
<view class="form bg-panel-3 p-x-lg p-y-md"> <view class="form bg-panel-3 p-x-lg p-y-md">
<ul class="fn-md rounded-md m-y-xs line-height-2"> <ul class="fn-md rounded-md m-y-xs line-height-2">
@ -221,6 +235,7 @@
<script> <script>
import coinList from "./coin-list"; import coinList from "./coin-list";
import Wallet from "@/api/wallet"; import Wallet from "@/api/wallet";
import Member from "@/api/member";
import formData from "@/utils/class/date"; import formData from "@/utils/class/date";
export default { export default {
@ -240,14 +255,18 @@ export default {
addressType: "", addressType: "",
code_type: 1, code_type: 1,
code: '', code: '',
password: '' password: '',
emailcode: '',
}, },
withdrawFee: {}, withdrawFee: {},
list: [], list: [],
page: 1, page: 1,
loadMore: true, loadMore: true,
secondaryShow: false, secondaryShow: false,
type: 'draw' type: 'draw',
getEmailCodeLock: false,
JStime: 0,
tiemr: null,
}; };
}, },
computed: { computed: {
@ -257,6 +276,9 @@ export default {
(item) => item.coin_name == this.coin (item) => item.coin_name == this.coin
); );
}, },
daojishi(){
return '('+this.JStime + 's' + ')';
}
}, },
watch: { watch: {
coin(n) { coin(n) {
@ -306,6 +328,40 @@ export default {
this.withdrawFee = res.data; this.withdrawFee = res.data;
}); });
}, },
//
getEmailCode(){
if (!this.form.address) {
this.$toast(this.$t('assets.b9'))
return
}
if (!this.form.amount) {
this.$toast(this.$t('assets.c2'))
return
}
if (!this.form.password) {
this.$toast(this.$t('reg.a9'))
return
}
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({bt:this.coin,baddr:this.form.address,bnum:this.form.amount}).then(res=>{
// console.log(res);
if(res.code=='4001'){
this.$toast(res.message);
}else{
this.$toast(this.$t('common.sendSuccess'));
}
})
},
// //
toDraw() { toDraw() {
if (!this.form.address) { if (!this.form.address) {

28
pages/reg/index.vue

@ -155,7 +155,6 @@
<v-link class="color-sell" v-if="agreement.clause" :to="{path:'/pages/notice/detail',query:{id:agreement.clause.id}}">{{agreement.clause.title}}</v-link> <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>
</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> <v-button type="blue" block class="w-max m-b-md rounded-md" @click="register">{{$t('reg.b9')}}</v-button>
</view> </view>
</view> </view>
@ -171,7 +170,6 @@
<script> <script>
import Member from "@/api/member"; import Member from "@/api/member";
import app from "app.js"; import app from "app.js";
import tfVerifyImg from '@/components/tf-verify-img/tf-verify-img.vue';
export default { export default {
data() { data() {
@ -194,22 +192,13 @@ export default {
agreement: {}, agreement: {},
country_code:'', country_code:'',
showVerify:false,
imgs:[{
src:'/static/verify/0.jpeg',
color:'#38a7b7'
},{
src:'/static/verify/1.jpeg',
color:'#485967'
}],
sendAAA: false,
hideImg: false hideImg: false
}; };
}, },
computed: { computed: {
}, },
components:{tfVerifyImg}, components:{},
methods: { methods: {
register() { register() {
if (!this.form.account) { if (!this.form.account) {
@ -324,21 +313,6 @@ export default {
this.agreement = res.data; 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() { mounted() {
this.gett_gc_code(); this.gett_gc_code();

Loading…
Cancel
Save