|
|
|
@ -199,12 +199,23 @@ |
|
|
|
)</template> |
|
|
|
</label> |
|
|
|
<div class="input-group input-group-sm"> |
|
|
|
<input type="text" v-model="deposite.address" readonly class="form-control" id="deposite-address" required /> |
|
|
|
<div class="input-group-append dopsite-control" data-clipboard-target="#deposite-address"> |
|
|
|
<span class="my-pop input-group-text" data-toggle="popover" data-placement="bottom" :data-content="$t('wallet.rechargeAddress')+'!'"> |
|
|
|
<a href="javascript:void 0" alt="Copy to clipboard">{{$t('wallet.copy')}}</a> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<!-- <input type="text" v-model="deposite.address" readonly class="form-control" id="deposite-address" required /> |
|
|
|
<div class="input-group-append dopsite-control" data-clipboard-target="#deposite-address"> |
|
|
|
<span class="my-pop input-group-text" data-toggle="popover" data-placement="bottom" :data-content="$t('wallet.rechargeAddress')+'!'"> |
|
|
|
<a href="javascript:void 0" alt="Copy to clipboard">{{$t('wallet.copy')}}</a> |
|
|
|
</span> |
|
|
|
</div> --> |
|
|
|
<template v-if="deposite.address!=''"> |
|
|
|
<input type="text" v-model="deposite.address" readonly class="form-control" id="deposite-address" required /> |
|
|
|
<div class="input-group-append dopsite-control" data-clipboard-target="#deposite-address"> |
|
|
|
<span class="my-pop input-group-text" data-toggle="popover" data-placement="bottom" :data-content="$t('wallet.rechargeAddress')+'!'"> |
|
|
|
<a href="javascript:void 0" alt="Copy to clipboard">{{$t('wallet.copy')}}</a> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<el-button type="primary" style="width:100%" @click="getRechargeAdd">{{$t('wallet.obtain')}}</el-button> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group mt-2" v-if="false"> |
|
|
|
@ -373,6 +384,7 @@ |
|
|
|
<script> |
|
|
|
import InnerTransfer from "../components/inner-transfer.vue"; |
|
|
|
import Wallet from "@/api/wallet"; |
|
|
|
import Profile from "@/api/profile"; |
|
|
|
import ClipboardJS from "clipboard"; |
|
|
|
import getCode from "./getCode"; |
|
|
|
import vueQr from "vue-qr"; |
|
|
|
@ -385,60 +397,60 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
// 所有资产列表,需要接口返回 |
|
|
|
userAssets: { |
|
|
|
contract_account_btc: 0, |
|
|
|
contract_account_usd: 0, |
|
|
|
funds_account_btc: 0, |
|
|
|
funds_account_usd: 0, |
|
|
|
total_assets_btc: 0, |
|
|
|
total_assets_usd: 0 |
|
|
|
}, |
|
|
|
|
|
|
|
coinAssets: [], // 币种账户 |
|
|
|
|
|
|
|
isHideZero: false, // 是否隐藏0余额资产 |
|
|
|
keyword: "", |
|
|
|
showValue: true, // 默认隐藏资产数值 |
|
|
|
|
|
|
|
depositeCoin: null, |
|
|
|
depositeAdressType: 1, // 默认充值类型 1 为 omin 2 为 erc20 |
|
|
|
|
|
|
|
withdrawCoin: null, |
|
|
|
|
|
|
|
// 充值币种 |
|
|
|
deposite: { |
|
|
|
coin_id: "", |
|
|
|
amount: "", |
|
|
|
address: "" |
|
|
|
}, |
|
|
|
|
|
|
|
// 提取币种 |
|
|
|
withdraw: { |
|
|
|
coin_id: "", |
|
|
|
amount: "", |
|
|
|
address: "", |
|
|
|
addressType: 1, // 默认提币类型 1 为 omni; 2 为 erc20, |
|
|
|
code_type: 1, |
|
|
|
code: '' |
|
|
|
}, |
|
|
|
|
|
|
|
withdrawFee: { |
|
|
|
usable_balance: "-", |
|
|
|
withdrawal_fee: "-", |
|
|
|
withdrawal_min: "-", |
|
|
|
withdrawal_max: "-" |
|
|
|
}, // 提币手续费和余额 |
|
|
|
|
|
|
|
// 所有资产提取 |
|
|
|
allAssets: false, // |
|
|
|
cacheInputAssets: null, |
|
|
|
verShow: false, |
|
|
|
active:0, |
|
|
|
paypal:{ |
|
|
|
number:"", |
|
|
|
amount:"", |
|
|
|
images:"" |
|
|
|
} |
|
|
|
userAssets: { |
|
|
|
contract_account_btc: 0, |
|
|
|
contract_account_usd: 0, |
|
|
|
funds_account_btc: 0, |
|
|
|
funds_account_usd: 0, |
|
|
|
total_assets_btc: 0, |
|
|
|
total_assets_usd: 0 |
|
|
|
}, |
|
|
|
userInfo:{},//账户信息 |
|
|
|
coinAssets: [], // 币种账户 |
|
|
|
|
|
|
|
isHideZero: false, // 是否隐藏0余额资产 |
|
|
|
keyword: "", |
|
|
|
showValue: true, // 默认隐藏资产数值 |
|
|
|
|
|
|
|
depositeCoin: null, |
|
|
|
depositeAdressType: 1, // 默认充值类型 1 为 omin 2 为 erc20 |
|
|
|
|
|
|
|
withdrawCoin: null, |
|
|
|
|
|
|
|
// 充值币种 |
|
|
|
deposite: { |
|
|
|
coin_id: "", |
|
|
|
amount: "", |
|
|
|
address: "" |
|
|
|
}, |
|
|
|
|
|
|
|
// 提取币种 |
|
|
|
withdraw: { |
|
|
|
coin_id: "", |
|
|
|
amount: "", |
|
|
|
address: "", |
|
|
|
addressType: 1, // 默认提币类型 1 为 omni; 2 为 erc20, |
|
|
|
code_type: 1, |
|
|
|
code: '' |
|
|
|
}, |
|
|
|
|
|
|
|
withdrawFee: { |
|
|
|
usable_balance: "-", |
|
|
|
withdrawal_fee: "-", |
|
|
|
withdrawal_min: "-", |
|
|
|
withdrawal_max: "-" |
|
|
|
}, // 提币手续费和余额 |
|
|
|
|
|
|
|
// 所有资产提取 |
|
|
|
allAssets: false, // |
|
|
|
cacheInputAssets: null, |
|
|
|
verShow: false, |
|
|
|
active:0, |
|
|
|
paypal:{ |
|
|
|
number:"", |
|
|
|
amount:"", |
|
|
|
images:"" |
|
|
|
} |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -531,12 +543,12 @@ export default { |
|
|
|
|
|
|
|
// 生成充值地址 |
|
|
|
getDepositeAdress() { |
|
|
|
Wallet.walletImage({ |
|
|
|
coin_id: this.deposite.coin_id, |
|
|
|
address_type: this.depositeAdressType // 充值地址类型 |
|
|
|
}) |
|
|
|
Wallet.walletImage({ |
|
|
|
coin_id: this.deposite.coin_id, |
|
|
|
address_type: this.depositeAdressType // 充值地址类型 |
|
|
|
}) |
|
|
|
.then(data => { |
|
|
|
this.deposite.address = data.address; |
|
|
|
this.deposite.address = data.address; |
|
|
|
}) |
|
|
|
.catch(err => { }); |
|
|
|
}, |
|
|
|
@ -548,6 +560,14 @@ export default { |
|
|
|
// 初始化充值地址 |
|
|
|
this.getDepositeAdress(); |
|
|
|
}, |
|
|
|
//获取充值地址 |
|
|
|
getRechargeAdd(){ |
|
|
|
if(this.userInfo.user_auth_level!=0){ |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.$message.error(this.$t("wallet.auth")) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 处理充值 |
|
|
|
handleDeposite() { |
|
|
|
@ -605,24 +625,31 @@ export default { |
|
|
|
}, |
|
|
|
// 验证码输入完成 |
|
|
|
codeComplete(obj) { |
|
|
|
this.withdraw.code_type = obj.code_type |
|
|
|
this.withdraw.code = obj.code |
|
|
|
this.verShow = false |
|
|
|
this.handleWithdraw() |
|
|
|
this.withdraw.code_type = obj.code_type |
|
|
|
this.withdraw.code = obj.code |
|
|
|
this.verShow = false |
|
|
|
this.handleWithdraw() |
|
|
|
}, |
|
|
|
// 创建充币地址 |
|
|
|
createWalletAddress() { |
|
|
|
// 文鹏写的接口 |
|
|
|
// Wallet.createWalletAddress(); |
|
|
|
}, |
|
|
|
// 获取个人信息 |
|
|
|
getUserInfo() { |
|
|
|
Profile.getUserInfo({}).then(res => { |
|
|
|
this.userInfo = res |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
created() { |
|
|
|
this.getPaypal() |
|
|
|
this.getUserAssets(); |
|
|
|
this.getCoinAssets(); |
|
|
|
this.createWalletAddress(); |
|
|
|
}, |
|
|
|
this.getUserInfo() |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
const clipboard = new ClipboardJS(".dopsite-control"); |
|
|
|
|