| | |
| | | }, |
| | | myMoney: "", |
| | | my_availableBalance: 0, |
| | | fromCurrency: "USDT", |
| | | fromCurrency: "USD", |
| | | toCurrency: "ST", |
| | | fromAmount: "", |
| | | toAmount: "", |
| | | fromBalance: "1000.00", |
| | | exchangeRate: "1 USDT = 100 ST", |
| | | exchangeRate: "1 USD = 100 ST", |
| | | currencyOptions: [ |
| | | { text: "USDT", value: "USDT" }, |
| | | { text: "USD", value: "USD" }, |
| | | { text: "ST", value: "ST" } |
| | | // { text: "欧元(EUR)", value: "EUR" }, |
| | | // { text: "英镑(GBP)", value: "GBP" } |
| | |
| | | |
| | | if (this.fromCurrency === "ST") { |
| | | this.my_availableBalance = 0; |
| | | } else if (this.fromCurrency === "USDT" || this.fromCurrency === "USD") { |
| | | } else if (this.fromCurrency === "USD" || this.fromCurrency === "USD") { |
| | | this.my_availableBalance = 1; |
| | | } |
| | | console.log(this.myMoney[this.my_availableBalance].availableBalance); |
| | |
| | | // 示例简单计算 |
| | | if (this.fromAmount && this.fromCurrency && this.toCurrency) { |
| | | const rate = |
| | | this.fromCurrency === "USDT" && this.toCurrency === "ST" ? 100 : 1; |
| | | this.fromCurrency === "USD" && this.toCurrency === "ST" ? 100 : 1; |
| | | this.toAmount = (this.fromAmount * rate).toFixed(2); |
| | | } |
| | | }, |
| | |
| | | this.myMoney = data.data; |
| | | if (this.fromCurrency === "ST") { |
| | | this.my_availableBalance = 0; |
| | | } else if ( |
| | | this.fromCurrency === "USDT" || |
| | | this.fromCurrency === "USD" |
| | | ) { |
| | | } else if (this.fromCurrency === "USD") { |
| | | this.my_availableBalance = 1; |
| | | } |
| | | } else { |
| | |
| | | text-decoration: none; |
| | | } |
| | | |
| | | .wrapper /deep/ .mint-tab-item-label { |
| | | font-size: 0.264rem; |
| | | .wrapper /deep/ .van-nav-bar__title { |
| | | font-size: 0.4rem !important; |
| | | } |
| | | .wrapper /deep/ .van-cell { |
| | | font-size: 0.31rem !important; |
| | | } |
| | | |
| | | .mint-navbar .mint-tab-item.is-selected { |