<template>
	<view>
		<u-popup :show="showCompletion" round="20rpx" mode="center" bgColor="#ffffff" zIndex="10076">
			<view class="integral-popup color9">
				<view class="integral-header">
					<view class="integral-title">观看视频领积分</view>
					<image class="integral-background-image"
						src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/integral_bg.png"
						mode="widthFix" />
				</view>
				<view class="integral-content">
					<view class="integral-message">积分发放成功</view>
				</view>
			</view>
		</u-popup>
		<u-popup :show="showDuration" round="20rpx" mode="center" bgColor="#ffffff" zIndex="10076"
			@close="$emit('close-duration')">
			<view class="integral-popup color9">
				<view class="integral-header">
					<view class="integral-title">观看视频领积分</view>
					<image class="integral-background-image"
						src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/integral_bg.png"
						mode="widthFix" />
				</view>
				<view class="integral-content">
					<view class="integral-message">{{ integralMsg }}</view>
					<view class="integral-confirm-button" @click="$emit('close-duration')">确认</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
export default {
	name: 'LiveIntegralPanel',
	props: {
		showCompletion: { type: Boolean, default: false },
		showDuration: { type: Boolean, default: false },
		integralMsg: { type: String, default: '' }
	}
}
</script>

<style scoped lang="scss">
.integral-popup {
	min-width: 400rpx;
	max-width: 600rpx;
	display: flex;
	flex-direction: column;
	align-items: center;
	border-radius: 20rpx;
	overflow: hidden;

	.integral-header {
		width: 100%;
		position: relative;

		.integral-title {
			width: 100%;
			font-weight: 600;
			font-size: 40rpx;
			color: #ffffff;
			text-shadow: 0px 4rpx 8rpx rgba(255, 89, 2, 0.8);
			position: absolute;
			top: 50rpx;
			text-align: center;
		}

		.integral-background-image {
			width: 100%;
		}
	}

	.integral-content {
		padding: 20rpx;

		.integral-message {
			font-weight: 500;
			font-size: 32rpx;
			text-align: center;
		}

		.integral-confirm-button {
			font-size: 32rpx;
			margin-top: 20rpx;
			background: linear-gradient(270deg, #ff4702 0%, #fe6304 100%);
			color: #fff;
			text-align: center;
			padding: 18rpx 60rpx;
			border-radius: 10rpx;
			font-weight: 500;
		}
	}
}
</style>
