From 836a56418f932086e4221cb6c5e6a56f1c0dfecf Mon Sep 17 00:00:00 2001
From: 李 <344137771@qq.com>
Date: Fri, 22 May 2026 15:07:30 +0800
Subject: [PATCH] 1
---
src/components/Transform/list-quotation/index.vue | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/components/Transform/list-quotation/index.vue b/src/components/Transform/list-quotation/index.vue
index fd62d42..fb2f09f 100644
--- a/src/components/Transform/list-quotation/index.vue
+++ b/src/components/Transform/list-quotation/index.vue
@@ -163,14 +163,24 @@
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' }
});
}
--
Gitblit v1.9.3