<style scoped>
	.subscribe {
		height: 100vh;
		background: #FAF8F9;
		position: relative;
		
	}
	.subscribe .subscribe-box{
		width: 100%;
		background: #FFF;
		padding-bottom: 80px;
	}
	.subscribe .title{
		width: 100%;
		height: 45px;
		font-size: 16px;
		color: #1B1D1E;
		font-weight: bold;
		padding-left:15px ;
		line-height: 45px;
	}
	.subscribe .classify{
		display: flex;width:100%;flex-direction: row;overflow-x: auto;
		padding-bottom: 15px;
	}
	.subscribe .classify-item{
		height: 31px;
		padding: 0 13px;
		border-radius: 6px;
		border: 1px solid #D8D8D8;
		font-size: 13px;
		color: #888888;
		line-height: 29px;
		margin-right: 5px;
		white-space: nowrap;
		position: relative;
	}
	.subscribe .classify-t{
		width: 100%;
		background: #FFF;
		
		
	}
	.subscribe .c-t-box{
		width: 100%;
		height: 110px;
		border-radius: 6px;
		
		
		display: flex;width:100%;flex-direction: row;overflow-x: auto;
	}
	.subscribe .c-tw-item{
		width: 80px;
		height: 90px;
		border-radius: 6px;
		color: #888888;
		margin-right: 5px;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		font-size: 12px;
		
		box-shadow:0 6px 10px 1px #F2F2F2;
	}
	.goodsimg{
		width: 100%;height: 60px;
		border-top-left-radius: 6px;
		border-top-right-radius: 6px;
	}
	.subscribe .persionName-t{
		
		width: 100%;height: 30px;
		line-height: 30px;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		padding: 0 4px;
	}
	.subscribe .c-t-item{
		width: 80px;
		height: 113px;
		border-radius: 6px;
		border: 1px solid #D8D8D8;
		color: #888888;
		margin-right: 5px;
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 20px 0 ;
		justify-content: space-between;
		font-size: 12px;
	}
	.subscribe .daystyle{
		display: flex;width:100%;flex-direction: row;overflow-x: auto;
		border-bottom: 1px solid #E2E2E2;
		
	}
	.subscribe .day-item{
		display: flex;
		flex-direction: column;
		align-items: center;
		font-size: 14px;
		color: #1B1D1E;
		padding: 7px 15px;
		white-space: nowrap;
		position: relative;
	}
	.subscribe .offline{
		width: 100%;
		height: 2px;
		position: absolute;
		left: 0;
		bottom: 0;
	}
	.subscribe .timestyle{
		display: flex;width:100%;flex-direction: row;overflow-x: auto;
		padding: 15px 0;
	}
	.subscribe .time-item{
		width: 75px;
		height: 45px;
		border-radius: 6px;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 13px;
		color: #888888;
		border: 1px solid #D8D8D8;
		white-space: nowrap;
	}
	.subscribe .info{
		padding: 0 15px;
		
	}
	.subscribe .info-item{
		width: 100%;
		height: 50px;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		
	}
	.subscribe .info-i-l{
		font-size: 14px;
		color: #1B1D1E;
		font-weight: bold;
	}
	.subscribe .inputsmart{
		width:1;
		flex: 1;
		padding-left:20px ;text-align: right;font-size: 12px
	}
	
	.subscribe .persionName{
		width: 80px;
		display: inline-block;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		padding: 0 3px;
		text-align: center;
	}
	.subscribe .submit{
		width: 100%;
		height: 60px;
		background: #FFF;
		position: fixed;
		left: 0;
		bottom: 0;
		padding: 0 15px;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		z-index: 99;
		
	}
	.subscribe .submit-l{
		display: flex;
		flex-direction: row;
		align-items: flex-end;
		font-size: 13px;
	}
	.subscribe .corner{
		width: 0px;           /*  宽高设置为0，很重要，否则达不到效果 */
		height: 0px;
		border: 5px solid #FF4048;
		border-bottom-color: transparent;    /* 设置透明背景色 */
		border-left-color: transparent;
		border-right-color: transparent;
		position: absolute;
		left: 50%;
		bottom: -10px;
		margin-left: -5px;

	}
	.subscribe .pobtn{
		width:100%;
		padding: 30px 15px;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.subscribe .pobtn-item{
		width: 45%;
		height: 40px;
		border-radius: 6px;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #FFF;
		font-size: 14px;
	}
	.subscribe .right{
		flex: 1;
		color: #232323;
		text-align: right;
		display: flex;
		justify-content: flex-end;
	}
	.subscribe .popupBox {
		width: 100%;
		padding-bottom: 15px;
	}
	
	.subscribe .popupBox .popup_top {
		width: 100%;
		height: 45px;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 0 15px;
	}
	
	.subscribe .popupBox .txtype {}
	
	.subscribe  .typeitem {
		padding: 15px;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		border-top: 1px solid #f5f5f5
	}
</style>
<template>
	<view class="subscribe">
		<view class="subscribe-box" >
			<view style="width: 100%;height: 15px;background: #FAF8F9;" v-if="lineCate.length>0"></view>
			<view class="title" v-if="lineCate.length>0">服务项目</view>
			<view class="classify" v-if="lineCate.length>0">
				<view v-for="(cl, ci) in lineCate" :key="ci">
					<view class="classify-item" @click="switchitem(cl)"
					:style="{
						'margin-left':ci==0?'15px':'0',
						'margin-right': ci+1==lineCate.length?'15px':'5px',
						'border-color':cl.Id== categoryIds?'#FF4048':'#D8D8D8',
						'color':cl.Id== categoryIds?'#FF4048':'#888888',
						'background':cl.Id== categoryIds?'#FBE5E7':'#FFF',
						'font-weight':cl.Id== categoryIds?'Bold':'100',
						}">
						{{cl.Name}}
						<div class="corner" v-if='cl.Id== categoryIds'></div>

					</view>
				</view>
			</view>
			<view class="classify-t" v-if="OfflineGoods.length>0">
				<view class="c-t-box">
					<view v-for="(c, i) in OfflineGoods" :key="i">
						<view class="c-tw-item" @click="getgoodsList(c)"
						:style="{
							'margin-left':'15px',
							'margin-right': i+1==OfflineGoods.length?'15px':'0px',
							'transform':c.id== GoodsId?'scale(1.12)':'none',
							
							}">
							<image mode="aspectFill" class="goodsimg" :src="c.cover_pic" ></image>
							<text class="persionName-t" >{{c.name}}</text>
							
						</view>
					</view>
				</view>
			</view>
			<view style="width: 100%;height: 15px;background: #FAF8F9;" v-if="dayList.length>0"></view>
			<view class="title" v-if="dayList.length>0">到店时间</view>
			<view class="daystyle" v-if="dayList.length>0">
				<view v-for="(c, i) in dayList" :key="i">
					<view class="day-item" @click="btnday(c,i)"
					:style="{
						'color':c.DayDateStr== selectDay?'#FF4048':'#888888',
						}">
						<text>{{c.WeekDayStr}}</text>
						<text style="margin-top: 3px;">{{c.DayDateStr?(c.DayDateStr.split('-')[1]+'-'+c.DayDateStr.split('-')[2]):''}}</text>
						<view class="offline" :style="{'background':c.DayDateStr== selectDay?'#FF4048':'#FFF',}"></view>
					</view>
				</view>
			</view>
			<view class="timestyle" v-if="timeList.length>0">
				<view v-for="(c, i) in timeList" :key="i">
					<view class="time-item" @click="btntime(c)"
					:style="{
						'margin-left':i==0?'15px':'0',
						'margin-right': i+1==timeList.length?'15px':'5px',
						'border-color':c== selecttime?'#FF4048':'#D8D8D8',
						'color':c== selecttime?'#FF4048':'#888888',
						'background':c== selecttime?'#FBE5E7':'#FFF',
						'font-weight':c== selecttime?'Bold':'100',
						}">
						<text>{{c}}</text>
					</view>
				</view>
			</view>
			<view style="width: 100%;height: 15px;background: #FAF8F9;" v-if="designerList.length>0"></view>
			<view class="title" v-if="designerList.length>0">设计师</view>
			<view class="classify-t"  v-if="designerList.length>0">
				<view class="c-t-box" style="height: 140px;">
					<view v-for="(c, i) in designerList" :key="i">
						<view class="c-t-item" @click="getdesigner(c)"
						:style="{
							'margin-left':i==0?'15px':'0',
							'margin-right': i+1==designerList.length?'15px':'5px',
							'border-color':c.ServiceId== selectdesigner?'#FF4048':'#D8D8D8',
							'color':c.ServiceId== selectdesigner?'#FF4048':'#888888',
							'background':c.ServiceId== selectdesigner?'#FBE5E7':'#FFF',
							'font-weight':c.ServiceId== selectdesigner?'Bold':'100',
							'padding':i==0?'20px 0':'10px 0',
							'height':'123px'
							}">
							<image mode="aspectFill" v-if="i==0" :src="c.ServiceLogo" style="width: 38px;height: 35px;"></image>
							<u-avatar v-if="i!=0" :src="c.ServiceLogo" size="110"></u-avatar>
							<view style="display: flex;flex-direction: column;align-items: center;">
								<text class="persionName" style="">{{c.Name}}</text>
								<text class="persionName"  style="font-size: 10px;color: #999999;" v-if="i!=0">{{c.ReserveCount}}人预约</text>
							</view>
							
						</view>
					</view>
				</view>
			</view>
			<view style="width: 100%;height: 15px;background: #FAF8F9;" ></view>
			<view class="title" >预约人信息</view>
			<view class="info">
				<view class="info-item">
					<text class="info-i-l">人数</text>
					<u-number-box v-model="value" :min="1" @change="valChange"></u-number-box>
				</view>
				<view class="info-item">
					<text class="info-i-l">付款方式</text>
					<view @click="show=true" style="width: 200px;display: flex;flex-direction: row;align-items: center;justify-content: flex-end;">
						<Text>{{payname}}</Text>
						<u-icon name="arrow" color='#9F9F9F'></u-icon>
					</view>
				</view>
				<view class="info-item" v-if="PaymentWay==1">
					<text class="info-i-l">套餐卡</text>
					<view class="right" >
						<text class="content" v-if="courseList.length>0 && Use_Education_Id==0" @click="showCourseHandler">选择套餐卡
						</text>
						<text class="content" v-else-if="courseList.length==0">暂无套餐卡</text>
						<text class="content" v-else :style="{ color: pricecolor }" @click="showCourseHandler">已优惠{{goods.price*value}}元</text>
						<u-icon name="ellipsis" size="36" v-if="courseList.length > 0" @click="showCourseHandler"></u-icon>
					</view>
				</view>
				<view class="info-item">
					<text class="info-i-l">手机</text>
					<input class="uni-input inputsmart"  v-model="Mobile" placeholder='请输入手机号码' />
					
					<!-- <button type="default" open-type="getPhoneNumber" @getphonenumber='getphonenumber'>获取手机号码</button> -->
				</view>
				<view class="info-item">
					<text class="info-i-l">备注</text>
					<input class="uni-input inputsmart"  v-model="remarks" placeholder='选填，请输入您的其他要求' />
				</view>
			</view>
			<view class="submit">
				<view class="submit-l">
					<text v-if="PaymentWay==4">线下付款金额：</text>
					<text v-if="PaymentWay==5">预付定金：</text>
					<text v-if="PaymentWay==1">线上付款金额：</text>
					<text :style="{'color':mainColor}">￥<text style='font-size: 20px;'>{{Income*value}}</text></text>
				</view>
				<u-button
					:disabled = 'Nosubmit'
					size="80"
					:ripple="true"
					shape="square"
					@click="submitOrderHandler()"
					:custom-style="{
						backgroundColor:Nosubmit==false? mainColor:'#D4D4D4',
						height: '80rpx',
						color: '#FFF',
						fontSize: '14px'
					}"
				>
					<u-loading mode="circle" style="margin-right: 5px;" v-if="submitOrder"></u-loading>
					立即预约
				</u-button>
			</view>
		</view>	
		<payCom v-if="payBtn" :payInfo="payInfo" @closePay="closePay"></payCom>
		<u-popup v-model="payExit" mode="center" :mask-close-able="false">
			<view style="background:#fff;width:500rpx">
				<view style="padding:10px 0 0 10px">提交失败</view>
				<view style="text-align:center;padding-bottom:40rpx">
					<view style="margin:80rpx 0">支付取消</view>
					<span @click="exitPay" style="padding:10rpx 50rpx;color:#fff;background:#19be6b;border-radius: 12px;">确定</span>
				</view>
			</view>
		</u-popup>
		<u-popup v-model="detailsshow" mode="center" :mask-close-able="false" length="90%">
			<view style="background:#fff;width:100%;border-radius: 6px;overflow: hidden;">
				<image mode="aspectFill" style="width: 100%;height: 189px;" :src="goods.cover_pic" ></image>
				<view style="width: 100%;padding: 15px;border-bottom: 1px solid #E2E2E2;">
					<view style="font-size: 18px;color: #000000;margin-bottom: 15px;">{{goods.name}}</view>
					<view :style="{'color':mainColor,'font-size':'12px'}">￥<text style="font-size: 20px;">{{goods.price}}</text></view>
				</view>
				<view style="width: 100%;height: 30px;line-height: 30px;padding-left: 15px;font-size: 13px;color: #1B1D1E;font-weight: bold;">
					项目简介
				</view>
				<view style="width: 100%;padding:0 15px 15px;max-height: 75px;overflow: hidden;" >
					<h-parse :content="detailContent" @navigate="clickDescription"></h-parse>
				</view>
				<view class="pobtn">
					<view class="pobtn-item" :style="{'background':mainColor}" @click="goodsdetails">
						查看详情
					</view>
					<view class="pobtn-item" @click="detailsshow=false" :style="{'color':mainColor,'border':'1px solid '+mainColor}">
						关闭
					</view>
				</view>
				
			</view>
		</u-popup>
		<u-popup v-model="show" mode="bottom" border-radius="16">
			<view class="popupBox">
				<view class="popup_top">
					<view></view>
					<Text>付款方式</Text>
					<u-icon name="cross" color='#9F9F9F' @click='show=false' size="40"></u-icon>
				</view>
				<view class="txtype">
					<view class="typeitem" v-for="(item, index) in paymentList" :key="index">
						<Text>{{item.name}}</Text>
						<u-radio-group v-model="PaymentWay">
							<u-radio  :active-color="mainColor" shape="circle" :name="item.Id" @change="radioChange(item)">
							</u-radio>
						</u-radio-group>
					</view>
				</view>
			</view>
		</u-popup>
		<packagecart v-if="courseList.length > 0 && showCourse" :list="courseList" :current="Use_Education_Id" @close="closeCourseHandler"></packagecart>
	</view>
