<template>
	<view class="content">
		<view class="detailTop">
			<image class="banner" mode="scaleToFill" :src="info.poster[0]"></image>
		</view>
		<view class="infoTop">
			<view class="price">
				<image class="priceBg" mode="heightFix" src="../../static/bg_detail_jiage.png"></image>
				<view class="two-price">
					<text>￥</text><text class="large">{{price.selling_price || 0}}</text>
					<text class="del">￥{{price.original_price || 0}}</text>
				</view>
				<view class="surplus">剩余 50</view>
			</view>
			<view class="times">
				<text class="djs">倒计时</text>
				<text class="num">21</text>
				<text>天</text>
				<text class="num">23</text>
				<text>时</text>
				<text class="num">21</text>
				<text>分</text>
			</view>
		</view>
		<view class="toptitle">
			<view class="h3">时光印记新概念婚纱摄影</view>
			<view class="dataGroup">
				<view class="dataCol">
					<image mode="heightFix" src="../../static/icon_liulan@2x.png"></image>
					<text class="bot">1334</text>
				</view>
				<view class="dataCol">
					<image mode="heightFix" src="../../static/icon_liked@2x.png"></image>
					<text class="bot">收藏</text>
				</view>
			</view>
			<view class="normalPrice">
				<view class="price">¥<text class="big">{{price.selling_price || 0}}</text><text class="small">¥{{price.original_price || 0}}</text></view>
				<view class="r_info">
					<view class="shareMoney" v-if="price.shared_price"><text>分享金</text>{{price.shared_price}}元</view>
					<view class="leaveNum">剩余 50</view>
				</view>
			</view>
			<view class="shareIntro" v-if="price.shared_price">
				<view class="title">分享金</view>
				<view class="detail">其他用户通过您分享的页面购买并服务完成后， 您可获得<text class="font_red">￥{{price.shared_price}}</text>分享金</view>
			</view>
			<view class="tags">
				<text class="txt" v-for="(item, idx) in info.label" :key="idx">{{item}}</text>
			</view>
		</view>
		<view class="summary">
			<view class="tit">
				<text>简介</text>
			</view>
			<view class="wrap">
				<view class="item">
					<view class="iconfont icon-aixin"></view>
					<view class="grey-txt">服务方式</view>
					<view class="black-txt">上门/到店服务</view>
				</view>
				<view class="item">
					<view class="iconfont icon-clock2"></view>
					<view class="grey-txt">有效期限</view>
					<view class="black-txt">60天</view>
				</view>
				<view class="item">
					<view class="iconfont icon-duorenyonghu"></view>
					<view class="grey-txt">适合人群</view>
					<view class="black-txt">孕妈妈</view>
				</view>
				<view class="item">
					<view class="iconfont icon-jishishalou"></view>
					<view class="grey-txt">服务时长</view>
					<view class="black-txt">2小时</view>
				</view>
			</view>
		</view>
		<view class="shops">
			<view class="shop">
				<image class="pic" src="../../static/shop-logo.png"></image>
				<view class="infos">
					<view class="name">时光印记店(石路店)</view>
					<view class="starts">
						<view class="iconfont icon-star"></view>
						<view class="iconfont icon-star"></view>
						<view class="iconfont icon-star"></view>
						<view class="iconfont icon-star"></view>
						<view class="iconfont icon-star"></view>
					</view>
					<view class="txt">商户简介商户简介商户简介商户简介商户简介</view>
					<view class="reply">
						<text>历史评价</text>
						<text class="iconfont icon-right"></text>
					</view>
				</view>
			</view>
			<view class="shop">
				<image class="pic" src="../../static/shop-logo.png"></image>
				<view class="infos">
					<view class="name">时光印记店(石路店)</view>
					<view class="date-txt">周一至周日 09:00-18:00</view>
					<view class="txt">苏州市姑苏区十全街999号</view>
				</view>
			</view>
		</view>
		<view class="details">
			<view class="detail">
				<view class="tit">商品详情</view>
				<view class="txts">
					<rich-text :nodes="info.content"></rich-text>
					<!-- <text class="txt">*主题亲子服饰一套(一家三口)</text>
					<text class="txt">*免费妈妈妆面造型一次</text>
					<text class="txt">*含妈妈假睫毛一副</text>
					<text class="txt">*拍摄不低于40张</text>
					<text class="txt">*赠送16寸放大照片一副(同底)</text>
					<text class="txt">*赠送10寸拉米娜摆台一副(同底)</text>
					<text class="txt">*赠送6寸冲印单片3张(同底)</text>
					<text class="txt">*赠送底片5张(U盘自拷或者发邮箱)</text> -->
				</view>
			</view>
			<!-- <view class="detail">
				<view class="tit">注意事项</view>
				<view class="txts">
					<text class="txt">*本次活动针对0-12岁宝宝</text>
					<text class="txt">*每户家庭限领1份,此优惠活动不与公司其他活动同享</text>
				</view>
				<image mode="widthFix" src="../../static/690x400.png"></image>
			</view> -->
		</view>
		<!--为您精选-->
		<view class="introBox">
			<view class="normal_tit">为您精选</view>
			<view class="intro_row">
				<view class="row_col">
					<view class="imgOuter">
						<image mode="aspectFill" src="../../static/rishang.png"></image>
						<view class="date">2018/11/25 14:00</view>
					</view>
					<view class="title">孕期保健Q&A</view>
					<view class="subTit">苏州·园区星海街188号园区星海街188号</view>
					<view class="price"><text class="font_red">免费</text>130人参与</view>
				</view>
				<view class="row_col">
					<view class="imgOuter">
						<image mode="aspectFill" src="../../static/rishang.png"></image>
						<view class="date">2018/11/25 14:00</view>
					</view>
					<view class="title">孕期保健Q&A</view>
					<view class="subTit">苏州·园区星海街188号园区星海街188号</view>
					<view class="price"><text class="font_red">免费</text></view>
				</view>
			</view>
		</view>		
	<!--底部导航-->
	<view class="footer">
		<view class="menuLink">
			<navigator url="../active/active" open-type="switchTab">
			<view class="menuCol">
				<text class="iconfont icon-home"></text>
				<text>首页</text>
			</view>
			</navigator>
			<view class="menuCol">
				<text class="iconfont icon-Share"></text>
				<text>分享</text>
			</view>
			<view class="menuCol">
				<text class="iconfont icon-Icon_customerservice"></text>
				<text>客服</text>
			</view>
		</view>
		<view class="buyBtn">立即购买</view>
	</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				type: 1,
				info: {},
				price: {},
			}
		},
		onLoad(options) {
			this.type = options.type
			this.getDetail(options.id)
		},
		methods: {
			getDetail(id) {
				uni.request({
					url: this.baseUrl + '/api/wechat/activity-detail',
					method: 'POST',
					data: {id: id},
					success: r => {
						if (r.data.status == 'success') {
							this.info = r.data.data[0]
							this.price = this.info.prices[0]
						}
					}
				})
			},
		}
	}
