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",
"info": "Details",
"money": "Amount",
"Authentication": "Authentication"
"Authentication": "Authentication",
"withdrawals":"Please select the withdrawal address"
},
"contact": {
"contact": "Contact Us",

4
src/i18n/tw.json

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

4
src/views/wallet/address.vue

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

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

@ -406,13 +406,31 @@
<span>
{{$t('wallet.low')}}:{{withdrawFee.withdrawal_min}}
{{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>
</label>
<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')+'!'"
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 class="form-group mt-2">
@ -496,6 +514,7 @@
import ClipboardJS from "clipboard";
import getCode from "./getCode";
import vueQr from "vue-qr";
import date from "@/utils/class/date.js";
export default {
components: {
InnerTransfer,
@ -565,6 +584,8 @@
getEmailCodeLock: false,
JStime: 0,
tiemr: null,
userAdressList: [], //
created_at:''
};
},
@ -592,6 +613,10 @@
}
},
methods: {
parseTime: date.parseTime,
changeaddress(val){
this.created_at = val
},
//
paypalSbumit() {
if (!this.paypal.amount) {
@ -729,6 +754,17 @@
//
toHandleWithdraw() {
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 (data.withdraw_switch == 1) {
$("#withdraw").modal("hide");
@ -838,7 +874,15 @@
addressText(){
$("#withdraw").modal("hide");
this.$router.push("/wallet/address")
}
},
getUserAdressList() {
Wallet.getUserWithdrawAdress()
.then((data) => {
this.userAdressList = []
this.userAdressList = data;
})
.catch((err) => {});
},
},
created() {
@ -848,6 +892,7 @@
this.createWalletAddress();
this.getUserInfo();
this.getAuthInfo();
this.getUserAdressList()
},
mounted() {

Loading…
Cancel
Save