From 2eef7e881d02d05bd0e1237a8456466f0c9afbce Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Tue, 08 Jul 2025 19:07:15 +0800
Subject: [PATCH] style
---
src/views/cryptos/PerpetualContract/index.vue | 42 ++++++++++++++++++++++--------------------
1 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/src/views/cryptos/PerpetualContract/index.vue b/src/views/cryptos/PerpetualContract/index.vue
index c70bf4f..86f95b1 100644
--- a/src/views/cryptos/PerpetualContract/index.vue
+++ b/src/views/cryptos/PerpetualContract/index.vue
@@ -16,7 +16,7 @@
<p class="first-line red">{{ formatMoney(chartData?.close) }}</p>
<p class="second-line">
<span class="red">{{ chartData?.netChange }}</span>
- <span class="red">{{ `${chartData?.change_ratio}%` }}</span>
+ <span class="red">{{ `${chartData?.change_ratio_str}%` }}</span>
</p>
</div>
<div @click="handleClickShowMore()" class="line-r">
@@ -35,7 +35,7 @@
<p class="first-line red">{{ formatMoney(chartData?.close) }}</p>
<p class="second-line">
<span class="red">{{ chartData?.netChange }}</span>
- <span class="red">{{ `${chartData?.change_ratio}%` }}</span>
+ <span class="red">{{ `${chartData?.change_ratio_str}%` }}</span>
</p>
</div>
<div class="flex-r">
@@ -104,7 +104,7 @@
<p class="first-line red">{{ formatMoney(chartData?.close) }}</p>
<p class="second-line">
<span class="red">{{ chartData?.netChange }}</span>
- <span class="red">{{ `${chartData?.change_ratio}%` }}</span>
+ <span class="red">{{ `${chartData?.change_ratio_str}%` }}</span>
</p>
</div>
<div @click="handleClickShowMore()" class="line-r">
@@ -123,7 +123,7 @@
<p class="first-line red">{{ formatMoney(chartData?.close) }}</p>
<p class="second-line">
<span class="red">{{ chartData?.netChange }}</span>
- <span class="red">{{ `${chartData?.change_ratio}%` }}</span>
+ <span class="red">{{ `${chartData?.change_ratio_str}%` }}</span>
</p>
</div>
<div class="flex-r">
@@ -372,7 +372,7 @@
methods: {
...mapActions('home', [SET_COIN_LIST]),
onUpdate(symbol) { // 更新
- debugger
+ // debugger
this.currentType = 'long'
this.closeSocket()
// this.clearTimer()
@@ -489,10 +489,11 @@
})
},
handleQoutes(data) {
+ // console.log('handleQoutes: ', data);
if (data && data.length) {
const cur = data[0]
this.price = cur.close
- this.range = cur.change_ratio + ''
+ this.range = cur.changeRatioStr + ''
this.quote = cur
this.updateKey++
}
@@ -580,7 +581,7 @@
// }, 3000);
// })
}
- initFun()
+ // initFun()
}
if (type === 'close' || !type) {
let initFunTimer = null;
@@ -591,14 +592,14 @@
clearTimeout(initFunTimer)
initFunTimer = null
}).catch(err => {
- initFunTimer = setTimeout(() => {
- initFun()
- }, 3000);
+ // initFunTimer = setTimeout(() => {
+ // initFun()
+ // }, 3000);
})
}
- initFunTimer = setTimeout(() => {
- initFun()
- }, 600);
+ // initFunTimer = setTimeout(() => {
+ // initFun()
+ // }, 600);
}
if (type === 'futrue' || !type) {
_futrueOrderInit(symbol).then(data => {
@@ -686,17 +687,18 @@
this.closeSocket()
this.clearTimer()
- this.symbol = symbol
- this.fetchQoutes(symbol)
- this.fetchDeepData(symbol)
- this.initParam(symbol) // 'open'
- this.clearTimer()
+ const _symbol = symbol || this.symbol
+ console.log('init: ',this.symbol, symbol)
+ this.fetchQoutes(_symbol)
+ this.fetchDeepData(_symbol)
+ this.initParam(_symbol) // 'open'
+ // this.clearTimer()
//if (this.curTab === 'fetchOrderListCur') {
if (this.curTab === 'fetchOrderListHold') {
//this.fetchOrderListCur(symbol)
- this.fetchOrderListHold(symbol)
+ this.fetchOrderListHold(_symbol)
} else {
- this.fetchFutrueHoldList(symbol)
+ this.fetchFutrueHoldList(_symbol)
}
},
--
Gitblit v1.9.3