</script>
<style lang="scss" scoped>
	.footer{
		width:100%;
		height: 112rpx;
		background: #FFFFFF;
		box-shadow: 0px -1rpx 0px 0px #DEDEDE;
		padding:0 30rpx;
		box-sizing: border-box;
		display:flex;
		justify-content: space-between;
		align-items: center;
		position: fixed;
		bottom:0;
		left:0;
		.menuLink{
			display:flex;
			justify-content: flex-start;
			align-items: center;
			color:#333;
			.menuCol{
				margin:0 30rpx;
				font-size:20rpx;
				text{display: block;}
				.iconfont{font-size:36rpx;margin-bottom:6rpx;}
			}
		}
		.buyBtn{
			width: 220rpx;
			height: 72rpx;
			background: linear-gradient(90deg, #FF7E95 0%, #FF447B 100%);
			border-radius: 36rpx;
			font-size: 28rpx;
			font-weight: 500;	
			text-align: center;
			line-height:72rpx;
			color:#fff;
		}
		
	}
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background: #F6F6F6;
		padding-bottom: 132rpx;
	}
	.detailTop{
		width: 750rpx;
		.banner{display: block;width:100%;height:500rpx;}
	}
	.infoTop{
		position: relative;
		width: 100%;
		height: 88rpx;
		background: #FF97AA;
		.price {
			position: absolute;
			left: 0;
			bottom: 0;
			width: 400rpx;
			height: 124rpx;
			border-radius: 0 40rpx 0 0;
			color: #fff;
			.priceBg{display: block;width:100%;height:124rpx;position: absolute;top:0;left:0;z-index: 9;}
			.two-price {
				display: inline-block;
				margin-top: 22rpx;
				margin-left: 20rpx;
				font-size: 24rpx;
				line-height: 56rpx;
				position: relative;
				z-index:10;
				.large {
					font-size: 56rpx;
				}
				.del {
					display: inline-block;
					margin-left: 10rpx;
					text-decoration: line-through;
				}
			}
			.surplus {
				display: inline-block;
				width: 102rpx;
				height: 32rpx;
				line-height: 32rpx;
				background: rgba(51,51,51,0.2);
				border-radius: 16rpx;
				font-size: 24rpx;
				text-align: center;
				margin-left: 20rpx;
				position: relative;
				z-index:10;				
			}
		}
		.times {
			position: absolute;
			top: 13rpx;
			right: 30rpx;
			display: flex;
			align-items: center;
			color: #fff;
			font-size: 24rpx;
			.djs {
				padding-right: 10rpx;
			}
			.num {
				display: inline-block;
				margin-left: 8rpx;
				margin-right: 8rpx;
				padding: 5rpx;
				background: #333333;
				border-radius: 4rpx;
			}
		}
	}
	.toptitle {
		width:100%;
		background: #fff;
		border-radius: 24rpx 24rpx 0;
		margin-top: -20rpx;
		padding:30rpx;
		box-sizing: border-box;
		position: relative;
		z-index:20;
		.h3 {
			display: inline-block;
			font-size: 36rpx;
			font-weight: 500;
			color: #333333;
		}
		.dataGroup {
			position: absolute;
			top: 30rpx;
			right: 30rpx;
			.dataCol {
				display: inline-block;
				margin-left:20rpx;
				image{display: block;width:34rpx;height:34rpx;margin:0 auto;}
				.bot {
					display: block;
					font-size: 20rpx;
					width: 60rpx;
					text-align: center;
				}
			}
		}
		.tags {
			.txt {
				padding: 8rpx;
				background: rgba(255,177,62,0.1);
				border-radius: 4rpx;
				font-size: 20rpx;
				color: #FF7E4C;
				display: inline-block;
				margin-right: 10rpx;
			}
		}
		.normalPrice{
			display: flex;
			justify-content: space-between;
			align-items: flex-end;
			align-content: flex-end;
			font-size:24rpx;color:#999;
			.price{
				flex:1;
				color: #FF578A;
				.big{font-size: 56rpx;font-weight: 500;margin-right:10rpx;}
				.small{color:#999;}
			}
			.r_info{flex:1;display: flex;justify-content: flex-end;align-items: center;
				.leaveNum{margin-left:24rpx;}
				.shareMoney{
					max-width:136rpx;
					height: 28rpx;
					border:2rpx solid #FF578A;
					border-radius: 4rpx;
					line-height:28rpx;
					font-size:20rpx;
					margin-right:10rpx;
					padding-right:10rpx;
					color:#FF578A;
					display: flex;
					flex-direction: flex-start;
					text{background: #FF578A;color:#fff;padding: 0 10rpx;}
				}			
			}
			
		}
		.shareIntro{
			display: flex;
			border-top:1rpx solid #DEE4E7;
			justify-content: space-between;
			align-items: center;
			align-content: center;
			font-size:28rpx;
			color:#666;
			padding:25rpx 0;
			margin-top:25rpx;
			.title{
				width: 90rpx;
				padding:0 8rpx;
				height: 32rpx;
				line-height:32rpx;
				background: #FF578A;
				border-radius: 6rpx;
				font-size: 20rpx;
				color:#fff;
				margin-right:32rpx;
			}
		}
	}
	.summary {
		width: 100%;
		margin-top: 15rpx;
		background: #fff;
		padding-bottom: 40rpx;
		.tit {
			line-height: 32rpx;
			font-size: 32rpx;
			font-weight: 500;
			color: #333333;
			margin-top: 35rpx;
			margin-left: 30rpx;
		}
		.wrap {
			margin-top: 40rpx;
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: space-around;
			.item {
				width: 170rpx;
				.iconfont {
					text-align: center;
					font-size: 34rpx;
					color: #FF578A;
				}
				.grey-txt {
					text-align: center;
					font-size: 24rpx;
					color: #999999;
					margin: 10rpx auto;
				}
				.black-txt {
					text-align: center;
					font-size: 24rpx;
					color: #333333;
				}
			}
		}
	}
	.shops {
		background: #fff;
		margin-top: 10rpx;
		padding: 15rpx 30rpx;
		box-sizing: border-box;
		.shop {
			box-sizing: border-box;
			padding: 25rpx 0;
			border-bottom: 1rpx solid #EAEAEA;
			.pic {
				width: 120rpx;
				height: 120rpx;
				display: inline-block;
			}
			.infos {
				position: relative;
				width: 540rpx;
				margin-left: 24rpx;
				display: inline-block;
				vertical-align: top;
				.name {
					font-size: 32rpx;
					font-weight: 500;
					color: #333333;
					line-height: 32rpx;
				}
				.starts {
					margin: 20rpx 0;
					height: 20rpx;
					line-height: 20rpx;
					.iconfont {
						color: #FF578A;
						font-size: 20rpx;
						display: inline-block;
						margin-right: 7rpx;
						height: 100%;
						line-height: 20rpx;
					}
				}
				.txt {
					font-size: 24rpx;
					color: #666666;
					line-height: 24rpx;
				}
				.reply {
					position: absolute;
					top: 45rpx;
					right: 0;
					font-size: 24rpx;
					color: #666666;
					line-height: 24rpx;
					.iconfont {
						padding-left: 7rpx;
						font-size: 24rpx;
						color:#999;
					}
				}
				.date-txt {
					font-size: 24rpx;
					color: #666666;
					line-height: 24rpx;
					margin: 20rpx 0;
				}
			}
		}
		.shop:last-child {
			border-bottom: 0;
		}
	}
	.details {
		margin-top: 10rpx;
		padding: 0 30rpx 30rpx 30rpx;
		background: #fff;
		width: 100%;
		box-sizing: border-box;
		.tit {
			font-size: 32rpx;
			font-weight: 500;
			color: #333333;
			line-height: 32rpx;
			margin-top: 30rpx;
		}
		.txts {
			margin-top: 33rpx;
			font-size: 28rpx;
			.txt {
				display: block;
				font-size: 28rpx;
				color: #333333;
				line-height: 45rpx;
			}
		}
		image{width:100%;margin-top:30rpx;}
	}
	.introBox{
		width:710rpx;
		margin:20rpx auto 0 auto;
		border-radius: 16rpx;
		background: #fff;
		padding:0 35rpx;
		box-sizing: border-box;
	}
	.intro_row{
		display: flex;
		justify-content: space-between;
		width:100%;
	}
	.row_col{
		width:310rpx;
		border-radius: 8rpx;
		padding-bottom:20rpx;
		.imgOuter{
			width:310rpx;
			height:230rpx;
			position: relative;
			image{
				width:310rpx;
				height:230rpx;
				border-radius:8rpx 8rpx 0 0;
			}	
			.date{
				background-color: rgba(0,0,0,0.3);
				font-size:20rpx;
				color:#fff;
				line-height:32rrpx;
				padding:0 8rpx;
				border-radius: 5rpx;
				position: absolute;
				left: 20rpx;
				bottom:20rpx;
				font-weight:500;
			}
		}
		.title{
			width:100%;
			font-size:28rpx;
			color:#333;
			font-weight:500;
			overflow: hidden;
			white-space: nowrap;
			text-overflow: ellipsis;
			padding-top:20rpx;
		}
		.subTit{
			width:100%;
			font-size:22rpx;
			color:#333;
			font-weight:400;
			overflow: hidden;
			white-space: nowrap;
			text-overflow: ellipsis;
			padding-top:10rpx;
		}	
		.price{
			margin-top:20rpx;
			font-size:22rpx;
			color:#999;
			text{
				font-size:32rpx;
				font-weight:400;
				padding-right:15rpx;
			}
		}
	}
</style>
