| | |
| | | </p> |
| | | </div> |
| | | </van-cell> --> |
| | | |
| | | <div class="flex items-end justify-between"> |
| | | <!-- 热门 --> |
| | | <div class="flex items-end justify-between" style="margin: 14px 0;"> |
| | | <div class="block text-22 font-medium">{{$t('Market')}}</div> |
| | | <div class="relative text-13"> |
| | | <!-- <div class="flex px-10 justify-between rounded-full bg-black text-white min-w-100 box-border"> |
| | |
| | | currency.rate).toFixed(2) || '--' }}</p> |
| | | </li> |
| | | <li class="right flex items-center justify-end"> |
| | | <p class="w-153 font-31 h-71 bg-green text-white border-0 text-center btn" v-if="item.change_ratio > 0"> |
| | | +{{ item.change_ratio || (item.change_ratio === 0 ? 0 : '--') }}%</p> |
| | | <p class="w-153 font-31 h-71 bg-green text-white border-0 text-center btn" v-if="item.change_ratio_str > 0"> |
| | | +{{ item.change_ratio_str || (item.change_ratio_str === 0 ? 0 : '--') }}%</p> |
| | | <p class="w-153 font-31 h-71 bg-red text-white border-0 text-center btn" v-else> |
| | | {{ item.change_ratio || (item.change_ratio === 0 ? 0 : '--') }}%</p> |
| | | {{ item.change_ratio_str || (item.change_ratio_str === 0 ? 0 : '--') }}%</p> |
| | | </li> |
| | | </ul> |
| | | </van-cell> |
| | |
| | | {{ (item.volume * 1).toFixed(2) }} |
| | | </div> |
| | | <template v-else> |
| | | <p class="w-153 font-31 h-71 bg-green text-white border-0 text-center btn" v-if="item.change_ratio > 0"> |
| | | +{{ item.change_ratio }}%</p> |
| | | <p class="w-153 font-31 h-71 bg-green text-white border-0 text-center btn" v-if="item.change_ratio_str > 0"> |
| | | +{{ item.change_ratio_str }}%</p> |
| | | <p class="w-153 font-31 h-71 bg-red text-white border-0 text-center btn" v-else> |
| | | {{ item.change_ratio || (item.change_ratio === 0 ? 0 : '--') }}%</p> |
| | | {{ item.change_ratio_str || (item.change_ratio_str === 0 ? 0 : '--') }}%</p> |
| | | </template> |
| | | </li> |
| | | </ul> |
| | |
| | | }); |
| | | } else { |
| | | setStorage('symbol', item.symbol) |
| | | // /cryptos/perpetualContract/btcusdt?selectIndex=2 |
| | | this.$router.push({ |
| | | path: `/cryptos/perpetualContract/${item.symbol}`, |
| | | query: { type: 'cryptos', selectIndex: 2 } |
| | | }); |
| | | // this.$router.push({ |
| | | // path: `/foreign/deliveryContract/${item.symbol}`, |
| | | // query: { type: 'cryptos' } |
| | | // }); |
| | | this.$router.push({ |
| | | path: `/cryptos/perpetualContract/${item.symbol}`, |
| | | query: { type: 'cryptos' } |
| | | }); |
| | | // this.$router.push({ |
| | | // path: `/cryptos/perpetualContract/${item.symbol}`, |
| | | // query: { type: 'cryptos' } |
| | | // }); |
| | | } |
| | | }, |
| | | handleImage(url) { |
| | |
| | | if (val == 0) { |
| | | this.showList = [...this.listData]; |
| | | } else if (val == 1) { |
| | | this.showList = [...this.listData].sort(this.compare("change_ratio", 'up')) |
| | | this.showList = [...this.listData].sort(this.compare("change_ratio_str", 'up')) |
| | | } else if (val == 2) { |
| | | this.showList = [...this.listData].sort(this.compare("change_ratio", 'down')) |
| | | this.showList = [...this.listData].sort(this.compare("change_ratio_str", 'down')) |
| | | } else if (val == 3) { |
| | | this.showList = [...this.listData].sort(this.compare("volume", 'up')) |
| | | } |
| | |
| | | if (this.active == 0) { |
| | | this.showList = [...this.listData]; |
| | | } else if (this.active == 1) { |
| | | this.showList = [...this.listData].sort(this.compare("change_ratio", 'up')) |
| | | this.showList = [...this.listData].sort(this.compare("change_ratio_str", 'up')) |
| | | } else if (this.active == 2) { |
| | | this.showList = [...this.listData].sort(this.compare("change_ratio", 'down')) |
| | | this.showList = [...this.listData].sort(this.compare("change_ratio_str", 'down')) |
| | | } else if (this.active == 3) { |
| | | this.showList = [...this.listData].sort(this.compare("volume", 'up')) |
| | | } |