</template>

<script>
	import payCom from '@/components/pay/pay';
	import hParse from "@/components/u-parse/parse.vue";
	import packagecart from '@/components/coupon/packagecart.vue';
	export default {
		components: {
			payCom,
			hParse,
			packagecart,
		},
		data() {
			return {
				pageTitle: "预约",
				mainColor: "",
				show: false,
				loading: true,
				submitOrder:false,
				payExit: false,
				payBtn: false,
				detailsshow:false,
				id:0,
				detailContent: "",
				goods:{},
				lineCate:[],
				OfflineGoods:[],
				categoryIds:0,
				GoodsId:0,
				dayList:[],
				timeList:[],
				designerList:[],
				selectDay:'',
				selecttime:'',
				selectdesigner:0,
				value:1,
				remarks:'',
				Mobile:'',
				payInfo: {
					OpenId: 'ow_7I5XC1-RGwwk8QANBmWKYKmOc',
					OrderId: '',
					OrderPayType: 1,
					GoodsName: '',
					successType:1,//是从线下服务跳转过去
				},
				courseList:[],
				showCourse:false,
				Use_Education_Id:0,
				Nosubmit:true,
				Income:0,
				EduCationMoney:0,
				servicePersionId:0,
				paymentList:[],//付款方式的选择
				
				payname:'线下付款',
				PaymentWay:0,
			};
		},
		
		onLoad(option) {
			this.mainColor = this.$uiConfig.mainColor;
			if(option && option.id){
				this.id = option.id
				this.getAppllCate()//获取分类
			}else{//如果没传门店过来取缓存里的
				this.id = uni.getStorageSync("storeId")?uni.getStorageSync("storeId").storeId:0;
			}
			if(option && option.GoodsId){
				this.GoodsId = option.GoodsId
				this.GetApplOGInfo()//商品详情
			}
			if(option && option.servicePersionId){
				this.servicePersionId = option.servicePersionId
			}
			this.payInfo.OpenId=uni.getStorageSync('mall_UserInfo').OpenId;
			
		},
		mounted() {
			uni.setNavigationBarTitle({
				title: this.pageTitle,
			});
			
			
		},
		methods: {
			
			getAppllCate(){
				uni.showLoading({
					title: '加载中'
				});
				this.request2({
						url: '/api/AppletGoods/GetAppletOfflineCate',
						data: {}
					},
					res => {
						if (res.resultCode == 1) {
							this.lineCate = res.data
							this.categoryIds = this.lineCate[0].Id;
							this.GetAppOGList()
						}
						uni.hideLoading();
					}
				);
			},
			closeCourseHandler(e) {//套餐卡返回
			console.log(e)
				if (e != -1) {
					this.Use_Education_Id = e;
					this.Income = 0;
					this.EduCationMoney = this.goods.price*this.value
					// this.courseList.forEach(x=>{
					// 	if(x.id == e){
					// 		this.EduCationMoney = x.discount_limit
					// 	}
					// })
				}
				this.showCourse = false;	
			},
			showCourseHandler(){
				this.showCourse = true;
			},
			GetAppOGList(){
				this.Nosubmit = true;
				uni.showLoading({
					title: '加载中'
				});
				this.request2({
						url: '/api/AppletGoods/GetAppletOfflineGoodsList',
						data: {categoryIds:this.categoryIds,StoreId: this.id}
					},
					res => {
							this.OfflineGoods = res.data;					
							this.GoodsId= 0;
							this.dayList=[];
							this.timeList=[];
							this.designerList=[];
							this.Use_Education_Id=0;
							if(this.OfflineGoods.length>0){
								this.GoodsId = this.OfflineGoods[0].id;
								this.GetApplOGInfo()
								
							}
						uni.hideLoading();
					}
				);
			},
			schoolCoupon(){
				let ProductList = [];
				let obj = {
					GoodsClassId: this.goods.categoryIdList,
					GoodsPrice: (this.goods && this.goods.price ? this.goods.price:0)*this.value,
					ProductId: this.goods.id,
					
				};
				ProductList.push(obj);
				//获取套餐卡的处理
				this.Use_Education_Id=0,
				this.Income =this.PaymentWay==5?this.goods.depositMoney: this.goods.price;
				this.EduCationMoney= 0;
				
				this.request2({
						url: '/api/AppletStores/GetNoUseCouponList',
						data: {ProductList: ProductList,StoreId:this.id,}
					},
					res => {
						
						if (res.resultCode == 1) {
							this.courseList = res.data
						}
					}
				);
			},
			GetApplOGInfo(){
				
				uni.showLoading({
					title: '加载中',
				});
				this.request2({
						url: '/api/AppletGoods/GetAppletOfflineGoodsInfo',
						data: {GoodsId:this.GoodsId,StoreId: this.id,servicePersionId:this.servicePersionId}
					},
					res => {
						uni.hideLoading();
						if (res.resultCode == 1&& res.data!=null) {
							if(res.data && res.data.goods){
								this.goods = res.data.goods;
								this.payInfo.GoodsName = this.goods.name.slice(0,10);
								this.dayList = res.data.goods.storeDateList;
								this.selectDay= this.dayList[0].DayDateStr;
								this.timeList = this.dayList[0].TimeList;
								this.selecttime= this.timeList[0];
								
								
								this.getServerpersionListInfo()
								var richtext = this.goods.detail;
								this.detailContent = richtext;
								
								let set = uni.getStorageSync("basedata") ? uni.getStorageSync("basedata").mall.offlineServiceSetting.offlineServicePayType : [];
								if(set.length>0){
									this.paymentList=[]
									set.forEach(x=>{
										if(x==1){
											//data有默认值 这里不做处理
											let obj = {name:'线下付款',Id:4};
											this.paymentList.push(obj)
										}else if(x==2){
											let obj
											if(this.goods.depositMoney>0){//预定金额大于0
												obj =[{name:'预付定金',Id:5},{name:'线上付款',Id:1}]
												
											}else{
												obj =[{name:'线上付款',Id:1}]
											}
											this.paymentList= this.paymentList.concat(obj)
											
										}
									})
								}
								this.payname = this.paymentList[0].name;
								this.PaymentWay = this.paymentList[0].Id;
								
								this.schoolCoupon();//获取套餐卡
								this.Nosubmit = false;
							}
						}
						
					}
				);
			},
			getServerpersionListInfo(){
				uni.showLoading({
					title: '加载中',
				});
				this.request2({
						url: '/api/AppletGoods/GetServerpersionListInfo',
						data: {GoodsId:this.GoodsId,StoreId: this.id,servicePersionId:this.servicePersionId,chooseDate:this.selectDay}
					},
					res => {
						uni.hideLoading();
						if (res.resultCode == 1&& res.data!=null) {
							if(res.data && res.data.persionList){
								this.designerList = res.data.persionList
								let obj = {
									ServiceLogo:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/timeisup.png',
									Name:'到点分配',
									ServiceId:0,
								}
								this.designerList.unshift(obj)
								this.selectdesigner= this.designerList[0].ServiceId;
								this.Nosubmit = false;
							}
						}
						
					}
				);
			},
			submitOrderHandler(){//提交订单
				let that = this;
				if(that.Mobile==''){
					uni.showToast({
						title:'填写手机号码',
						icon: 'none' 
					})
					return false
				}
				this.submitOrder = true;
				uni.requestSubscribeMessage({
					tmplIds: that.goods.template_message_list,
					complete(res) {
						let form = {};
						form.GoodsId = that.goods.id;
						form.StoresId = that.id;
						form.Mobile = that.Mobile;
						form.Income = that.PaymentWay!=4?that.Income*that.value:0;
						form.Remark = that.remarks;
						form.PaymentWay = that.PaymentWay;//付款方式
						form.Use_Education_Id = that.Use_Education_Id;//优惠券id
						form.EduCationMoney =  that.EduCationMoney;
						form.User_Coupon_Id= 0;
						form.CouponMoney= 0;
						form.DetailList = [];
						let obj={
							GoodsId:that.goods.id,
							ServicepersonalId:that.selectdesigner,
							ServiceDate:that.selectDay,
							ServiceTime:that.selecttime,
							Number: that.value
						}
						form.DetailList.push(obj)
						that.request2(
							{
								url: '/api/AppletOrder/SetAppletOfflineGoodsOrderInfo',
								data: form
							},
							res => {
								if (res.resultCode == 1 ) {
									if(form.Income>0 && that.PaymentWay!=4){
										that.submitOrder = false;
										that.payBtn = true;
										that.payInfo.OrderId = res.data.OrderId;
										that.payInfo.total_price = form.Income;
									}else{
										uni.showToast({
											title: '交易成功',
											icon: 'none',
											duration: 2000
										});
										setTimeout(()=>{
											uni.redirectTo({ url: '/pages/reserve/personal/orderDetails?id='+res.data.OrderId})
										},1000)
									}
									
								}
								else{
									that.$refs.uToast.show({
										title: res.message,
										type: 'warning'
									});
								}
								
							}
						);
					
					}
				});
			},
		
			switchitem(item){//选中分类的操作
				this.categoryIds = item.Id;
				this.GetAppOGList()
			},
			getgoodsList(item){//选中商品的操作
				if(item.id ==this.GoodsId){
					this.detailsshow = true
				}else{
					this.GoodsId = item.id;
					this.GetApplOGInfo()
				}
			
			},
			btnday(item,i){//选中日期的操作
				this.selectDay = item.DayDateStr;
				this.timeList = this.dayList[i].TimeList;
				this.selecttime= this.timeList[0];
				this.getServerpersionListInfo()
			},
			btntime(item){
				this.selecttime = item;
			},
			getdesigner(item){//设计师
				this.selectdesigner = item.ServiceId
			},
			valChange(e){
				this.value = e.value;
				this.schoolCoupon();//获取套餐卡
				console.log(e)
			},
			closePay() {
				this.payBtn = false;
				this.payExit = true;
			},
			exitPay() {
				this.payExit = false;
				uni.redirectTo({
				  url: "/pages/reserve/personal/orderlist?status=0",
				});
			},
			clickDescription(e){
				
			},
			goodsdetails(){//商品详情
				
				uni.navigateTo({ url: "/pages/reserve/goodsDetails?GoodsId=" + this.goods.id });
			},
			radioChange(item) {
				this.payname=item.name;
				this.PaymentWay=item.Id;
				this.Income =this.PaymentWay==5?this.goods.depositMoney: this.goods.price;
				this.show = false;
			},
		},
	};
</script>


