|
|
|
@ -7,7 +7,9 @@ |
|
|
|
<div class="h3 mb-3">{{ detail.coin_name }}</div> |
|
|
|
<div class>{{ $t("purchase.sendPrice") }}</div> |
|
|
|
<div class="price fn-20 blue"> |
|
|
|
1 {{ detail.coin_name }} = {{ detail.issue_price }} USDT |
|
|
|
1 {{ detail.coin_name }} = {{issue_price}} |
|
|
|
<!-- {{ detail.issue_price }} --> |
|
|
|
USDT |
|
|
|
</div> |
|
|
|
<ul> |
|
|
|
<li class="mt-3"> |
|
|
|
@ -84,16 +86,23 @@ |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<p v-if="activeCoin.usable_balance"> |
|
|
|
<!-- v-if="activeCoin.usable_balance" --> |
|
|
|
<p > |
|
|
|
{{ $t("wallet.availableBalance") }}:{{ activeCoin.usable_balance }} |
|
|
|
</p> |
|
|
|
<p> |
|
|
|
1 {{ activeCoin.coin_name }} ≈ |
|
|
|
{{ activeCoin.proportion_amount | omitTo(5) }} |
|
|
|
1 |
|
|
|
<!-- {{ activeCoin.coin_name }} --> |
|
|
|
USDT |
|
|
|
≈ |
|
|
|
{{ 1 / detail.issue_price | omitTo(4)}} |
|
|
|
<!-- {{ activeCoin.proportion_amount | omitTo(5) }} --> |
|
|
|
{{ detail.coin_name }} |
|
|
|
</p> |
|
|
|
<p> |
|
|
|
{{ num || 0 }} {{ activeCoin.coin_name }} ≈ {{ total }} |
|
|
|
{{ num || 0 }} {{ activeCoin.coin_name }} ≈ |
|
|
|
{{(activeCoin.CurrentPrice/ detail.issue_price)*num | omitTo(4)}} |
|
|
|
<!-- {{ total }} --> |
|
|
|
{{ detail.coin_name }} |
|
|
|
</p> |
|
|
|
<button |
|
|
|
@ -155,6 +164,9 @@ |
|
|
|
<th>{{$t('purchase.subscriptionCurrency')}}</th> |
|
|
|
<th>{{$t('contract.b1')}}</th> |
|
|
|
<th>{{$t('contract.l1')}}</th> |
|
|
|
<th>{{$t('contract.l4')}} |
|
|
|
<!-- (USDT) --> |
|
|
|
</th> |
|
|
|
<th class="text-right">{{$t('wallet.status')}}</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
@ -168,7 +180,10 @@ |
|
|
|
<td>{{ item.payment_amount }}</td> |
|
|
|
<td>{{ item.payment_currency }}</td> |
|
|
|
<td>{{ item.subscription_time|parseTime }}</td> |
|
|
|
<td>{{ ( ((detail.issue_price-(item.payment_amount/item.subscription_currency_amount))/detail.issue_price)*100 ).toFixed(2) }}%</td> |
|
|
|
<td>{{(item.increase_ratio).toFixed(5)}}%</td> |
|
|
|
<td>{{(item.total_value).toFixed(5)}}</td> |
|
|
|
<!-- <td>{{ ( ((detail.issue_price-(item.payment_amount/item.subscription_currency_amount))/detail.issue_price)*100 ).toFixed(2) }}%</td> --> |
|
|
|
<!-- <td>{{ ( (((item.payment_amount/item.subscription_currency_amount))*detail.issue_price) ).toFixed(2) }}</td> --> |
|
|
|
<td class="text-right"> |
|
|
|
<span class="success">{{$t('wallet.success')}}</span> |
|
|
|
</td> |
|
|
|
@ -290,22 +305,24 @@ import Wallet from "@/api/wallet"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
num: "", |
|
|
|
coinList: [], |
|
|
|
detail: {}, |
|
|
|
activeCoin: {}, |
|
|
|
code:"", |
|
|
|
transferRecords: [], |
|
|
|
coinName:"", |
|
|
|
subscribeRecords:[], |
|
|
|
activityList:[{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""}], |
|
|
|
activestep:0 |
|
|
|
num: 1, |
|
|
|
coinList: [], |
|
|
|
detail: {}, |
|
|
|
activeCoin: {}, |
|
|
|
code:"", |
|
|
|
transferRecords: [], |
|
|
|
coinName:"", |
|
|
|
subscribeRecords:[], |
|
|
|
activityList:[{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""}], |
|
|
|
activestep:0, |
|
|
|
issue_price:0.03, |
|
|
|
timer:'' |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
total() { |
|
|
|
return utils.multiple( |
|
|
|
this.num || 0, |
|
|
|
this.num || 1, |
|
|
|
this.activeCoin.proportion_amount * 1, |
|
|
|
2 |
|
|
|
); |
|
|
|
@ -378,22 +395,22 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
ifSubscribeNow() { |
|
|
|
if (this.chkValidate()) { |
|
|
|
this.$confirm( |
|
|
|
`${this.$t("purchase.useOrNot")}${this.activeCoin.coin_name}${this.$t( |
|
|
|
"purchase.subscribe" |
|
|
|
)}?`, |
|
|
|
this.$t("purchase.prompt"), |
|
|
|
{ |
|
|
|
confirmButtonText: this.$t("common.confirmBtn"), |
|
|
|
cancelButtonText: this.$t("common.cancelBtn"), |
|
|
|
if (this.chkValidate()) { |
|
|
|
this.$confirm( |
|
|
|
`${this.$t("purchase.useOrNot")}${this.activeCoin.coin_name}${this.$t( |
|
|
|
"purchase.subscribe" |
|
|
|
)}?`, |
|
|
|
this.$t("purchase.prompt"), |
|
|
|
{ |
|
|
|
confirmButtonText: this.$t("common.confirmBtn"), |
|
|
|
cancelButtonText: this.$t("common.cancelBtn"), |
|
|
|
} |
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
this.subscribeNow(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
} |
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
this.subscribeNow(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
} |
|
|
|
}, |
|
|
|
sbumit(){ |
|
|
|
$("#editAddress").modal("hide"); |
|
|
|
@ -409,30 +426,34 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
subscribeNow() { |
|
|
|
let data = { |
|
|
|
amount: this.num, |
|
|
|
coin_name: this.activeCoin.coin_name, |
|
|
|
}; |
|
|
|
Subscride.subscribeNow(data) |
|
|
|
.then((res) => { |
|
|
|
if (res) { |
|
|
|
this.$message.success(this.$t("purchase.subscribeSuccess")); |
|
|
|
this.num = ""; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
if(err==4002){ |
|
|
|
$("#editAddress").modal("show"); |
|
|
|
} |
|
|
|
}); |
|
|
|
let data = { |
|
|
|
amount: this.num, |
|
|
|
coin_name: this.activeCoin.coin_name, |
|
|
|
}; |
|
|
|
Subscride.subscribeNow(data).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.$message.success(this.$t("purchase.subscribeSuccess")); |
|
|
|
this.num = ""; |
|
|
|
this.getTransferRecords() |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
if(err==4002){ |
|
|
|
$("#editAddress").modal("show"); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.subscribeTokenList(); |
|
|
|
this.getInfo(); |
|
|
|
this.getTransferRecords() |
|
|
|
this.activity() |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.subscribeTokenList(); |
|
|
|
this.getInfo(); |
|
|
|
this.getTransferRecords() |
|
|
|
this.activity() |
|
|
|
this.timer=setInterval(this.getTransferRecords,5000) |
|
|
|
}, |
|
|
|
beforeDestroy() { |
|
|
|
clearInterval(this.timer); |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
|