<template>
	<view class="u-p-30">
		<view class="box" v-if="config1.open_try">
			<view class="color-000 font-bold u-font-40">
				体验模式
			</view>
			<view class="u-flex u-m-t-40">
				<view class="u-relative">
					<view class="line-b u-relative u-font-48 font-bold">上传 5 张照片</view>
					<view class="u-absolute u-m-t-20 color-999" style="top: 100%;">与本人的相似程度约为
						专家模式的70%</view>
				</view>
				<view class="u-m-l-60 u-relative">
					<view class="line-b u-relative u-font-48 font-bold">等待时间长</view>
					<view class="u-absolute u-m-t-20 color-999" style="top: 100%;">
						排队人数较多</view>
				</view>
			</view>
			<view class="u-flex" style="margin-top: 180rpx;">
				<view class="u-relative">
					<view class="line-b u-relative u-font-48 font-bold">模板使用受限</view>
					<view class="u-absolute u-m-t-20 color-999" style="top: 100%;">仅赠送都市证件照模板部分模板不可用</view>
				</view>
			</view>
			<view class="u-flex u-row-right" style="margin-top: 100rpx;">
				<view class="u-relative"  >
					<view class="zhekou u-absolute">
						<text :class="{'line-th':!userInfo.tried}">￥{{config1.trial_model_train_price/100}}</text><text>首次免费</text>
					</view>
					<my-button type="cancel" @click="toFree"> <text>马上生成</text></my-button>
				</view>
			</view>
		</view>
		<view class="box u-m-t-20 u-relative">
			<view class="tuijian">
				推荐
			</view>
			<view class="u-flex">
				<view class="color-000 font-bold u-font-40">
					专家模式
				</view>
				<view class="pro u-m-l-20">
					<view>Pro</view>
				</view>
			</view>

			<view class="u-flex u-m-t-40">
				<view class="u-relative">
					<view class="line-b u-relative u-font-48 font-bold">更像更美</view>
					<view class="u-absolute u-m-t-20 color-999 u-line-1" style="top: 100%;">上传 10-20 张照片</view>
				</view>
				<view class="u-m-l-60 u-relative">
					<view class="line-b u-relative u-font-48 font-bold">排队时间短</view>
					<view class="u-absolute u-m-t-20 color-999" style="top: 100%;">
						VIP专属通道</view>
				</view>
			</view>
			<view class="u-flex" style="margin-top: 100rpx;">
				<view class="" style="color: rgb(239,176,84);">包含以下权益:</view>
			</view>
			<view class="u-flex u-m-t-40">
				<view class="u-relative">
					<view class="line-b u-relative font-bold">
						<text class="u-font-48 ">30+ </text>
						<text class="u-m-l-10">模板</text>
					</view>
					<view class="u-absolute u-m-t-20 color-999 u-line-1" style="top: 100%;">价值￥40</view>
				</view>
				<view class="u-m-l-60 u-relative">
					<view class="line-b u-relative  font-bold">
						<image src="/static/zuan.png" style="width: 40rpx;height: 30rpx;" mode=""></image>
						<text class="u-font-48">10</text>
						<text class="u-m-l-10">赠送</text>
					</view>
					<view class="u-absolute u-m-t-20 color-999 u-line-1" style="top: 100%;">
						可解锁付费模板</view>
				</view>
				<view class="u-relative u-m-l-60">
					<view class="line-b u-relative font-bold">
						<text class="u-font-48 ">1</text>
						<text class="u-m-l-10">次重置</text>
					</view>
					<view class="u-absolute u-m-t-20 color-999 u-line-1" style="top: 100%;">可重置数字分身</view>
				</view>
			</view>
			<view>
				<image src="@/me/static/ymf/1b3d78fa5f92af069751ea64d493c0d85050b1e03cc5b-tPC378.png" mode=""></image>
				<image src="@/me/static/ymf/390e926273eea85c894e613d42c9931ee2cd1f0a200fd-ApyNVV.png" mode=""></image>
				<image src="@/me/static/ymf/79cbb0e34c24915f1883feaa3cf3179b0a1ceb1362a18-unU6xQ.png" mode=""></image>
				<image src="@/me/static/ymf/cb319b604e49b816971b708b1231321318e0023610d8c-I24hXU.jpg" mode=""></image>
				<image src="@/me/static/ymf/cf2d172a6da494b2e577f699254a780907b7c222246d7-ehahn1.png" mode=""></image>
				<image src="@/me/static/ymf/eaae3095c9e433fb8a015aaebbe52047009dd863ff2b9-igSItK.png" mode=""></image>
				<image src="@/me/static/ymf/f3c60c6f31c74bdf38ba2d8993bcb443ab9bc335cc875-xfx4CJ.png" mode=""></image>
				<image src="@/me/static/ymf/c93b4cc9363d52cba140f7239516344ece9388141079a4-do8mFc.png" mode=""></image>
				<image src="@/me/static/ymf/031da1e7f043de5d5e1ee355994a93e5ec983aca44dc-sZf0Vl_fw1200.jpg" mode=""></image>
				<image src="@/me/static/ymf/c4e6c5023b94de32df2f51d9ebd633790cc6125a88e4-TIyAcR_fw1200.jpg" mode=""></image>
				<image src="@/me/static/ymf/f7da7a8ca57f9f0d56bbb3d7be1d1c86f96304ce4b3a-iVbD8U_fw1200.jpg" mode=""></image>
				<image src="@/me/static/ymf/2e521eee5a8c80ea6879028ee866c5d0531bc4f1d5e48-Bh95lN_fw1200.jpg" mode=""></image>
				<image src="@/me/static/ymf/38cf4e97e52b50be9dcdcdc1352c497e1acc9266cd52-aUOrxn_fw1200.webp" mode=""></image>
				<image src="@/me/static/ymf/73170e6a596b72538dbe743b06ef8b96e4885aff5b4c3-MsouS7_fw1200.jpg" mode=""></image>
				<image src="@/me/static/ymf/e9f9cb6b95c21c714015f15c372f595367aa553f443a-WpOCNo_fw1200.webp" mode=""></image>
				<image src="@/me/static/ymf/f5d96faaa94cb0151a5c95db44e27b80ed6eeac5cb32-rApi2S_fw1200.webp" mode=""></image>
				<image src="@/me/static/ymf/0e114b9ac6afc2b4c0f29520178be64915a111e218a8b5-mbMpg2_fw1200.jpg" mode=""></image>
				<image src="@/me/static/ymf/4783f7272bf31eeafbe1362605477de14b7cd3da24b0-ggkAnW_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/8dce1d3c3a8287c35bc1bf394048d57a64acfa047d4e-6wXnWE_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/ff919b6254e376cc902c89afdcc194ac2ab39c93793b-8TdL1Z_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/3c9a5848127a67f98e25176a042511b89afd31daccc2f-5EHbxD_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/6c9e57bcbcb047039a8edb30ecdd3b912bac99555a8fc-9EK0oO_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/78a020586cfbb791918b767520a8ff3c2ab9660f1ee1b-GX4zcc_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/babf535567728d84346fbb13348e94aae3ec8f82106e2-QKPJoe_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/d1e4d760358ba0733faee6bcad1e23cb4a1d6d76ba290-O3hUrf_fw240webp.webp" mode=""></image>
				<image src="@/me/static/ymf/dcb5a4b0b1060b569f9fc618e6e2708b584f7def1cadf-R7jpIr_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/e4330f184149f502f4948ce3b60059edaffc9c3d94ca4-B11p5c_fw658webp.webp" mode=""></image>
				<image src="@/me/static/ymf/fa22e2a27871e5f8841e8abb12cc4347a6b9440816068-3XsAnJ_fw658webp.webp" mode=""></image>
			</view>
			<view class="u-flex u-row-between" style="margin-top: 130rpx;margin-bottom: 30rpx;">
				<view class="u-flex u-relative">
					<view class="zhuan-img zhuan-img1 u-absolute">
						<image src="/static/1.jpg" mode="aspectFill"></image>
					</view>
					<view class="zhuan-img zhuan-img2 u-absolute">
						<image src="/static/1.jpg" mode="aspectFill"></image>
					</view>
					<view class="zhuan-img zhuan-img3  u-absolute">
						<image src="/static/1.jpg" mode="aspectFill"></image>
					</view>
				</view>
				<view class="u-relative"  >
					<view class="zhekou u-absolute">
						<text class="" style="text-decoration: line-through;">￥29.9</text><text>限时特惠</text>
					</view>
					<my-button @click="$u.route('/pages/control-fenshen/ceate-fenshen')"> <text>￥ {{config1.model_train_price/100}} 马上生成</text></my-button>
				</view>
			</view>
		</view>
		
		<!-- <view class="box u-m-t-20">
			<view class="u-flex">
				<view class="font-bold ">数字分身兑换码</view>
				<image src="/static/gift1.png" class="u-m-l-6" style="width: 40rpx;height: 30rpx;" mode=""></image>
			</view>
			<view class="u-m-t-20 u-flex">
				<view class="u-flex-1 input-border u-flex u-p-l-30">
					<u-input placehoder="请输入数字分身礼包码"></u-input>
				</view>
				<view class="border duihuan u-m-l-20">
					确认兑换
				</view>
			</view>
		</view> -->
		
		<u-toast ref="uToast"></u-toast>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo:uni.getStorageSync('userInfo'),
				config1:uni.getStorageSync('config')
			};
		},
		onShow() {
			let userInfo=uni.getStorageSync('userInfo')
			if(userInfo){
				this.userInfo =userInfo
			}
		},
		onLoad() {
			this.$api({
				url: "user/info"
			}).then(res => {
				this.userInfo = res.data
				uni.setStorageSync('userInfo', res.data)
			})
		},
		methods:{
			toFree(){
				this.$u.route('/pages/control-fenshen/free-create-fenshen')
				// if(!this.userInfo.tried){
				// 	this.$u.route('/pages/control-fenshen/free-create-fenshen')
				// }else{
				// 	this.$refs.uToast.show({
				// 		title:"您已经不是首次创建分身了"
				// 	})
				// }
			}
		}
	}
