Browse Source

修复合约最新价跳动

master
luyisha 2 years ago
parent
commit
6101265542
  1. 2
      src/components/CommonHeader.vue
  2. BIN
      src/favicon.ico
  3. 12
      src/views/contract/handicap.vue
  4. 2
      src/views/contract/index.vue

2
src/components/CommonHeader.vue

@ -595,7 +595,7 @@ header {
max-width: 20% !important; max-width: 20% !important;
} }
header .nav-link{ header .nav-link{
font-size: 18px !important; font-size: 14px !important;
} }
header nav a:hover { header nav a:hover {
color: #EABB71 !important; color: #EABB71 !important;

BIN
src/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

12
src/views/contract/handicap.vue

@ -200,8 +200,8 @@ export default {
} }
bus.$on('collapse', msg => { bus.$on('collapse', msg => {
// this.newPriceObj.price =this.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3); // this.newPriceObj.price =this.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3);
this.newPriceObj.price = msg.close; // this.newPriceObj.price = msg.close;
this.$emit("input", this.newPriceObj); // this.$emit("input", this.newPriceObj);
// console.log(this.newPriceObj.price, 'this.newPriceObj.price-----') // console.log(this.newPriceObj.price, 'this.newPriceObj.price-----')
}); });
}, },
@ -217,7 +217,9 @@ export default {
this.sellList = res.swapSellList; this.sellList = res.swapSellList;
this.buyList = res.swapBuyList; this.buyList = res.swapBuyList;
this.tradeList = res.swapTradeList; this.tradeList = res.swapTradeList;
// this.newPriceObj = this.tradeList[0]; if(this.tradeList.length>0){
this.newPriceObj = this.tradeList[0];
}
this.$emit("input", this.newPriceObj); this.$emit("input", this.newPriceObj);
}); });
}, },
@ -269,8 +271,8 @@ export default {
} else if (sub == this.msg.trade) { } else if (sub == this.msg.trade) {
this.tradeList.unshift(data); this.tradeList.unshift(data);
this.tradeList.pop(); this.tradeList.pop();
// this.newPriceObj = data; this.newPriceObj = data;
// this.$emit("input", this.newPriceObj); this.$emit("input", this.newPriceObj);
} else if (type == "ping" ||cmd == "ping") { } else if (type == "ping" ||cmd == "ping") {
this.ws.send({ this.ws.send({
cmd: "pong" cmd: "pong"

2
src/views/contract/index.vue

@ -107,7 +107,7 @@
<div class="title mb-1 text-secondary"> <div class="title mb-1 text-secondary">
24h {{ $t("contract.h9") }} 24h {{ $t("contract.h9") }}
<!-- {{ $t("contract.e2") }} --> <!-- {{ $t("contract.e2") }} -->
(USDT) <!-- (USDT) -->
</div> </div>
<div> <div>
{{ activeContract.vol }} {{ activeContract.vol }}

Loading…
Cancel
Save