<template>
	<view class="page" :style="{height:height}">

		<view :style="{marginTop:'24rpx'}">
			<scroll-view scroll-y class="scroll-Y">
				<view class="flex-col outView select">
					<view class="flex-row justify-between">
						<text class="title">规则标题</text>
						<u-icon name="checkbox-mark" color="#666" size="24"></u-icon>
					</view>
					<view class="flex-row justify-between  awardView">
						<text>注册：</text>
						<view class="flex-row  award ">
							<text class="awardItem">现金：12元</text>
							<text class="awardItem">比例：10%</text>
						</view>
					</view>
				</view>

				<view class="flex-col outView">
					<view class="flex-row justify-between">
						<text class="title">规则标题</text>
						<u-icon name="checkbox-mark" color="#666" size="24"></u-icon>
					</view>
					<view class="flex-row justify-between  awardView">
						<text>注册：</text>
						<view class="flex-row  award ">
							<text class="awardItem">现金：12元</text>
						</view>
					</view>
				</view>

				<view class="flex-col outView">
					<view class="flex-row justify-between">
						<text class="title">规则标题</text>
						<u-icon name="checkbox-mark" color="#666" size="24"></u-icon>
					</view>
					<view class="flex-row justify-between  awardView">
						<text>优惠券：</text>
						<view class="flex-col  award ">
							<text>数量：100张</text>
							<text>有效期：2024-01-01 至 2024-01-30</text>
						</view>
					</view>
				</view>
				<view class="flex-col outView select">
					<view class="flex-row justify-between">
						<text class="title">规则标题</text>
						<u-icon name="checkbox-mark" color="#666" size="24"></u-icon>
					</view>
					<view class="flex-row justify-between  awardView">
						<text>优惠券：</text>
						<view class="flex-col  award ">
							<text>数量：100张</text>
							<text>有效期：2024-01-01 至 2024-01-30</text>
						</view>
					</view>
				</view>
				<view class="flex-col outView">
					<view class="flex-row justify-between">
						<text class="title">规则标题</text>
						<u-icon name="checkbox-mark" color="#666" size="24"></u-icon>
					</view>
					<view class="flex-row justify-between  awardView">
						<text>优惠券：</text>
						<view class="flex-col  award ">
							<text>数量：100张</text>
							<text>有效期：2024-01-01 至 2024-01-30</text>
						</view>
					</view>
				</view>
				<view class="flex-col outView select">
					<view class="flex-row justify-between">
						<text class="title">规则标题</text>
						<u-icon name="checkbox-mark" color="#666" size="24"></u-icon>
					</view>
					<view class="flex-row justify-between  awardView">
						<text>优惠券：</text>
						<view class="flex-col  award ">
							<text>数量：100张</text>
							<text>有效期：2024-01-01 至 2024-01-30</text>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
		<view class="confirmButton" @click="createQrCode">
			<text>生成二维码</text>
		</view>

		<uni-popup ref="createQrCodePopup" type="center">
			<view class="createQrCodePopup">
				<view class="flex-row justify-center">
					<text class="popupTitle">拓客二维码</text>
				</view>
				<view class="xoIcon" @click="closePopup">
					<u-icon name="close-circle" color="#666" size="24"></u-icon>
				</view>
				<view class="flex-row justify-center">
					<uv-qrcode ref="qrcode" size="540rpx" :value="qrcodeUrl" :options="options"></uv-qrcode>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		props:{
			height: {
				type: String,
				default () {
					return ''
				}
			},
		},
		data() {
			return {
				qrcodeUrl:this.$xcxUrl,
				options: {
					// 指定二维码前景，一般可在中间放logo
					foregroundImagePadding:2,
					foregroundImageBorderRadius:5,
					foregroundImageSrc: '/static/logo.png'
				},
			}
		},
		onLoad() {

		},
		methods: {
			createQrCode(){
				this.$refs.createQrCodePopup.open()
			},
			closePopup(){
				this.$refs.createQrCodePopup.close()
			},
		}
	}
</script>

<style scoped lang="scss">
	@import './index.rpx.css';
</style>
