<template>
	<view class="content">
		<view class="header">
			<view class="header-top" :style="backgroundStyle">
				<image src="../../static/servicePackage/member_ba.png" mode="widthFix" v-if="!isVIP"></image>
				<image src="../../static/activate2.png" mode="widthFix" v-if="isVIP"></image>
			</view>
			<view class="header-bottom">
				<view class="header-bottom-top">
					<view class="header-bottom-title">
						<view class="header-bottom-title-text">
							<span>{{getList.title}}</span>
							<span class="header-bottom-title-liao">
								{{dataList.name}}
							</span>
						</view>
						<view class="header-bottom-title-num">
							<span>{{getList.sales}}</span>
							<span> 人选择</span>
						</view>
						
					</view>
					<view class="header-bottom-money-view">
						<view class="header-bottom-money1">
							<view class="header-bottom-money-zhen">
								<span>￥</span>
								<span>{{getList.price}}</span>
								<span>元/套</span>
							</view>
							<view class="header-bottom-money-jia">
								￥{{getList.oldPrice}}
							</view>
						</view>
					</view>
				</view>
				<view class="header-bottom-foot">
					<view class="header-bottom-foot-cont">
						<view class="header-fubz">保障</view>
						<view class="header-bottom-foot-view">
							<image class="header-bottom-foot-view-img1" src="../../static/servicePackage/idCard.png" mode=""></image>
							<span>未服务全额退款</span>
						</view>
						<view class="header-bottom-foot-view" style="margin: 0px 7px;">
							<image class="header-bottom-foot-view-img2" src="../../static/servicePackage/money.png" mode=""></image>
							<span>不满意重做</span>
						</view>
						<view class="header-bottom-foot-view">
							<image class="header-bottom-foot-view-img3" src="../../static/servicePackage/shuangyue.png" mode=""></image>
							<span>最快30分钟上门</span>
						</view>
					</view>	
				</view>
			</view>
		</view>
		<view class="detail-foot">
			<view class="detail-foot-nav">
				<span class="detail-foot-nav-text">适用说明</span>
				<span class="detail-foot-nav-bor"></span>
			</view>
			<view class="detail-foot-mian" style="background-color: #fff;width: 95%;">
				<view class="detail-foot-mian-top">
					<span class="detail-foot-mian-top-title">性别限制: </span>
					<span class="detail-foot-mian-top-text">不限性别</span>
				</view>	
				<view class="detail-foot-mian-top-bottom">
					<span class="detail-foot-mian-top-title">适应人群: </span>
					<span class="detail-foot-mian-top-text">
						{{getList.applyPeople}}
					</span>
				</view>
			</view>
		</view>
		<view class="detail-foot">
			<view class="detail-foot-nav">
				<span class="detail-foot-nav-text">项目详情</span>
				<span class="detail-foot-nav-bor"></span>
			</view>
			<view class="detail-foot-mian">
				<image class="detail-foot-mian-img" :src="getList.contentImg" mode="widthFix"></image>	
				<view class="detail-foot-mian-txet">
					<span>SCIENTIFIC WAIST</span>
					<span>科学护腰，不上脊椎</span>
					<span>让您的腰不在盲目呵护!避免二次伤害!</span>
				</view>
			</view>
		</view>
		<view class="detail-btn" @click="goumai(getList)">
			立即购买
		</view>
	</view>
</template>
<script>
	export default{
		data(){
			return{
				detailData:[],
				dataList:[],
				getList:[],
				isVIP:false,
				// 背景图片的URL可以是动态的，比如从API获取或根据条件生成
				backgroundImageUrl: '',
				page:1,
				limit:10,
				
			}
		},
		computed: {
		    backgroundStyle() {
		      return {
		        backgroundImage: `url(${this.backgroundImageUrl})`,
		        backgroundSize: 'cover', // 根据需要调整
		      };
		    }
		  },
		onLoad(e) {
			var that=this;
			that.dataList=e;
			that.isVIP=this.$queue.getData('isVIP');
			that.getData()
		},
		methods:{
			goumai(item){//立即购买
					this.$queue.setData('getJishi','')
					this.$queue.setData('ordersId','');
					this.$queue.setData('ordersId',item.massageTypeId);
					this.$queue.setData('userPackageDetailId',item.id);
					this.$queue.setData('daibudan','');
					uni.navigateTo({
						url:'/my/order/payModify?ordersId='+item.massageTypeId
					})
					
			},
			getData(){//次卡
				var that=this;
				let data = {
							massageTypeId:that.dataList.id,
							mainId: that.dataList.mainId,
							page: that.page,
							limit:  that.limit,
						}
				that.$Request.get('/app/user/package/detail/getMyPackageDetail', data).then(res => {
					if (res.code == 0) {
						that.getList=res.data;
						that.backgroundImageUrl=that.getList.packageImg
					}
				})
			},
		}
	}
