|
|
@ -129,25 +129,27 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="main_title"> |
|
|
|
<div class="main_title"> |
|
|
|
<img src="@/assets/img/screen/t_3.png" alt=""> |
|
|
|
<img src="@/assets/img/screen/t_3.png" alt=""> |
|
|
|
加密货币行情 |
|
|
|
中国GDP年率报告 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="main_table"> |
|
|
|
<div class="main_table"> |
|
|
|
<table> |
|
|
|
<table> |
|
|
|
<thead> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<th width="30%">币种</th> |
|
|
|
<th width="50%">时间</th> |
|
|
|
<th width="25%">最新价</th> |
|
|
|
<th width="50%">年率</th> |
|
|
|
<th width="25%">24H成交量</th> |
|
|
|
|
|
|
|
<th>24H涨跌</th> |
|
|
|
|
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
</thead> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_table" ref="gdpList" style="max-height: 260px;margin-top: 0;overflow: auto;"> |
|
|
|
|
|
|
|
<table> |
|
|
|
<tbody> |
|
|
|
<tbody> |
|
|
|
<tr v-for="(item, i) in cryptoList" :key="i"> |
|
|
|
<template v-for="(item, i) in gdps"> |
|
|
|
<td>{{ item.currencyPair }}</td> |
|
|
|
<tr v-if="item.value != '0'" :key="i"> |
|
|
|
<td>${{ item.amount }}</td> |
|
|
|
<td width="50%">{{ item.date_index }}</td> |
|
|
|
<td>{{ parseInt(item.total) }}M</td> |
|
|
|
<td width="50%">${{ item.value }}</td> |
|
|
|
<td><p :class="['percent', {fall: item.percent < 0}]">{{ (item.percent * 100).toFixed(2) }}%</p></td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
|
|
|
|
</template> |
|
|
|
</tbody> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -281,15 +283,22 @@ export default { |
|
|
|
stompClientMarket: null, |
|
|
|
stompClientMarket: null, |
|
|
|
stompClient: null, |
|
|
|
stompClient: null, |
|
|
|
goodsSell: [], |
|
|
|
goodsSell: [], |
|
|
|
cryptoList: [] |
|
|
|
cryptoList: [], |
|
|
|
|
|
|
|
gdps: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.connect() |
|
|
|
this.getList() |
|
|
|
this.renderChart() |
|
|
|
this.renderChart() |
|
|
|
this.renderMap() |
|
|
|
this.renderMap() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
// 中国gdp |
|
|
|
|
|
|
|
getList() { |
|
|
|
|
|
|
|
this.$get(`${this.api.visualPreview}?tableName=hg_zg_gm_zhongguogdpnianlvbaogao&tableId=17`).then(({ comment, data }) => { |
|
|
|
|
|
|
|
this.gdps = data |
|
|
|
|
|
|
|
}).catch(res => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取加密货币实时行情 |
|
|
|
// 获取加密货币实时行情 |
|
|
|
getCrypto() { |
|
|
|
getCrypto() { |
|
|
|
this.$get(`${this.api.getTopList}`).then(res => { |
|
|
|
this.$get(`${this.api.getTopList}`).then(res => { |
|
|
@ -1215,9 +1224,13 @@ export default { |
|
|
|
// 表格滚动效果 |
|
|
|
// 表格滚动效果 |
|
|
|
scrollTable() { |
|
|
|
scrollTable() { |
|
|
|
const dom = this.$refs.tableWrap |
|
|
|
const dom = this.$refs.tableWrap |
|
|
|
|
|
|
|
const dom1 = this.$refs.gdpList |
|
|
|
setInterval(() => { |
|
|
|
setInterval(() => { |
|
|
|
dom.scrollTop += 1 |
|
|
|
dom.scrollTop += 1 |
|
|
|
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0 |
|
|
|
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dom1.scrollTop += 1 |
|
|
|
|
|
|
|
if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0 |
|
|
|
}, 30) |
|
|
|
}, 30) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|