Browse Source

修改图片

master
liaoxinyu 2 years ago
parent
commit
8673ff92e0
  1. 41
      src/views/home/index.vue

41
src/views/home/index.vue

@ -106,7 +106,9 @@
<div v-if="marketList[0]" style="width: 550px;display: flex;flex-wrap: wrap;justify-content: space-between;"> <div v-if="marketList[0]" style="width: 550px;display: flex;flex-wrap: wrap;justify-content: space-between;">
<div v-for="(item, index) in marketList[0].marketInfoList.slice(0,6)" :key="index" <div v-for="(item, index) in marketList[0].marketInfoList.slice(0,6)" :key="index"
style="width: 170px;box-shadow: 0px 0px 6px 0px rgba(0, 38, 161, 0.16);border-radius: 10px;margin-bottom: 20px;padding: 15px;"> style="width: 170px;box-shadow: 0px 0px 6px 0px rgba(0, 38, 161, 0.16);border-radius: 10px;margin-bottom: 20px;padding: 15px;">
<div><img style="width: 40px;height: 40px;" :src="item.coin_icon" alt=""></div> <div v-for="(items,index) in imgList" :key="index">
<img style="width: 40px;height: 40px;" :src="items.coin_icon" alt="" v-if="items.coin_name==item.coin_name">
</div>
<div style="margin-top: 10px;">{{ item.coin_name }}</div> <div style="margin-top: 10px;">{{ item.coin_name }}</div>
<div style="margin-bottom: 20px;margin-top: 5px;font-size: 14px;" <div style="margin-bottom: 20px;margin-top: 5px;font-size: 14px;"
:class="item.increase * 1 >= 0 ? 'increaceAj' : 'decreaceAj'">$ {{ item.price || item.close }} USD</div> :class="item.increase * 1 >= 0 ? 'increaceAj' : 'decreaceAj'">$ {{ item.price || item.close }} USD</div>
@ -192,8 +194,8 @@
<div class="started1"> <div class="started1">
<div class="started_div" style="margin-top: 160px;margin-bottom: 0px;">{{ $t("homeNewText.hh19") }}</div> <div class="started_div" style="margin-top: 160px;margin-bottom: 0px;">{{ $t("homeNewText.hh19") }}</div>
<div class="started_swiper"> <div class="started_swiper">
<swiper :options="swipere" v-if="marketList[0]"> <swiper :options="swipere">
<swiper-slide v-for="(item, index) in marketList[0].marketInfoList.slice(0,10)" :key="index"> <swiper-slide v-for="(item,index) in imgList.slice(0,10)" :key="index">
<div class="InfoList"> <div class="InfoList">
<div style="font-weight: bold;width: 100px;"> <div style="font-weight: bold;width: 100px;">
<img :src="item.coin_icon" width="37" height="37"> <img :src="item.coin_icon" width="37" height="37">
@ -204,12 +206,11 @@
</swiper> </swiper>
</div> </div>
<div class="started_swiper"> <div class="started_swiper">
<swiper :options="swipere1" v-if="marketList[0]"> <swiper :options="swipere1">
<swiper-slide v-for="(item, index) in marketList[0].marketInfoList.slice(3,12)" :key="index"> <swiper-slide v-for="(item,index) in imgList.slice(3,12)" :key="index">
<div class="InfoList"> <div class="InfoList">
<div style="font-weight: bold;width: 100px;"> <div style="font-weight: bold;width: 100px;">
<img :src="item.coin_icon" width="37" height="37" v-if="item.coin_name !== 'TRX'"> <img :src="item.coin_icon" width="37" height="37">
<img src="https://seee.ewmcoin.com/storage/images/trx.png" width="37" height="37" v-else>
{{ item.coin_name }} {{ item.coin_name }}
</div> </div>
</div> </div>
@ -217,12 +218,11 @@
</swiper> </swiper>
</div> </div>
<div class="started_swiper"> <div class="started_swiper">
<swiper :options="swipere2" v-if="marketList[0]"> <swiper :options="swipere2">
<swiper-slide v-for="(item, index) in marketList[0].marketInfoList.slice(6,15)" :key="index"> <swiper-slide v-for="(item,index) in imgList.slice(6,15)" :key="index">
<div class="InfoList"> <div class="InfoList">
<div style="font-weight: bold;width: 100px;"> <div style="font-weight: bold;width: 100px;">
<img :src="item.coin_icon" width="37" height="37" v-if="item.coin_name !== 'TRX'"> <img :src="item.coin_icon" width="37" height="37">
<img src="https://seee.ewmcoin.com/storage/images/trx.png" width="37" height="37" v-else>
{{ item.coin_name }} {{ item.coin_name }}
</div> </div>
</div> </div>
@ -230,12 +230,11 @@
</swiper> </swiper>
</div> </div>
<div class="started_swiper"> <div class="started_swiper">
<swiper :options="swipere3" v-if="marketList[0]"> <swiper :options="swipere3">
<swiper-slide v-for="(item, index) in marketList[0].marketInfoList.slice(8,18)" :key="index"> <swiper-slide v-for="(item,index) in imgList.slice(8,18)" :key="index">
<div class="InfoList"> <div class="InfoList">
<div style="font-weight: bold;width: 100px;"> <div style="font-weight: bold;width: 100px;">
<img :src="item.coin_icon" width="37" height="37" v-if="item.coin_name !== 'TRX'"> <img :src="item.coin_icon" width="37" height="37">
<img src="https://seee.ewmcoin.com/storage/images/trx.png" width="37" height="37" v-else>
{{ item.coin_name }} {{ item.coin_name }}
</div> </div>
</div> </div>
@ -1048,7 +1047,8 @@
line: '', line: '',
guideList: [], guideList: [],
cid: '', cid: '',
helpList: [] helpList: [],
imgList:[]
}; };
}, },
methods: { methods: {
@ -1106,6 +1106,15 @@
this.iconList = res.iconList; this.iconList = res.iconList;
this.pcBannerList = res.pcBannerList this.pcBannerList = res.pcBannerList
this.tab = this.marketList[0].coin_name; this.tab = this.marketList[0].coin_name;
this.imgList = [];
this.marketList[0].marketInfoList.map(item=>{
this.imgList.push({
coin_name: item.coin_name,
coin_icon:item.coin_icon
})
})
// setTimeout(() => { // setTimeout(() => {
// this.skroll(); // this.skroll();
// }, 100); // }, 100);

Loading…
Cancel
Save