</script>
<style scoped>
	.dingdan-btn{
		text-align: center;
		width: 62px;
		height: 24px;
		line-height: 24px;
		border-radius: 4px;
		font-weight: bold;
		font-size: 11px;
	}
	.header-fubz{
		font-size: 26rpx;
		color: #029c88;
		font-weight: bold;
	}
	.dingdan-btn-l{
		background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);
		color: #FFFFFF;
	}
	.dingdan-btn-h{
		background: #666;
		color: #FFFFFF;
	}
	.tese span:nth-child(1){
		font-weight: bold;
		font-size: 22rpx;
		color: #333333;
	}
	.tese span:nth-child(2){
		font-weight: 400;
		font-size: 22rpx;
		color: #8D9194;
	}
	.tese{
		width: 100%;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2; /* 显示的行数，可以根据需要修改 */
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.detail-foot-nav-bor{
		width: 64px;
		height: 11rpx;
		border-radius: 6rpx;
		position: absolute;
		bottom: 0;
		background: linear-gradient(90deg,rgba(234, 248, 245,0.7),rgba(132, 211, 196,0.7));
	}
	.detail-foot-nav-text{
		font-weight: bold;
		font-size: 32rpx;
		color: #000000;
	}
	.detail-foot-title{
		    width: 115px;
		    height: 32px;
			background-image: url(../../static/servicePackage/horn.png);
		    background-repeat: no-repeat;
		    background-size: 100% 100%;
		    font-weight: 400;
		    font-size: 12px;
		    color: #FFFFFF;
		    text-align: right;
		    line-height: 32px;
		    padding-right: 15px;
			position: absolute;
			    right: 0;
			    top: 0;
	}
	.detail-foot-list-top{
		width: 95%;
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-bottom: 25px;
	}
	.detail-foot-list{
		width: 95%;
		border-radius: 21rpx;
		position: relative;
		display: flex;
		flex-direction: column;
		background-color: #fff;
		padding: 10px;
		margin-bottom: 10px;
	}
	.detail-foot{
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.detail-foot-list-top span:nth-child(1){
		font-weight: bold;
		font-size: 31rpx;
		color: #3F3F3F;
	}
	.detail-foot-list-top span:nth-child(2){
		width: 76rpx;
		height: 33rpx;
		line-height: 33rpx;
		text-align: center;
		border-radius: 16rpx;
		border: 1px solid #7D7D7D;
		font-weight: 400;
		font-size: 20rpx;
		color: #777777;
		margin: 0px 25px 0px 5px;
	}
	.detail-foot-list-top span:nth-child(3){
		font-weight: 400;
		font-size: 22rpx;
		color: #777777;
	}
	.detail-foot-mian{
		width: 100%;
		display: flex;
		flex-direction: column;
		margin: 0 auto;
		border-radius: 21rpx;
		padding: 15px;
	}
	.header-bottom-title-liao{
		padding: 4px 9px;
		height: 16px;
		line-height: 16px;
		text-align: center;
		background: linear-gradient(-90deg, #FF6F48, #FF9E69);
		border-radius: 7px;
		margin-left: 5px;
		font-size: 11px;
		border-top-left-radius: 20px;
		border-bottom-right-radius: 20px;
		color: #fff;
	}
	.detail-btn{
		width:95%;
		height: 92rpx;
		line-height: 92rpx;
		background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
		border-radius: 46rpx;
		margin: 0 auto;
		text-align: center;
		font-weight: 400;
		font-size: 42rpx;
		color: #FFFFFF;
	}
	.detail-foot-mian-txet span:nth-child(1){
		color: #777777;
		font-size: 12px;
		font-weight: bold;
		margin-bottom: 5px;
	}
	.detail-foot-mian-txet span:nth-child(2){
		color: #333;
		font-size: 15px;
		font-weight: bold;
		margin-bottom:3px;
	}
	.detail-foot-mian-txet span:nth-child(3){
		color: #777777;
		font-size: 14px;
		font-weight: bold;
	}
	.detail-foot-mian-txet{
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-top: 20px;
	}
	.detail-foot-mian-img{
		width: 100%;
		height:auto;
	}
	.detail-foot-mian-top-bottom{
		margin-top: 10px;
	}
	.detail-foot-mian-top-title{
		color: #333333;
	}
	.detail-foot-mian-top-text{
		color: #777777;
		width:80%;
		margin-left: 5px;
	}
	.detail-foot-mian-top,.detail-foot-mian-top-bottom{
		width: 100%;
		display: flex;
		flex-direction: row;
		font-weight: bold;
		font-size: 26rpx;
	}
	.header-bottom-title-bottom span{
		font-weight: bold;
		font-size: 22rpx;
		color: #20AB95;
	}
	.header-bottom-title-bottom image{
		width: 34.03rpx;
		height: 30.56rpx;
		margin-right: 3px;
	}
	.header-bottom-title-bottom{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		margin: 5px 0px;
	}
	.shouc image{
		width: 34.03rpx;
		height: 32.64rpx;
	}
	
	.shouc{
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.detail-foot-nav-bor{
		width: 64px;
		height: 11rpx;
		border-radius: 6rpx;
		position: absolute;
		bottom: 0;
		background: linear-gradient(90deg,rgba(234, 248, 245,0.7),rgba(132, 211, 196,0.7));
	}
	.detail-foot-nav-text{
		font-weight: bold;
		font-size: 32rpx;
		color: #000000;
	}
	.detail-foot-nav{
		width: 90%;
		display: flex;
		flex-direction: column;
		position: relative;
		margin-bottom: 16px;
		margin-top: 16px;
	}
	.tese span:nth-child(1){
		font-weight: bold;
		font-size: 22rpx;
		color: #333333;
	}
	.tese span:nth-child(2){
		font-weight: 400;
		font-size: 22rpx;
		color: #8D9194;
	}
	.tese{
		width: 100%;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2; /* 显示的行数，可以根据需要修改 */
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.detail-foot-list-top span:nth-child(1){
		font-weight: bold;
		font-size: 31rpx;
		color: #3F3F3F;
	}
	.detail-foot-list-top span:nth-child(2){
		width: 76rpx;
		height: 33rpx;
		line-height: 33rpx;
		text-align: center;
		border-radius: 16rpx;
		border: 1px solid #7D7D7D;
		font-weight: 400;
		font-size: 20rpx;
		color: #777777;
		margin: 0px 25px 0px 5px;
	}
	.detail-foot-list-top span:nth-child(3){
		font-weight: 400;
		font-size: 22rpx;
		color: #777777;
	}
	
	
	.jianjie{
		font-weight: 400;
		font-size: 22rpx;
		color: #8D9194;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2; /* 显示的行数，可以根据需要修改 */
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.header-bottom-mian{
		margin: 10px 0px;
	}
	.header-bottom-mian-title{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-bottom: 6px;
	}
	.header-bottom-mian-title span{
		font-weight: 400;
		font-size: 26rpx;
		color: #20AB95;
		margin-left: 5px;
	}
	.header-bottom-mian-title image{
		width: 30.56rpx;
		height: 29.86rpx;
	}
	.header-bottom-foot-view-img1{
		width: 30rpx;
		height: 30rpx;
	}
	.header-bottom-foot-view-img2{
		width: 23rpx;
		height: 23rpx;
	}
	.header-bottom-foot-view-img3{
		width: 26rpx;
		height: 26rpx;
	}
	.header-bottom-foot-view image{
		margin-right: 1px;
	}
	.header-bottom-foot-view{
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding: 1px 8px;
		height: 22px;
		line-height: 22px;
		background-color: rgba(230, 246, 243, 1);
		border-radius: 15px;
		font-weight: 400;
		font-size: 10px;
		color: #029c88;
	}
	.header-bottom-foot-title{
		width:100%;
		height: 22px;
		line-height: 22px;
		text-align: left;
		font-weight: 600;
		font-size: 23rpx;
		color: #08A28A;
		margin-top: 5px;
	}
	.header-bottom-foot-cont{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		margin-top: 40rpx;
	}
	.header-bottom-foot{
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.header-bottom-money-jia{
		font-size: 28rpx;
		color: #848484;
		line-height: 37rpx;
		margin-left: 5px;
	}
	.header-bottom-money-zhen span{
		color: #F95900;
	}
	.header-bottom-money-zhen span:nth-child(1){
		font-size: 25rpx;
	}
	.header-bottom-money-zhen span:nth-child(2){
		font-size:40rpx;
		font-weight: bold;
	}
	.header-bottom-money-zhen span:nth-child(3){
		font-size: 25rpx;
	}
	.header-bottom-money-zhen{
		display: flex;
		flex-direction: row;
		align-items: baseline;
	}
	
	.header-bottom-money-view{
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin-top:5px;
	}
	.header-bottom-money{
		padding: 5px 0;
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-top: 5rpx;
		justify-content: space-between;
	}
	.header-bottom-money1{
		padding: 5px 0;
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-top: 5rpx;
	}
	.header-bottom-title-num span{
		font-size: 30rpx;
	}
	.header-bottom-title-num span:nth-child(1){
		font-weight: bold;
		color: #08A28A;
	}
	.header-bottom-title-num span:nth-child(2){
		color: #848485;
		margin-left: 5px;
	}
	.header-bottom-title-text{
		font-weight: bold;
		font-size: 35rpx;
		color: #13141A;
	}
	.header-bottom-title{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.header-bottom-top{
		width: 100%;
		display: flex;
		flex-direction: column;
	}
	.header-bottom{
		width: 100%;
		background-color: #fff;
		padding: 15px;
		display: flex;
		flex-direction: column;
	}
	.header-top image{
		width: 706.25rpx;
		height: 105.07rpx;
	}
	.header-top{
		width: 100%;
		height: 745.83rpx;
		background-image: url('../../static/servicePackage/display.png');
		background-size: 100%;
		background-repeat: no-repeat;
		display: flex;
		align-items: flex-end;
		justify-content: center;
	}
	.header{
		width: 100%;
		display: flex;
		flex-direction: column;
	}
	.content{
		width: 100%;
		height: auto;
		background-color: #f7f7f7;
	}
</style>