<template>
	<view>
		<view class="tui-rolling-view">
			<view class="tui-rolling-news">
				<text class="tui-roll-label">公告：</text>
				<swiper vertical autoplay circular interval="3500" class="tui-swiper">
					<swiper-item v-for="(item,index) in list" :key="index" class="tui-swiper-item">
						<view class="tui-news-item" @tap='detail(item)'>
							<text class="news-dot"></text>
							{{item.title}}
						</view>
					</swiper-item>
				</swiper>
				<view class="tui-roll-more" @tap='newsList(item)'>
					更多<text class="iconfont icon-xiayibu"></text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		name:'address',
		props:{
			list:{
				type:Array
			}
		},
		data() {
			return{
				
			}
		},
		created(){
			
		},
		computed: {
	
		},
		methods:{
			detail(item){// 跳转公告详情
				this.$api.navigateTo(`/pages/service/news-detailes?id=${item.id}`)
			},
			newsList(){// 公告列表
				this.$api.navigateTo('/pages/service/news-list')
			},
			swiperChange(e) {//轮播图切换
				const index = e.detail.current
				this.current = index
			},
			NavToDetailPage(floor) {//跳转
				this.$api.FlooryNavigateTo(floor)
			}
		}
	}
</script>

<style lang="scss">
	.tui-rolling-view{
		width: 100%;
		height: 88rpx;
		background-color: #F7F7F7;
		box-sizing: border-box;
		padding: 24rpx 24rpx 0 24rpx;
	}
	.tui-rolling-news {
		width: 100%;
		padding: 0 20rpx;
		border-radius: 8rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-wrap: nowrap;
		line-height: 56rpx;
		background: url('https://static.caimei365.com/app/img/bg/icon-newsbg@2x.png') no-repeat;
		background-size: cover;
		.tui-roll-label{
			font-weight: bold;
			font-size: $font-size-26;
			color: #E15616;
		}
		.tui-roll-more{
			font-size: $font-size-24;
			color: #666666;
			.icon-xiayibu{
				font-size: $font-size-22;
			}
		}
	}
	
	.tui-swiper {
		font-size: 28rpx;
		height: 50rpx;
		flex: 1;
	}
	
	.tui-swiper-item {
		display: flex;
		align-items: center
	}
	
	.tui-news-item {
		width: 480rpx;
		line-height: 28rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		font-size: $font-size-24;
		color: #666666;
		.news-dot{
			display: inline-block;
			width: 10rpx;
			height: 10rpx;
			background-color: #999999;
			border-radius: 50%;
			margin-right: 8rpx;
			float: left;
			margin-top: 10rpx;
		}
	}
	
</style>
