sadjv3_user/pages/my/fuwuDateil.vue

648 lines
15 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="content">
<view class="header">
<view class="header-top" :style="backgroundStyle" @click="goNav('/my/vip/index')">
<image src="../../static/activate2.png" mode="widthFix" v-if="isVip=='1'"></image>
<image src="../../static/servicePackage/member_ba.png" mode="widthFix" v-else></image>
</view>
<view class="header-bottom">
<view class="header-bottom-top">
<view class="header-bottom-title">
<view class="header-bottom-title-text">
<span class="header-bold">{{getList.title}}</span>
<span class="header-bottom-title-liao">
{{getList.classifyName}}
</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-money">
<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 class="header-bottom-money-view">
服务时长:{{getList.duration}}分钟
</view>
<view class="header-bottom-title-bottom" v-if="dataList.titleNmae=='服务疗程'">
<image src="../../static/my-cika.png" mode=""></image>
<span>30天一疗程每隔三天一次</span>
</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;width: 26%;">
<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">
<view class="detail-foot-mian-top">
<span class="detail-foot-mian-top-title header-bold">性别限制: </span>
<span class="detail-foot-mian-top-text">{{getList.isSex=='1'?'男':getList.isSex=='2'?'女':'不限性别'}}</span>
</view>
<view class="detail-foot-mian-top-bottom">
<span class="detail-foot-mian-top-title header-bold">适应人群: </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" v-for="(item,index) in contentImg" :key="index" :src="item" mode="widthFix"></image>
<!-- <view class="lab-view">
<view class="detail-foot-mian-txet" v-for="item in labels" :key="item">
<span class="detail-foot-mian-txetList">{{item}}</span>
</view>
</view> -->
</view>
</view>
<view class="detail-foot" v-if="getList.childrenMassageList.length>0">
<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" v-for="(item,index) in getList.childrenMassageList" :key="index">
<view class="detail-foot-list">
<view class="detail-view" style="position: relative;">
<image class="detail-view-img" :src="item.massageImg" mode=""></image>
<view class="detail-view-mina">
<view class="header-bottom-money" style="display: flex;justify-content: space-between; ">
<view style="display: flex; align-items: flex-end;">
<view class="detail-foot-list-top">
<span style="margin-right: 5px;">{{item.title}}</span>
</view>
</view>
</view>
<view class="header-bottom-money-zhen">
<span></span>
<span>{{item.price}}</span>
</view>
<view class="xiangmu-cont-top-time">
<view class="xiangmu-cont-top-left">服务时长{{item.duration}}分钟</view>
<view class="xiangmu-cont-top-left">已售{{item.sales}}</view>
</view>
<view class="tese">
<span>项目特色: </span>
<span>{{item.jianjie}}</span>
</view>
</view>
</view>
<!-- <view class="detail-foot-title">
服务项目{{index+1}}
</view> -->
</view>
</view>
<view style="height: 100rpx;"></view>
</view>
<view class="push-button">
<view class="detail-btn" v-if="getList.status=='1'" @click="goumai(getList)">
立即预约
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
dataList:[],
getList:[],
isVip:false,
// 背景图片的URL可以是动态的比如从API获取或根据条件生成
backgroundImageUrl: '',
myId:'',
contentImg:[],
labels:[]
}
},
computed: {
backgroundStyle() {
return {
backgroundImage: `url(${this.backgroundImageUrl})`,
backgroundSize: 'cover', // 根据需要调整
};
}
},
onLoad(e) {
var that=this;
that.dataList=e;
that.isVip=this.$queue.getData('isVIP');
that.myId = uni.getStorageSync('userId');
that.getData()
},
methods:{
goNav(e) {
uni.navigateTo({
url: e
})
},
goumai(item){//立即购买
this.$queue.setData('getJishi','')
this.$queue.setData('userPackageDetailId','');
this.$queue.setData('ordersId',this.dataList.id);
this.$queue.setData('daibudan','');
this.$queue.setData('youhui','');
this.$queue.setData('xiangmu',item)
uni.navigateTo({
url:'/my/order/payModify?ordersId='+this.dataList.id
})
},
getData(){
var that=this;
let data = {
userId: that.myId,
limit: that.dataList.limit,
mainId: that.dataList.mainId,
massageTypeId:that.dataList.id,
page:that.dataList.page,
}
that.$Request.get('/app/artificer/selectMassageTypeById', data).then(res => {
if (res.code == 0) {
that.getList=res.data;
that.contentImg=res.data.contentImg.split(",");
that.backgroundImageUrl=that.getList.massageImg;
that.labels=that.getList.labels.split(',');
}
})
},
}
}
</script>
<style scoped>
.detail-foot-title{
width:80px;
height:20px;
background: linear-gradient(90deg, #ffdf96, #feca76);
border-radius: 0 15rpx 0 30rpx;
font-weight: 400;
font-size: 12px;
color: #a13504;
text-align: right;
line-height:20px;
padding-right: 15px;
position: absolute;
right: 0;
top: 0;
}
.xiangmu-cont-top-left{
font-weight: normal;
font-size: 26rpx;
color: #049E89;
}
.xiangmu-cont-top-time{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.detail-view-mina{
width: 73%;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.detail-view-img{
width: 76px;
height: 76px;
border-radius: 9px;
}
.detail-view{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.lab-view{
width:100%;
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
}
.detail-foot-mian-txet{
width: 50%;
margin-top: 20px;
text-align: center;
}
.header-fubz{
font-size: 26rpx;
color: #029c88;
font-weight: bold;
}
.header-bottom-title-liao{
display: inline-block;
padding: 3px 7px;
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;
position: absolute;
}
.push-button{
width: 100%;
height: 48px;
position: fixed;
bottom: 0px;
display: flex;
flex-direction: column;
align-items: center;
margin: 0 auto;
}
.detail-btn{
display: inline-block;
width: 92%;
text-align: center;
background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
height: 40px;
border-radius: 28px;
color: #ffffff;
line-height: 40px;
margin-top: 4px;
font-size: 34rpx;
}
.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;
line-height: 20px;
}
.detail-foot-mian-top,.detail-foot-mian-top-bottom{
width: 100%;
display: flex;
flex-direction: row;
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(55, 182, 157,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: 17px;
}
.detail-foot{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 15px 0px 0px 0px;
}
.tese span:nth-child(1){
font-weight: bold;
font-size: 24rpx;
color: #333333;
}
.tese span:nth-child(2){
font-weight: 400;
font-size: 24rpx;
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;
}
.detail-foot-mian{
width: 95%;
display: flex;
flex-direction: column;
margin: 0 auto;
background-color: #fff;
border-radius: 21rpx;
padding: 15px;
margin-bottom: 10px;
position: relative;
}
.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{
width: 33%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 22px;
line-height: 22px;
border-radius: 15px;
font-weight: 400;
font-size: 11px;
color: #029c88;
}
.header-bottom-foot-title{
width:100%;
height: 22px;
line-height: 22px;
text-align: left;
font-weight: 600;
font-size: 23rpx;
color: #029d88;
margin-top: 5px;
}
.header-bottom-foot-cont{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.header-bottom-foot{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 20rpx;
border-top: 1px solid #f7f7f7;
padding: 20rpx 20rpx 0rpx 20rpx;
}
.header-bottom-money-jia{
font-size: 28rpx;
color: #848484;
line-height: 37rpx;
text-decoration-line: line-through;
margin-left: 5px;
}
.header-bottom-money-zhen span{
color: #FF6000;
}
.header-bottom-money-zhen span:nth-child(1){
font-size: 28rpx;
}
.header-bottom-money-zhen span:nth-child(2){
font-size:38rpx;
font-weight: bold;
}
.header-bottom-money-zhen span:nth-child(3){
font-size: 28rpx;
}
.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{
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-end;
}
.header-bottom-title-num{
display: flex;
}
.header-bottom-title-num span:nth-child(1){
font-size: 30rpx;
color: #08A28A;
font-weight: bold;
}
.header-bottom-title-num span:nth-child(2){
color: #848485;
margin-left:2px;
font-size: 26rpx;
}
.header-bottom-title-text{
font-size: 35rpx;
color: #13141A;
}
.header-bold{
font-weight: bold;
}
.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: 100vh;
background-color: #f7f7f7;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
}
</style>