|
|
|
@ -17,12 +17,19 @@ |
|
|
|
|
|
|
|
<view class="p-x-xs m-t-md"> |
|
|
|
<table class="w-max"> |
|
|
|
<thead v-if="heyue==0"> |
|
|
|
<!-- <thead v-if="heyue==0"> |
|
|
|
<tr class="fn-sm"> |
|
|
|
<th class="p-l-md p-y-xs fn-left">{{ $t("exchange.f7") }}</th> |
|
|
|
<th class="fn-left">{{ $t("exchange.f8") }}</th> |
|
|
|
<th class="p-r-md p-y-xs fn-right">{{ $t("exchange.f9") }}</th> |
|
|
|
</tr> |
|
|
|
</thead> --> |
|
|
|
<thead> |
|
|
|
<tr class="fn-sm"> |
|
|
|
<th class="p-l-md p-y-xs fn-left">{{ $t("exchange.f7") }}</th> |
|
|
|
<th class="fn-center">{{ $t("exchange.f8") }}</th> |
|
|
|
<th class="p-r-md p-y-xs fn-right">{{ $t("exchange.f9") }}</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<tr |
|
|
|
@ -33,15 +40,28 @@ |
|
|
|
v-show="isShow(item.pair_name)" |
|
|
|
@click="$emit('check-symbol', item)" |
|
|
|
> |
|
|
|
<td class="p-l-md p-y-md w-40"> |
|
|
|
<td class="p-l-md w-40" style="height: 50px;display: flex;align-items: center;"> |
|
|
|
<template v-if="parentItem.isCollect"> |
|
|
|
<img :src="item.coin_icon" width="20" style="margin-right: 2px;" /> |
|
|
|
<span class="color-light">{{ item.pair_name }}</span> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<img :src="item.coin_icon" width="20" style="margin-right: 2px;" v-if="heyue==0" /> |
|
|
|
<view v-for="items in Liste" :key="items.symbol" v-else> |
|
|
|
<img :src="items.icon" width="20" style="margin-right: 2px;" v-if="items.symbol==item.symbol" /> |
|
|
|
</view> |
|
|
|
<span class="color-light">{{ item.coin_name||item.symbol }}/{{ parentItem.coin_name }}</span> |
|
|
|
</template> |
|
|
|
</td> |
|
|
|
<td class="w-30 fn-center"> |
|
|
|
<template :class="item.increase < 0 ? 'color-sell' : 'color-buy'"> |
|
|
|
{{ item.price }} |
|
|
|
</template> |
|
|
|
</td> |
|
|
|
<td :class="item.increase < 0 ? 'color-sell' : 'color-buy'" class="p-r-md p-y-xs fn-right w-30"> |
|
|
|
{{ item.increaseStr }} |
|
|
|
</td> |
|
|
|
<!-- <td class="w-30 fn-center"> |
|
|
|
<template v-if="heyue==0" :class="item.increase < 0 ? 'color-sell' : 'color-buy'"> |
|
|
|
{{ item.price }} |
|
|
|
</template> |
|
|
|
@ -62,7 +82,7 @@ |
|
|
|
class="p-r-md p-y-xs fn-right" |
|
|
|
> |
|
|
|
{{ item.price }} |
|
|
|
</td> |
|
|
|
</td> --> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
@ -72,6 +92,7 @@ |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import Contract from "@/api/contract"; |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
marketList: { |
|
|
|
@ -134,6 +155,8 @@ export default { |
|
|
|
return { |
|
|
|
active: 0, |
|
|
|
filterText: "", |
|
|
|
imgList: [], |
|
|
|
Liste:[] |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -143,8 +166,28 @@ export default { |
|
|
|
-1 |
|
|
|
); |
|
|
|
}, |
|
|
|
getMarketList() { |
|
|
|
Contract.getMarketList().then((res) => { |
|
|
|
// 整理数据格式 |
|
|
|
this.imgList = res.data |
|
|
|
this.Liste = [] |
|
|
|
this.marketList[0].marketInfoList.map(item=>{ |
|
|
|
this.imgList[0].marketInfoList.map(items=>{ |
|
|
|
if(item.symbol==items.symbol){ |
|
|
|
this.Liste.push({ |
|
|
|
pair_name: item.pair_name, |
|
|
|
symbol: item.symbol, |
|
|
|
icon:items.icon |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getMarketList() |
|
|
|
}, |
|
|
|
created() {}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
|