<template>
	<view class="popAgreement" >
		<PopManager :show="show" :type="type" @clickmask="handleMaskClick">
			<view class="mainView">
				<view class="p30p24">
					<view class="flex">
						<text></text>
						<image :src="imgfixUrls + 'merchant/close.png'" class="image23" @click="closePop"></image>
					</view>
					<view class="textC">
						<text class="color333333 font30">用户协议条款</text>
					</view>
					<scroll-view :scroll-y="true" class="scrollMain marginT36auto ">
						<rich-text :nodes="textInfo" class="font24 color999999">
							
						</rich-text>
					</scroll-view>
					<view class="submitButton marginT50auto textC " :style="{background:buttonColor}" @click="closePop">
						<text class="font28 colorW lineHeight80" >同意协议</text>
					</view>
				</view>
			</view>
		</PopManager>
	</view>
</template>

<script>
import PopManager from './PopManager';
export default {
	components: {
		PopManager
	},
	props: {
		show: {
			type: Boolean,
			default: false
		},
		buttonColor:{
			type: String,
			default: 'white'
		},
		textInfo:{
			type: String,
			default: ''
		}
	},
	data() {
		return {
			type: 'center',
			img:''
		};
	},
	mounted() {
		this.img = this.imgfixUrl;
	},
	methods: {
		handleMaskClick() {
			this.$emit('clickmask');
			console.info(this.show)
		},
		closePop(){
			this.$emit('clickmask');
		}
	}
};
</script>

<style>
.popAgreement {
	font-size: 0;
}
.mainView {
	width: 608upx;
	height: 971upx;
	background: rgba(255, 255, 255, 1);
	border-radius: 20upx;
}
.image23 {
	width: 23upx;
	height: 23upx;
}
.p30p24 {
	padding: 30upx 24upx;
}
.flex {
	display: flex;
	justify-content: space-between;
}
.textC {
	text-align: center;
}
.color333333{
	color: #333333;
}
.font30{
	font-size: 30upx;
}
.scrollMain{
	width:535upx;
	height:687upx;
}
.marginT36auto{
		margin: 36upx auto 0 auto;
}
.submitButton{
	width:460upx;
	height:80upx;
	border-radius:40upx;
}
.marginT50auto{
		margin: 50upx auto 0 auto;
}
.font28{
	font-size: 28upx;
}
.colorW {
	color: rgba(255, 255, 255, 1);
}
.lineHeight80 {
	line-height: 80upx;
}
.font24{
	font-size: 24upx;
}
.color999999{
	color: #999999;
}
.pB30{
	padding-bottom: 30upx;
}
</style>
