<template>
	<view class="onecontent flex-between">
		<view class="onecontentleft">
			现有{{bannervo.coupons}}人以免单
		</view>

		<view class="onecontentright flex-start">
			<view class="onecontentrightimage">
				<view class="onecontentrightimageabsolute">
					<u-swiper circular previousMargin='30' nextMargin="30" :list="bannervo.counponsInfo" keyName="logo"
						radius="14" height='28' bgColor='none' imgMode='aspectFit'></u-swiper>
				</view>
				
				<!-- <view class="onecontentrightimageabsolutetow">
					<u-swiper circular previousMargin="30" nextMargin="30" :list="bannervo.logo" keyName="coverImg"
						radius="14" height='28' bgColor='none' imgMode='aspectFit'></u-swiper>
				</view> -->
			</view>
			<view class="onecontentrighttext">
				<swiper class="swiper" circular :autoplay="true" :vertical='true' :interval="2000">
					<swiper-item class="swiperitem" v-for="(item,index) in bannervo.counponsInfo" :key="index">
						{{item.name}}已省{{item.money}}元钱
					</swiper-item>
				</swiper>
			</view>
		</view>
		<!-- 小内切圆 -->
		<view class="after"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isScroll: false,
				minCount: 0,
				fontColor: 'black'
			};
		},
		props: {
			bannervo: {
				type: Object,
				default () {
					return {
						coupons: '',
						logo: []
					}
				}
			},
			title: {
				type: String,
				default: '每日特价'
			},
			img: {
				type: String,
				default: ''
			},
		},
	};
</script>

<style scoped lang="scss">
	.onecontent {
		position: relative;
		margin-top: -30rpx;
		padding: 14rpx 28rpx 44rpx 28rpx;
		width: 100%;
		background: linear-gradient(92deg, #FCECAA 0%, #fff 100%);
		border-radius: 40rpx 0rpx 0rpx 0rpx;

		.onecontentleft {
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 24rpx;
			color: #333333;

			text {
				color: #FC851E;
			}
		}



		.onecontentright {
			font-family: Source Han Sans CN, Source Han Sans CN;
			font-weight: 400;
			font-size: 24rpx;
			color: #333333;


			.onecontentrightimage {
				width: 90rpx;
				position: relative;
				overflow: hidden;
				height: 28rpx;

				.onecontentrightimageabsolute {
					width: 100%;
					left: 0;
					top: 0;
					position: absolute;
					z-index: 9;
				}


				.onecontentrightimageabsolutetow {
					width: 100%;
					left: 14rpx;
					top: 0;
					position: absolute;
					z-index: 10;
				}

				// .onecontentrightswiper {
				// 	border: 50%;
				// 	width: 28rpx;
				// 	height: 28rpx;
				// 	background: red;
				// }
			}

			.onecontentrighttext {
				width: 232rpx;

				.swiper {
					height: 28rpx;
					// width: 232rpx;

					.swiperitem {
						width: 100rpx;
						font-family: Source Han Sans CN, Source Han Sans CN;
						font-weight: 400;
						font-size: 24rpx;
						color: #333333;
						overflow: hidden; //超出的文本隐藏
						text-overflow: ellipsis; //溢出用省略号显示
						white-space: nowrap; //溢出不换行
					}
				}
			}

		}

		.after {
			position: absolute;
			top: -40rpx;
			right: 0;
			width: 40rpx;
			height: 40rpx;
			line-height: 40rpx;
			text-align: center;
			background-image: radial-gradient(160rpx at 0px 0px, rgba(0, 0, 0, 0) 40rpx, #fff 40rpx);
		}
	}
</style>