|
@@ -9,16 +9,16 @@
|
|
|
<template v-if="salePlans && salePlans.currencyCode && salePlans.currencyCode !== 'USD'">
|
|
|
<template v-if="salePlans.price.length + salePlans.currencyInfo.tokenSymbol.length >= 30">
|
|
|
<div style="text-align:center">
|
|
|
- <div><img class="icon" :src="salePlans.currencyInfo.iconPath" /> {{ salePlans.price }}</div>
|
|
|
- <div>{{ salePlans.currencyInfo.tokenSymbol }} (${{salePlans.usdPrice}})</div>
|
|
|
+ <div><img class="icon" :src="salePlans.currencyInfo.iconPath" /> {{ salePlans.price | floatPrice(4) }}</div>
|
|
|
+ <div>{{ salePlans.currencyInfo.tokenSymbol }} (${{salePlans.usdPrice | floatPrice(2)}})</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <img class="icon" :src="salePlans.currencyInfo.iconPath" /> {{ salePlans.price }} {{ salePlans.currencyInfo.tokenSymbol }} (${{salePlans.usdPrice}})
|
|
|
+ <img class="icon" :src="salePlans.currencyInfo.iconPath" /> {{ salePlans.price | floatPrice(4) }} {{ salePlans.currencyInfo.tokenSymbol }} (${{salePlans.usdPrice | floatPrice(2)}})
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <span class="info usd">${{salePlans.usdPrice}}</span>
|
|
|
+ <span class="info usd">${{salePlans.usdPrice | floatPrice(2)}}</span>
|
|
|
</template>
|
|
|
</FontZoom>
|
|
|
</div>
|
|
@@ -33,7 +33,7 @@
|
|
|
</div>
|
|
|
<div class="wallet">
|
|
|
<FontZoom width="300" :unColor="true">
|
|
|
- Balance:{{currencyInfoData.balance}} {{currencyInfoData.tokenSymbol}}
|
|
|
+ Balance:{{currencyInfoData.balance | floatPrice(4)}} {{currencyInfoData.tokenSymbol}}
|
|
|
</FontZoom>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -51,7 +51,7 @@
|
|
|
<span>DeNet Pay</span>
|
|
|
</div>
|
|
|
<div class="wallet">
|
|
|
- Balance:{{currencyInfoData.balance}} {{currencyInfoData.tokenSymbol}}
|
|
|
+ Balance:{{currencyInfoData.balance | floatPrice(2)}} {{currencyInfoData.tokenSymbol}}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="item" @click="achPay(true, Report.objectType.mastercardPayButton)">
|
|
@@ -80,7 +80,7 @@
|
|
|
<div class="text">Balance</div>
|
|
|
<div class="money">
|
|
|
<FontZoom width="300" :unColor="true">
|
|
|
- <img class="icon" :src="currencyInfoData.iconPath" /> {{currencyInfoData.balance}} {{currencyInfoData.tokenSymbol}}
|
|
|
+ <img class="icon" :src="currencyInfoData.iconPath" /> {{ salePlans.currencyCode === 'USD' ? (currencyInfoData.balance | floatPrice(2)) : (currencyInfoData.balance | floatPrice(4)) }} {{currencyInfoData.tokenSymbol}}
|
|
|
</FontZoom>
|
|
|
</div>
|
|
|
<template v-if="waitRefresh">
|
|
@@ -97,7 +97,7 @@
|
|
|
<div class="neet">You Neet to Pay</div>
|
|
|
<div class="money">
|
|
|
<FontZoom width="190" :unColor="true">
|
|
|
- <span class="text">{{salePlans.price}} {{ salePlans.currencyInfo.tokenSymbol }}</span>
|
|
|
+ <span class="text">{{ salePlans.currencyCode === 'USD' ? (salePlans.price | floatPrice(2)) : (salePlans.price | floatPrice(4)) }} {{ salePlans.currencyInfo.tokenSymbol }}</span>
|
|
|
</FontZoom>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -126,7 +126,7 @@
|
|
|
<div class="r">
|
|
|
<FontZoom width="260" :unColor="true">
|
|
|
<img :src="currencyInfoData.iconPath" />
|
|
|
- <span>{{ usdAmountData.rechargeAmountValue || 0 }} {{currencyInfoData.tokenSymbol}}</span>
|
|
|
+ <span>{{ usdAmountData.rechargeAmountValue | floatPrice(4) }} {{currencyInfoData.tokenSymbol}}</span>
|
|
|
</FontZoom>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -155,7 +155,7 @@
|
|
|
</div>
|
|
|
<div class="text">
|
|
|
<FontZoom width="260" :unColor="true">
|
|
|
- <span>Balance: {{ currencyInfoData.balance }} {{ currencyInfoData.tokenSymbol }}</span>
|
|
|
+ <span>Balance: {{ currencyInfoData.balance | floatPrice(4) }} {{ currencyInfoData.tokenSymbol }}</span>
|
|
|
</FontZoom>
|
|
|
</div>
|
|
|
<div
|
|
@@ -170,7 +170,7 @@
|
|
|
<div class="neet">You Neet to Pay</div>
|
|
|
<div class="money">
|
|
|
<FontZoomMobile width="260" :unColor="true">
|
|
|
- {{salePlans.price}} {{ salePlans.currencyInfo.tokenSymbol }}
|
|
|
+ {{salePlans.price | floatPrice(4)}} {{ salePlans.currencyInfo.tokenSymbol }}
|
|
|
</FontZoomMobile>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -189,15 +189,15 @@
|
|
|
<div class="top">
|
|
|
<div class="item usd">
|
|
|
<div class="l">Payment amount</div>
|
|
|
- <div class="r fontPayment">${{ usdAmountData.orderAmountValue }}</div>
|
|
|
+ <div class="r fontPayment">${{ usdAmountData.orderAmountValue | floatPrice(2) }}</div>
|
|
|
</div>
|
|
|
<div class="item usd">
|
|
|
<div class="l">Balance</div>
|
|
|
- <div class="r font">${{ usdAmountData.balance }}</div>
|
|
|
+ <div class="r font">${{ usdAmountData.balance | floatPrice(2) }}</div>
|
|
|
</div>
|
|
|
<div class="item usd" v-if="Number(usdAmountData.rechargeAmountValue) > 0">
|
|
|
<div class="l">{{ usdAmountData.feeDesc }}</div>
|
|
|
- <div class="r font">${{ usdAmountData.feeAmountValue }}</div>
|
|
|
+ <div class="r font">${{ usdAmountData.feeAmountValue | floatPrice(2) }}</div>
|
|
|
</div>
|
|
|
<div class="item usd" v-if="Number(usdAmountData.rechargeAmountValue) > 0">
|
|
|
<div class="l">Deposit Amount</div>
|
|
@@ -210,7 +210,7 @@
|
|
|
<div class="icon">
|
|
|
<img src="../../static/img/icon_balance_blue.svg" />
|
|
|
</div>
|
|
|
- <div class="text">Balance: ${{currencyInfoData.balance}}</div>
|
|
|
+ <div class="text">Balance: ${{currencyInfoData.balance | floatPrice(2)}}</div>
|
|
|
<div
|
|
|
class="refresh"
|
|
|
@click="checkUsdCurrencyInfo">
|
|
@@ -339,6 +339,16 @@ export default {
|
|
|
beforeDestroy() {
|
|
|
clearTimeout(this.currencyTimer);
|
|
|
},
|
|
|
+ filters: {
|
|
|
+ floatPrice(price, num) {
|
|
|
+ if (!price) return;
|
|
|
+ if (price.indexOf('.') >= 0) {
|
|
|
+ let reg = new RegExp(`^\\D*(\\d*(?:\\.\\d{0,${num}})?).*$`, "g");
|
|
|
+ price = price.replace(reg, '$1');
|
|
|
+ }
|
|
|
+ return price;
|
|
|
+ }
|
|
|
+ },
|
|
|
methods : {
|
|
|
saleInfo () {
|
|
|
postRequest(Api.getNftMysteryBoxSaleInfo, {
|