Browse Source

注册图形验证码显示不全修复,上传图片错误时清除贴图,提币增加图形验证码

master
luyisha 2 years ago
parent
commit
2b5944ef93
  1. 5
      src/components/UploadImg.vue
  2. 4
      src/views/signUp/index.vue
  3. 34
      src/views/wallet/exchange-assets.vue

5
src/components/UploadImg.vue

@ -94,6 +94,11 @@ export default {
data.append("image", this.file);
Member.uploadImage(data).then(res => {
this.$emit("input", res.path);
}).catch(err=>{
// console.log(err, '');
this.uploadImg = '';
this.file = undefined;
this.$message.error(err);
});
}
}

4
src/views/signUp/index.vue

@ -55,7 +55,9 @@
<div class="form-group row password">
<!-- 增加图形验证码 -->
<input type="text" id="gccode" v-model="user.gc_code" required :placeholder="$t('common.GraphicValidation')" class="form-control col-6" />
<img class="col-6" :src="Graph_che" @click="gett_gc_code">
<div class="col-6" style="display: inline-block;">
<img :src="Graph_che" @click="gett_gc_code" style="width: 100%;height: 100%;object-fit: contain;">
</div>
</div>
<div class="form-group row">

34
src/views/wallet/exchange-assets.vue

@ -366,6 +366,16 @@
</div>
<div class="form-group mt-2">
<!-- 增加图形验证码 -->
<label class="d-flex justify-content-between" for="" style="align-items: center;">
<span>{{$t('common.GraphicValidation')}}</span>
<img :src="Graph_che" @click="gett_gc_code">
</label>
<div class="input-group input-group-sm">
<input type="text" id="gccode" v-model="withdraw.gc_code" required :placeholder="$t('common.GraphicValidation')" class="form-control" />
</div>
</div>
<!-- 提币验证码 -->
<div class="form-group mt-2">
@ -459,7 +469,8 @@ export default {
code_type: 1,
code: '',
password:'',
emailcode: ''
emailcode: '',
gc_code: ''//
},
withdrawFee: {
@ -482,6 +493,7 @@ export default {
getEmailCodeLock: false,
JStime: 0,
tiemr: null,
Graph_che: ''
};
},
@ -632,6 +644,7 @@ export default {
coin_name: item.coin_name
})
.then(data => {
this.gett_gc_code();
this.withdrawFee = data;
})
.catch(err => { });
@ -721,13 +734,30 @@ export default {
// let gdata = {bt:this.withdraw.addressType,baddr:this.withdraw.address,bnum:this.withdraw.amount}
let gdata = {bt:this.withdrawCoin,baddr:this.withdraw.address,bnum:this.withdraw.amount}
Member.getWdcode(gdata).then(res => {
// console.log(res, 11111)
console.log(res, 546576798)
this.$message({
message: `${this.$t("login.sendOK")}`,
type: "success",
duration : 2000,
});
}).catch(err=>{
this.gett_gc_code();
});
},
//
gett_gc_code(){
Member.sendGCode().then( (res) =>{
this.gc_key = res.key
this.Graph_che = res.img
console.log("gc",res);
this.$message({
message: `${type} ${this.$t("login.sendOK")}`,
type: "success",
duration : 2000,
});
}).catch( err =>{
console.log(err)
});
}
},

Loading…
Cancel
Save