<template>
	<view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
		<cus-header title='角色模板'></cus-header>
		<div class="title">选择角色模板<span>*</span></div>
		<div class="list">
			<div class="pre" v-for="(item,index) in list" :key="index" :class="{'active':midx===index}" @tap="changeModel(item,index)">
				<image src="@/static/selected_dh.png" v-if="midx===index"></image>
				{{item}}
			</div>
		</div>
		<div class="adffcacjc">
			<image src="@/static/avatar_default.png"></image>
			<p>{{'湾湾小何'}}</p>
		</div>
		<div class="desc">{{'你是一个充满活力与好奇心的年轻。以性格开朗乐观，对生活充满热情。你喜欢在公园等自然环境中放松自己，思考人生。你很善于观察，总能发现一些别人忽略的小美好。你和我在公园偶然相遇，之后我们时常一起在公园漫步、聊天，分享生活中的喜怒哀乐。你总是能给我带来积极的能量和独特的见解。'}}</div>
		<div class="zt_btn" @tap="confirm">确认选择</div>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				midx:0,
				list:['湾湾小何','星际游子','英语老师','好奇男孩','汪汪队长']
			}
		},
		methods:{
			changeModel(item,index){
				this.midx = index;
			},
			confirm(){
				this.getOpenerEventChannel().emit('selectRoleModel', {
					
				})
				uni.navigateBack();
			}
		}
	}
</script>

<style scoped lang="less">
	.page{
		width: 100%;
		background: #FFFFFF;
		padding: 0 30rpx 30rpx;
		box-sizing: border-box;
		overflow: hidden;
		.title{
			font-family: PingFang-SC, PingFang-SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #111111;
			line-height: 32rpx;
			margin-top: 30rpx;
			span{
				color: #F31616;
			}
		}
		
		.list{
			width: 100%;
			margin-top: 12rpx;
			display: flex;
			flex-wrap: wrap;
			margin-left: -10rpx;
			.pre{
				margin-top: 20rpx;
				margin-left: 15rpx;
				width: calc(100% / 3 - 21rpx);
				height: 80rpx;
				background: #FFFFFF;
				border-radius: 16rpx;
				border: 1rpx solid #C7C7C7;
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #333333;
				line-height: 80rpx;
				text-align: center;
				position: relative;
				&.active{
					background: #D9F159;
					border: 1rpx solid #D9F159;
					font-weight: bold;
					color: #111111;
				}
				image{
					width: 48rpx;
					height: 48rpx;
					position: absolute;
					right: 0;
					bottom: 0;
					z-index: 22;
				}
			}
		}
		
		.adffcacjc image{
			width: 240rpx;
			height: 240rpx;
			margin-top: 95rpx;
		}
		p{
			font-family: PingFang-SC, PingFang-SC;
			font-weight: bold;
			font-size: 48rpx;
			color: #111111;
			line-height: 67rpx;
			text-align: center;
			margin-top: 24rpx;
		}
		.desc{
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 26rpx;
			color: #7C8592;
			line-height: 37rpx;
			margin-top: 36rpx;
		}
		.zt_btn{
			margin-top: 285rpx;
		}
	}
</style>