From 9495998e97dd04d4bdfcf32dfd4d49cd45c1fe32 Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Thu, 11 Sep 2025 11:05:12 +0800
Subject: [PATCH] 1
---
src/views/trade/index.vue | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/views/trade/index.vue b/src/views/trade/index.vue
index 7d4f090..9201c55 100644
--- a/src/views/trade/index.vue
+++ b/src/views/trade/index.vue
@@ -13,7 +13,6 @@
<ContractHeader :symbol="symbol" :range="range" :selectIndex="selectIndex" :symbolName="symbolName"
:balance="userInfo.balance" @tab="onTopTab" @update-coin="onUpdate">
</ContractHeader>
-
<!-- <Head :symbolObj="symbolObj"></Head> -->
<div :key="symbol" class="pb-108 no_touch">
@@ -305,10 +304,10 @@
}
},
async created() {
-
if (this.$route.query.type) {
this.type = this.$route.query.type
}
+ this.keyIndex += 1
await this.SET_COIN_LIST(this.type)
_getBalance().then(data => { // 获取用户余额
this.$store.commit('user/SET_USERINFO', { balance: data.money })
@@ -317,8 +316,10 @@
})
},
methods: {
+
...mapActions('home', [SET_COIN_LIST]),
onUpdate(symbol) { // 更新
+ this.keyIndex += 1
this.currentType = 'long'
this.symbol = symbol
this.closeSocket()
@@ -492,6 +493,8 @@
}
},
startDeepSocket() {
+ this.asks = []
+ this.bids = []
this.sockets.deep = new WebSocket(`${WS_URL}/3/${this.symbol}`)
this.sockets.deep.onmessage = (evt) => {
const { data } = evt
--
Gitblit v1.9.3