</script>

<style lang="scss">
	.line-th{
		text-decoration: line-through;
	}
	.line-b::after {
		background-color: rgb(250, 195, 40);
		position: absolute;
		content: '';
		display: block;
		left: 0;
		right: 0;
		bottom: 0;
		border-radius: 12rpx;
		height: 12rpx;
		z-index: -1;
	}

	.box {
		border: 2px solid rgb(222, 219, 212);
		padding: 30rpx;
		border-radius: 30rpx;
		background-color: rgb(255, 241, 242);
	}

	.zhekou {
		top: -20rpx;
		right: 6rpx;
		z-index: 10;
		color: #fff;
		padding: 0 20rpx;
		border-radius: 50rpx 50rpx 0 50rpx;
		font-size: 20rpx;
		line-height: 40rpx;
		background-color: rgb(255, 64, 28);
	}

	.tuijian {
		background-color: rgb(34, 34, 34);
		color: #fff;
		position: absolute;right: -2px;
		top: -2px;
		border-radius: 0 30rpx 0 30rpx;
		padding: 10rpx 30rpx;
	}
	.zhuan-img{
		width: 120rpx;
		height: 160rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		border-radius: 20rpx;
		overflow: hidden;
		image{
			width: 120rpx;
			height: 160rpx;
		}
	}
	.input-border{
		border: 1px solid rgb(33, 33, 33);
		height: 92rpx;
		line-height: 92rpx;
		border-radius: 100rpx;
	}
	.duihuan{
		border: 1px solid #999;
		border-radius: 100rpx;
		color: #999;
		height: 92rpx;
		padding: 0 30rpx;
		line-height: 92rpx;
	}
	.zhuan-img1{
		z-index: 3;
	}
	.zhuan-img2{
		width: 120rpx;
		height: 140rpx;
		z-index: 2;
		left: 66rpx;
		transform: rotateZ(15deg);
	}
	.zhuan-img3{
		z-index: 1;
		width: 100rpx;
		height: 120rpx;
		z-index: 1;
		left: 140rpx;
		margin-top: 30rpx;
		transform: rotateZ(30deg);
	}
</style>
