| | |
| | | <h3 class="small justify-center" text="2xl">{{ item }}</h3> |
| | | </el-carousel-item> --> |
| | | <!-- </el-carousel> --> |
| | | <el-carousel :interval="5000" arrow="always" indicator-position="none"> |
| | | <el-carousel :interval="5000" arrow="always"> |
| | | <el-carousel-item v-for="(item, index) in imgLists" :key="index"> |
| | | <div class="img-box"> |
| | | <img |
| | | v-for="(_item, _index) in imgLists[index]" |
| | | :key="_index" |
| | | style="margin-right: 20px; border-radius: 12px" |
| | | width="350" |
| | | height="160" |
| | | :src="_item.image" |
| | | width="300" |
| | | height="173" |
| | | :src="item[0].image" |
| | | /> |
| | | <img |
| | | style="margin-right: 20px; border-radius: 12px" |
| | | width="300" |
| | | height="173" |
| | | :src="item[1].image" |
| | | /> |
| | | <img |
| | | style="margin-right: 20px; border-radius: 12px" |
| | | width="300" |
| | | height="173" |
| | | :src="item[2].image" |
| | | /> |
| | | </div> |
| | | </el-carousel-item> |
| | |
| | | // language = this.$i18n.locale; |
| | | // } |
| | | Axios.getBanner({ model: "top" }).then((res) => { |
| | | this.imgLists[0] = res.data; |
| | | const data = res.data; |
| | | let groupedArray = [[], []]; |
| | | |
| | | for (let i = 0; i < data.length; i++) { |
| | | if (groupedArray[0].length >= 3) { |
| | | groupedArray[1].push(data[i]); |
| | | } else { |
| | | groupedArray[0].push(data[i]); |
| | | } |
| | | } |
| | | this.imgLists = groupedArray; |
| | | }); |
| | | }, |
| | | // 获取所有symbol |