Browse Source

修改资产中提币地址的输入框为下拉框

master
liaoxinyu 1 year ago
parent
commit
4bce245277
  1. 3
      src/i18n/en.json
  2. 4
      src/i18n/tw.json
  3. 4
      src/views/wallet/address.vue
  4. 53
      src/views/wallet/exchange-assets.vue

3
src/i18n/en.json

@ -512,7 +512,8 @@
"contractFlow": "Contract Flow", "contractFlow": "Contract Flow",
"info": "Details", "info": "Details",
"money": "Amount", "money": "Amount",
"Authentication": "Authentication" "Authentication": "Authentication",
"withdrawals":"Please select the withdrawal address"
}, },
"contact": { "contact": {
"contact": "Contact Us", "contact": "Contact Us",

4
src/i18n/tw.json

@ -454,8 +454,8 @@
"contractFlow": "合約流水", "contractFlow": "合約流水",
"info": "詳情", "info": "詳情",
"money": "金額", "money": "金額",
"Authentication": "身份認證" "Authentication": "身份認證",
"withdrawals":"請選擇提幣地址"
}, },
"contact": { "contact": {
"contact": "聯繫我們", "contact": "聯繫我們",

4
src/views/wallet/address.vue

@ -116,7 +116,7 @@
<td>{{ address.address_note }}</td> <td>{{ address.address_note }}</td>
<td class="text-right"> <td class="text-right">
<!-- <div class="btn-group btn-group-sm text-nowrap" role="group" aria-label="Basic example"> --> <!-- <div class="btn-group btn-group-sm text-nowrap" role="group" aria-label="Basic example"> -->
<button <!-- <button
type="button" type="button"
class="btn btn-sm btn-info" class="btn btn-sm btn-info"
data-toggle="modal" data-toggle="modal"
@ -124,7 +124,7 @@
@click="edit(address)" @click="edit(address)"
> >
{{ $t("wallet.editAddress") }} {{ $t("wallet.editAddress") }}
</button> </button> -->
<button <button
type="button" type="button"
class="btn btn-sm btn-danger" class="btn btn-sm btn-danger"

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

@ -406,13 +406,31 @@
<span> <span>
{{$t('wallet.low')}}:{{withdrawFee.withdrawal_min}} {{$t('wallet.low')}}:{{withdrawFee.withdrawal_min}}
{{withdrawCoin}} {{withdrawCoin}}
<router-link to="" @click.native="addressText" class="text-primary">{{$t('wallet.addressList')}}</router-link> <!-- <router-link to="" @click.native="addressText" class="text-primary">{{$t('wallet.addressList')}}</router-link> -->
<router-link to="" @click.native="addressText" class="text-primary">{{$t('wallet.addAddress')}}</router-link>
</span> </span>
</label> </label>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" :placeholder="$t('wallet.enterDrawAddress')" <!-- <input type="text" :placeholder="$t('wallet.enterDrawAddress')"
:data-message="$t('wallet.invalidWallet')+'!'" :data-message="$t('wallet.invalidWallet')+'!'"
v-model="withdraw.address" class="form-control" required /> v-model="withdraw.address" class="form-control" required /> -->
<el-select v-model="withdraw.address" :placeholder="$t('wallet.withdrawals')" no-data-text="Please add the withdrawal address first">
<div v-for="(item,index) in userAdressList" :key="item.coin_id" v-if="withdrawCoin==item.coin_name">
<el-option v-for="(items,index) in item.list" :key="items.id"
:label="items.address" :value="items.address"
@click.native="changeaddress(items.created_at)">
<span>{{ items.address }}</span>
</el-option>
</div>
<!-- <el-option v-else value="">
<span>请先添加提币地址</span>
</el-option> -->
<!-- <div v-else>
<el-option value="">
<span>请先添加提币地址</span>
</el-option>
</div> -->
</el-select>
</div> </div>
</div> </div>
<div class="form-group mt-2"> <div class="form-group mt-2">
@ -496,6 +514,7 @@
import ClipboardJS from "clipboard"; import ClipboardJS from "clipboard";
import getCode from "./getCode"; import getCode from "./getCode";
import vueQr from "vue-qr"; import vueQr from "vue-qr";
import date from "@/utils/class/date.js";
export default { export default {
components: { components: {
InnerTransfer, InnerTransfer,
@ -565,6 +584,8 @@
getEmailCodeLock: false, getEmailCodeLock: false,
JStime: 0, JStime: 0,
tiemr: null, tiemr: null,
userAdressList: [], //
created_at:''
}; };
}, },
@ -592,6 +613,10 @@
} }
}, },
methods: { methods: {
parseTime: date.parseTime,
changeaddress(val){
this.created_at = val
},
// //
paypalSbumit() { paypalSbumit() {
if (!this.paypal.amount) { if (!this.paypal.amount) {
@ -729,6 +754,17 @@
// //
toHandleWithdraw() { toHandleWithdraw() {
let data = this.withdrawFee let data = this.withdrawFee
// const apiTimeDate = new Date(this.created_at);
// const currentTime = new Date();
// const time = this.parseTime(currentTime)
// const time1 = new Date(time);
// const timeDiff = apiTimeDate - time1; //
// const twentyFourHours = 24 * 60 * 60 * 1000; // 24
// if(timeDiff >= twentyFourHours){
// this.$message.error('Tips: You can withdraw money from the newly added address after 24 hours')
// }
if (utils.validate(".withdraw-body")) { if (utils.validate(".withdraw-body")) {
if (data.withdraw_switch == 1) { if (data.withdraw_switch == 1) {
$("#withdraw").modal("hide"); $("#withdraw").modal("hide");
@ -838,7 +874,15 @@
addressText(){ addressText(){
$("#withdraw").modal("hide"); $("#withdraw").modal("hide");
this.$router.push("/wallet/address") this.$router.push("/wallet/address")
} },
getUserAdressList() {
Wallet.getUserWithdrawAdress()
.then((data) => {
this.userAdressList = []
this.userAdressList = data;
})
.catch((err) => {});
},
}, },
created() { created() {
@ -848,6 +892,7 @@
this.createWalletAddress(); this.createWalletAddress();
this.getUserInfo(); this.getUserInfo();
this.getAuthInfo(); this.getAuthInfo();
this.getUserAdressList()
}, },
mounted() { mounted() {

Loading…
Cancel
Save