Browse Source

修改首页数据

master
liaoxinyu 2 months ago
parent
commit
1e9e551be4
  1. 43
      src/views/home/index.vue

43
src/views/home/index.vue

@ -105,7 +105,7 @@
</div>
<!-- 寻找交易良机 -->
<div class="market_table" v-if="marketList[0]">
<div class="market_table" v-if="marketList[0]&&0">
<div style="font-size: 42px;font-weight: bold;">
{{ $t("homeNewText.hh1") }}
</div>
@ -127,6 +127,29 @@
<div style="margin-left: 17%;width: 8%;text-align: right;">{{ item.count }}</div>
</div>
</div>
<div class="market_table" v-if="marketListHe">
<div style="font-size: 42px;font-weight: bold;">
{{ $t("homeNewText.hh1") }}
</div>
<div style="color: #999;line-height: 60px;font-size: 18px;">{{ $t("homeNewText.hh2") }}</div>
<div class="market_tr" style="color: #999;line-height: 60px;">
<div>{{ $t("homeNewText.aa7") }}</div>
<div>{{ $t("homeNewText.bb1") }}</div>
<div>{{ $t("homeNewText.bb2") }}</div>
<div style="width: 25%;text-align: right;">{{ $t("homeNewText.bb3") }}</div>
</div>
<div v-for="(item, index) in marketListHe" :key="index" class="market_tr"
style="font-weight: bold;" v-if="item.symbol=='BTC'||item.symbol=='ETH'||item.symbol=='BNB'||item.symbol=='SOL'||item.symbol=='DOGE'">
<div>
<!-- <img class="icon" :src="item.coin_icon" alt=""> -->
{{ item.symbol }}
</div>
<div>{{ item.price }}</div>
<div :class="item.increase >= 0 ? 'increace' : 'decreace'">{{ item.increaseStr }}</div>
<div style="margin-left: 17%;width: 8%;text-align: right;">{{ item.vol }}</div>
</div>
</div>
<!-- 了解我们的产品 -->
<div class="title1 textcol">{{ $t("homeNewText.hh3") }}</div>
@ -315,7 +338,6 @@
</div>
</div>
<div class="section-block section-block-2" v-if="0">
<h1 style="text-align: center;">{{$t("homeNewText.aa5")}}</h1>
<div style="font-size: 20px;margin-bottom: 3rem;color: #6A6E74;text-align: center;">
@ -937,11 +959,13 @@
homeList: [],
iconList: [],
marketList: [],
marketListHe: [],
tab: "Optional",
searchTxt: "",
skro: new Skroll(),
collect: [],
ws: null,
ws1: null,
pcBannerList: [],
noticeList: [],
data: [99, 71, 78, 25, 36, 92],
@ -1091,6 +1115,7 @@
// socket
indexMarketList() {
const ws = new Socket(this.Globals.Server.Path.WS);
const ws1 = new Socket(this.Globals.Server.Path.WS1);
ws.on("open", () => {
this.ws = ws;
ws.send({
@ -1118,6 +1143,20 @@
});
}
});
ws1.on("open", () => {
this.ws1 = ws1;
ws1.send({
cmd: "sub",
msg: "swapMarketList",
});
});
ws1.on("message", (res) => {
// console.info(res)
let {data,msg,code,sub,type,status} = res;
if (sub == "swapMarketList") {
this.marketListHe = data[0].marketInfoList;
}
});
},
//

Loading…
Cancel
Save