| | |
| | | methods: { |
| | | ...mapActions('home', [SET_CURRENCY]), |
| | | onItemClick(item) { |
| | | if (this.tabActive == 2) { //现货 |
| | | const tab = this.tabActive !== undefined && this.tabActive !== null ? Number(this.tabActive) : 2; |
| | | if (tab === 1) { |
| | | // 现货 |
| | | this.$router.push({ |
| | | path: `/cryptos/trade/${item.symbol}` |
| | | }); |
| | | } else { |
| | | setStorage('symbol', item.symbol) |
| | | } else if (tab === 3) { |
| | | // 期权:交割合约,跳转交易页并带 selectIndex=2 |
| | | setStorage('symbol', item.symbol); |
| | | this.$router.push({ |
| | | path: `/cryptos/perpetualContract/${item.symbol}`, |
| | | path: '/trade/index', |
| | | query: { selectIndex: 2 } |
| | | }); |
| | | } else { |
| | | // 全部(0) 或 永续(2) |
| | | setStorage('symbol', item.symbol); |
| | | this.$router.push({ |
| | | path: `/trade/index`, |
| | | query: { type: 'cryptos' } |
| | | }); |
| | | } |