<template>
	<view>
		<view class="banner">
			<swiper class="box" autoplay circular>
				<swiper-item v-for="(item,index) in banner" :key="item.id" @click="go_link(item.jumpURL)">
					<view class="item">
						<view class="img">
							<image :src="item.imgURL"></image>
						</view>
						<view class="title">
							<view>{{item.title}}</view>
							<view class="num">
								— <text> {{index+1}} </text> —
							</view>
						</view>
					</view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	import {goToLink} from "@/common/common.js"
	export default {
		name:"t-i-banner-2",
		props: [
			"banner",
			"mine_code"
		],
		data() {
			return {
				
			}
		},
		methods:{
			go_link(link){
				console.log(link)
				
				let item = {
					link:link
				}
				
				goToLink(item,this.mine_code)
			}
		}
	}
</script>

<style lang="scss">
	.banner{
		margin-top: -60rpx;
		.box{
			width: 750rpx;
			height: 620rpx;
			
			.item{
				width: 750rpx;
				.img{
					text-align: center;
					image{
						width: 750rpx;
						height: 485rpx;
						
					}
				}
				.title{
					box-sizing: border-box;
					padding: 0 25rpx;
					width: 750rpx;
					height: 130rpx;
					
					line-height: 1.5;
					font-size: 32rpx;
					
					position: relative;
					
					.num{
						position: absolute;
						bottom: 35rpx;
						right: 25rpx;
						color: #ACB0AC;
						text{
							color: #23A2EE;
						}
					}
				}
			}
		}
	}
</style>
