Преглед изворни кода

vr,场地,课表列表待完善

学习?学个屁 пре 11 часа
родитељ
комит
f8b7b01dd9

+ 279 - 270
src/pages/index/detail/index.vue

@@ -2,44 +2,47 @@
 	<zzx-navbar :scrollable="true" :back="true" title="详情"></zzx-navbar>
 	<view class="detail-header">
 		<image class="header-bg" :src="bannerList[0]" mode=""></image>
-		<view class="back-icon" :style="{paddingTop:(statusBarHeight+10)+'px'}" @click="RouterUtils.back()">
+		<view class="back-icon" :style="{ paddingTop: (statusBarHeight + 10) + 'px' }" @click="RouterUtils.back()">
 			<zzx-icon name="back"></zzx-icon>
 		</view>
-		<view :style="{height:(statusBarHeight+70)+'px'}"></view>
+		<view :style="{ height: (statusBarHeight + 70) + 'px' }"></view>
 		<scroll-view class="header-swiper content" scroll-x="true" :show-scrollbar="false">
 			<view class="swiper-inner">
-				<block  v-if="detailInfo.video">
-					<video v-for="(item,index) in videoList" :key="index" :src="item"></video>
+				<block v-if="detailInfo.video">
+					<video v-for="(item, index) in videoList" :key="index" :src="item"></video>
 				</block>
 				<!-- <view class="swiper-image-box"> -->
-				<image @click="_previewImage(bannerList)" v-for="(item,index) in bannerList" :key="index" :src="item" mode=""></image>
+				<image @click="_previewImage(bannerList)" v-for="(item, index) in bannerList" :key="index" :src="item"
+					mode=""></image>
 				<!-- </view> -->
 			</view>
 		</scroll-view>
 	</view>
-	<view :style="{height:(statusBarHeight+34)+'px'}"></view>
+	<view :style="{ height: (statusBarHeight + 34) + 'px' }"></view>
 	<view class="header-info">
 		<view class="venue-name">
 			<view style="display: flex;gap: 20rpx;align-items: center;">
-				<view class="name">{{detailInfo.name}}</view>
-				<view class="open-status">{{detailInfo.runStatus?'开放中':'歇业中'}}</view>
+				<view class="name">{{ detailInfo.name }}</view>
+				<view class="open-status">{{ detailInfo.runStatus ? '开放中' : '歇业中' }}</view>
 			</view>
 			<view class="star">
 				<zzx-icon name="star" size="12"></zzx-icon>
-				<text>{{detailInfo.goodRate}}</text>
+				<text>{{ detailInfo.goodRate }}</text>
 			</view>
 		</view>
 		<view class="open-time">
 			<view class="time" v-if="teachingDay">
-				<view>教学日 <text style="margin-right: 14rpx;" v-for="(item,index) in teachingDay.data" :key="index">{{item.startTime+'-'+item.endTime||'--'}}</text></view>
-				<view class="">非教学日 <text style="margin-right: 14rpx;" v-for="(item,index) in noTeachingDay.data" :key="index">{{item.startTime+'-'+item.endTime||'--'}}</text></view>
+				<view>教学日 <text style="margin-right: 14rpx;" v-for="(item, index) in teachingDay.data"
+						:key="index">{{ item.startTime + '-' + item.endTime || '--' }}</text></view>
+				<view class="">非教学日 <text style="margin-right: 14rpx;" v-for="(item, index) in noTeachingDay.data"
+						:key="index">{{ item.startTime + '-' + item.endTime || '--' }}</text></view>
 			</view>
 		</view>
 		<view class="venues-tags">
 			<view class="tags-box">
-				<view class="tags" v-for="(item,index) in detailInfo.facilityInfo" :key="index">{{item}}</view>
+				<view class="tags" v-for="(item, index) in detailInfo.facilityInfo" :key="index">{{ item }}</view>
 			</view>
-<!-- 			<view class="more-info" @click="RouterUtils.to_page(`/pages/index/basisInfo/index`)">
+			<!-- 			<view class="more-info" @click="RouterUtils.to_page(`/pages/index/basisInfo/index`)">
 				<text>信息/设备设施</text>
 				<zzx-icon name="ashRight" size="10"></zzx-icon>
 			</view> -->
@@ -47,7 +50,7 @@
 		<view class="venues-address">
 			<view class="address">
 				<zzx-icon name="location" size="14"></zzx-icon>
-				<text>{{detailInfo.address}}</text>
+				<text>{{ detailInfo.address }}</text>
 			</view>
 			<view class="nav-phone">
 				<view class="nav" @click="openMap">
@@ -64,20 +67,20 @@
 	<view class="content">
 		<uv-sticky offset-top="74">
 			<view class="detail-select">
-				<view :class="sel_index===index?'select-text':'notsel-text'" v-for="(item,index) in selectList"
+				<view :class="sel_index === index ? 'select-text' : 'notsel-text'" v-for="(item, index) in selectList"
 					:key="index" @click="sel_tab(index)">
-					<text>{{item}}</text>
+					<text>{{ item }}</text>
 				</view>
 			</view>
 		</uv-sticky>
-		<view class="toggle" v-if="sel_index===0">
+		<view class="toggle" v-if="sel_index === 0">
 			<venue :listData="detailInfo.placeInfoMsgVO" />
-			<zs-empty v-if="detailInfo.placeInfoMsgVO.length<1"></zs-empty>
+			<zs-empty v-if="detailInfo.placeInfoMsgVO.length < 1"></zs-empty>
 		</view>
-		<view class="toggle" v-else-if="sel_index===1">
-			<course :selectList="allCategoryList" :listData="courseList" :laoding="courseLoading"  @change="onchange" />
+		<view class="toggle" v-else-if="sel_index === 1">
+			<course :selectList="allCategoryList" :listData="courseList" :laoding="courseLoading" @change="onchange" />
 		</view>
-		<view class="toggle" v-else-if="sel_index===2">
+		<view class="toggle" v-else-if="sel_index === 2">
 			<instructor :instrctorList="detailInfo.instructorVOList" />
 		</view>
 		<view class="toggle" v-else>
@@ -87,300 +90,306 @@
 </template>
 
 <script lang="ts" setup>
-	import { ref, onMounted } from 'vue';
-	import { RouterUtils,_previewImage } from '@/utils/util';
-	import { http } from '@/utils/http'
-	import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
-	import zsEmpty from '@/components/zs-empty/index.vue'
-	import venue from './components/venue.vue';
-	import course from './components/course.vue';
-	import instructor from './components/instructor.vue';
-	import appraise from './components/appraise.vue';
-	import { onLoad, onPageScroll } from '@dcloudio/uni-app';
-	const statusBarHeight = ref(0);
-	const selectList = ref(['场地', '课程', '教练', '评价']);
-	const sel_index = ref(0);
-	onLoad((option) => {
-		listId.value = option.id
-		get_navheight()
-	})
-	onMounted(() => {
-		get_placeInfo()
-		get_allCategory()
+import { ref, onMounted } from 'vue';
+import { RouterUtils, _previewImage } from '@/utils/util';
+import { http } from '@/utils/http'
+import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
+import zsEmpty from '@/components/zs-empty/index.vue'
+import venue from './components/venue.vue';
+import course from './components/course.vue';
+import instructor from './components/instructor.vue';
+import appraise from './components/appraise.vue';
+import { onLoad, onPageScroll } from '@dcloudio/uni-app';
+import { useCacheStore } from '@/stores/cache'
+const cache = useCacheStore()
+const statusBarHeight = ref(0);
+const selectList = ref(['场地', '课程', '教练', '评价']);
+const sel_index = ref(0);
+onLoad((option) => {
+	listId.value = option.id
+	get_navheight()
+})
+onMounted(() => {
+	get_placeInfo()
+	get_allCategory()
+})
+const get_navheight = () => {
+	const systemInfo = uni.getSystemInfoSync();
+	statusBarHeight.value = systemInfo.statusBarHeight || 0;
+}
+
+const sel_tab = (i) => {
+	sel_index.value = i
+}
+
+const listId = ref(0);
+const detailInfo = ref({})
+const bannerList = ref([])
+const videoList = ref([])
+const noTeachingDay = ref()
+const teachingDay = ref()
+const get_placeInfo = () => {
+	http.get('/detail/getPlaceInfo', { data: { id: listId.value }, loading: true }).then((res) => {
+		const startIndex = res.result.cover ? res.result.cover.indexOf('"') + 1 : '0';
+		const endIndex = res.result.cover ? res.result.cover.lastIndexOf('') : '0';
+		bannerList.value = res.result.cover ? res.result.cover.slice(startIndex, endIndex).split(',') : [];
+		let videoIndex = res.result.video ? res.result.video.indexOf('"') + 1 : '0';
+		let videoEndIndex = res.result.video ? res.result.video.lastIndexOf('') : '0';
+		videoList.value = res.result.video ? res.result.video.slice(videoIndex, videoEndIndex).split(',') : [];
+		detailInfo.value = res.result
+		noTeachingDay.value = JSON.parse(res.result.noTeachingDay)
+		teachingDay.value = JSON.parse(res.result.teachingDay)
 	})
-	const get_navheight = () => {
-		const systemInfo = uni.getSystemInfoSync();
-		statusBarHeight.value = systemInfo.statusBarHeight || 0;
-	}
+}
 
-	const sel_tab = (i) => {
-		sel_index.value = i
-	}
+const openphone = () => {
+	uni.makePhoneCall({
+		phoneNumber: detailInfo.value.phone
+	});
+}
 
-	const listId = ref(0);
-	const detailInfo = ref({})
-	const bannerList = ref([])
-	const videoList = ref([])
-	const noTeachingDay=ref()
-	const teachingDay=ref()
-	const get_placeInfo = () => {
-		http.get('/detail/getPlaceInfo', { data: { id: listId.value }, loading: true }).then((res) => {
-			const startIndex = res.result.cover?res.result.cover.indexOf('"') + 1:'0';
-			const endIndex = res.result.cover?res.result.cover.lastIndexOf(''):'0';
-			bannerList.value = res.result.cover?res.result.cover.slice(startIndex, endIndex).split(','):[];
-			let videoIndex = res.result.video?res.result.video.indexOf('"') + 1:'0';
-			let videoEndIndex = res.result.video?res.result.video.lastIndexOf(''):'0';
-			videoList.value = res.result.video?res.result.video.slice(videoIndex, videoEndIndex).split(','):[];
-			detailInfo.value = res.result
-			noTeachingDay.value=JSON.parse(res.result.noTeachingDay)
-			teachingDay.value=JSON.parse(res.result.teachingDay)
-		})
-	}
+const openMap = () => {
+	uni.openLocation({
+		latitude: detailInfo.value.latitude,
+		longitude: detailInfo.value.longitude,
+		name: detailInfo.value.name,
+		address: detailInfo.value.address,
+		success: function () {
+			console.log('success');
+		}
+	});
+}
+
+
+// 课程分类
+const allCategoryList = ref([])
+const categoryId = ref()
+const get_allCategory = () => {
+	http.get('/detail/getAllCategory', { data: { id: listId.value } }).then((res) => {
+		categoryId.value = res.result[0].id
+		allCategoryList.value = res.result
+		get_courseList(categoryId.value)
+	})
+}
+const onchange = (e) => {
+	get_courseList(e.id)
+}
+// 课程列表
+const courseList = ref([])
+const get_courseList = (categoryId) => {
+	http.get('/detail/courseInfoVOList', { data: { categoryId: categoryId, id: listId.value, longitude:cache.get('LON'), latitude:cache.get('LAT') }, loading: true }).then((res) => {
+		courseList.value = res.result
+	})
+}
 
-	const openphone = () => {
-		uni.makePhoneCall({
-			phoneNumber: detailInfo.value.phone
-		});
-	}
-	
-	const openMap=()=>{
-		uni.openLocation({
-			latitude: detailInfo.value.latitude,
-			longitude: detailInfo.value.longitude,
-			name: detailInfo.value.name,
-			address: detailInfo.value.address,
-			success: function () {
-				console.log('success');
-			}
-		});
-	}
-	
-	
-	// 课程分类
-	const allCategoryList=ref([])
-	const categoryId=ref()
-	const get_allCategory=()=>{
-		http.get('/detail/getAllCategory', { data: { id: listId.value}}).then((res)=>{
-			categoryId.value=res.result[0].id
-			allCategoryList.value=res.result
-			get_courseList(categoryId.value)
-		})
-	}
-	const onchange=(e)=>{
-		get_courseList(e.id)
-	}
-	// 课程列表
-	const courseList=ref([])
-	const get_courseList=(categoryId)=>{
-		http.get('/detail/courseInfoVOList',{data:{categoryId:categoryId,id:listId.value},loading:true}).then((res)=>{
-			courseList.value=res.result
-		})
-	}
-	
 </script>
 
 <style lang="less" scoped>
-	.detail-header {
-		position: relative;
+.detail-header {
+	position: relative;
 
-		.header-bg {
-			position: absolute;
-			width: 100%;
-			height: 432rpx;
-			z-index: -100;
-		}
+	.header-bg {
+		position: absolute;
+		width: 100%;
+		height: 432rpx;
+		z-index: -100;
+	}
+
+	.back-icon {
+		position: absolute;
+		left: 20rpx;
+		z-index: 9999;
+	}
 
-		.back-icon {
-			position: absolute;
-			left: 20rpx;
-			z-index: 9999;
+	.header-swiper {
+		position: absolute;
+		width: 740rpx;
+		white-space: nowrap;
+		overflow: hidden;
+
+		/* 隐藏滚动条 */
+		/deep/ ::-webkit-scrollbar {
+			display: none;
+			width: 0 !important;
+			height: 0 !important;
+			background: transparent;
 		}
 
-		.header-swiper {
-			position: absolute;
-			width: 740rpx;
-			white-space: nowrap;
-			overflow: hidden;
-
-			/* 隐藏滚动条 */
-			/deep/ ::-webkit-scrollbar {
-				display: none;
-				width: 0 !important;
-				height: 0 !important;
-				background: transparent;
-			}
+		.swiper-inner {
+			display: inline-flex;
+			align-items: center;
+			gap: 14rpx;
+			height: 100%;
 
-			.swiper-inner {
-				display: inline-flex;
-				align-items: center;
-				gap: 14rpx;
-				height: 100%;
-
-				&>video ,&>image {
-					width: 220rpx;
-					height: 126rpx;
-					border-radius: 16rpx;
-					flex-shrink: 0;
-				}
+			&>video,
+			&>image {
+				width: 220rpx;
+				height: 126rpx;
+				border-radius: 16rpx;
+				flex-shrink: 0;
 			}
 		}
 	}
+}
 
-	.header-info {
-		padding: 20rpx;
-		background: #FFFFFF;
-		border-radius: 16rpx 16rpx 0rpx 0rpx;
+.header-info {
+	padding: 20rpx;
+	background: #FFFFFF;
+	border-radius: 16rpx 16rpx 0rpx 0rpx;
 
-		.venue-name {
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-
-			.open-status {
-				width: 100rpx;
-				font-size: 24rpx;
-				color: #4DD951;
-			}
-			.name {
-				font-weight: 800;
-				font-size: 32rpx;
-				color: #222222;
-			}
+	.venue-name {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
 
-			.star {
-				display: flex;
-				align-items: center;
-				gap: 10rpx;
-				font-size: 28rpx;
-				color: #FDD143;
-			}
+		.open-status {
+			width: 100rpx;
+			font-size: 24rpx;
+			color: #4DD951;
 		}
 
-		.open-time {
-			margin-top: 20rpx;
-			.time {
-				font-size: 24rpx;
-				color: #AAAAAA;
-				&>view{
-					margin-top: 20rpx;
-				}
-			}
+		.name {
+			font-weight: 800;
+			font-size: 32rpx;
+			color: #222222;
 		}
 
-		.venues-tags {
+		.star {
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
-			margin-top: 20rpx;
-
-			.tags-box {
-				display: flex;
-				flex-wrap: wrap;
-				gap: 10rpx;
-
-				.tags {
-					padding: 8rpx 16rpx;
-					font-size: 24rpx;
-					color: #222222;
-					background: #F5F5F5;
-					border-radius: 8rpx;
-				}
-			}
+			gap: 10rpx;
+			font-size: 28rpx;
+			color: #FDD143;
+		}
+	}
 
-			.more-info {
-				display: flex;
-				align-items: center;
-				font-size: 24rpx;
-				gap: 6rpx;
-				color: #AAAAAA;
+	.open-time {
+		margin-top: 20rpx;
+
+		.time {
+			font-size: 24rpx;
+			color: #AAAAAA;
+
+			&>view {
+				margin-top: 20rpx;
 			}
 		}
+	}
 
-		.venues-address {
+	.venues-tags {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		margin-top: 20rpx;
+
+		.tags-box {
 			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			margin-top: 20rpx;
-			background: #F9F9F9;
-			border-radius: 16rpx;
-			padding: 20rpx;
-
-			.address {
-				display: flex;
-				align-items: center;
-				gap: 10rpx;
-				font-weight: bold;
+			flex-wrap: wrap;
+			gap: 10rpx;
+
+			.tags {
+				padding: 8rpx 16rpx;
 				font-size: 24rpx;
 				color: #222222;
+				background: #F5F5F5;
+				border-radius: 8rpx;
 			}
+		}
 
-			.nav-phone {
-				display: flex;
-				align-items: center;
-				gap: 20rpx;
-				text-align: center;
-
-				.nav,
-				.phone {
-					font-size: 22rpx;
-					color: #222222;
-				}
-			}
+		.more-info {
+			display: flex;
+			align-items: center;
+			font-size: 24rpx;
+			gap: 6rpx;
+			color: #AAAAAA;
 		}
 	}
 
-	.detail-select {
+	.venues-address {
 		display: flex;
 		align-items: center;
-		gap: 60rpx;
+		justify-content: space-between;
 		margin-top: 20rpx;
-		height: 80rpx;
-		background-color: #F6F6F6;
-
-		.select-text,
-		.notsel-text {
-			position: relative;
-			transition: all 0.3s ease;
-		}
+		background: #F9F9F9;
+		border-radius: 16rpx;
+		padding: 20rpx;
 
-		.select-text {
-			font-weight: 800;
-			font-size: 32rpx;
+		.address {
+			display: flex;
+			align-items: center;
+			gap: 10rpx;
+			font-weight: bold;
+			font-size: 24rpx;
 			color: #222222;
-			position: relative;
 		}
 
-		.notsel-text {
-			font-size: 32rpx;
-			color: #AAAAAA;
-		}
+		.nav-phone {
+			display: flex;
+			align-items: center;
+			gap: 20rpx;
+			text-align: center;
 
-		.select-text::after {
-			position: absolute;
-			content: '';
-			width: 40rpx;
-			height: 20rpx;
-			background-color: #C8FF0C;
-			border-radius: 4rpx;
-			left: 050%;
-			transform: translateX(-50%);
-			bottom: -16rpx;
-			transition: all 0.3s ease;
-			opacity: 1;
+			.nav,
+			.phone {
+				font-size: 22rpx;
+				color: #222222;
+			}
 		}
+	}
+}
 
-		.notsel-text::after {
-			content: '';
-			position: absolute;
-			left: 50%;
-			bottom: -16rpx;
-			width: 0;
-			height: 20rpx;
-			background-color: #C8FF0C;
-			border-radius: 4rpx;
-			transform: translateX(-50%);
-			opacity: 0;
-			transition: all 0.3s ease;
-		}
+.detail-select {
+	display: flex;
+	align-items: center;
+	gap: 60rpx;
+	margin-top: 20rpx;
+	height: 80rpx;
+	background-color: #F6F6F6;
+
+	.select-text,
+	.notsel-text {
+		position: relative;
+		transition: all 0.3s ease;
+	}
+
+	.select-text {
+		font-weight: 800;
+		font-size: 32rpx;
+		color: #222222;
+		position: relative;
+	}
+
+	.notsel-text {
+		font-size: 32rpx;
+		color: #AAAAAA;
+	}
+
+	.select-text::after {
+		position: absolute;
+		content: '';
+		width: 40rpx;
+		height: 20rpx;
+		background-color: #C8FF0C;
+		border-radius: 4rpx;
+		left: 050%;
+		transform: translateX(-50%);
+		bottom: -16rpx;
+		transition: all 0.3s ease;
+		opacity: 1;
+	}
+
+	.notsel-text::after {
+		content: '';
+		position: absolute;
+		left: 50%;
+		bottom: -16rpx;
+		width: 0;
+		height: 20rpx;
+		background-color: #C8FF0C;
+		border-radius: 4rpx;
+		transform: translateX(-50%);
+		opacity: 0;
+		transition: all 0.3s ease;
 	}
+}
 </style>

+ 446 - 423
src/pages/index/gymDetail/components/popup.vue

@@ -1,15 +1,15 @@
 <template>
 	<uni-popup ref="selectPopup" :safe-area="false" type="bottom">
-		<view class="header-text">开场前{{listData.earlyRefundTime||'--'}}分钟随时退</view>
+		<view class="header-text">开场前{{ listData.earlyRefundTime || '--' }}分钟随时退</view>
 		<view class="select-popup">
 			<view class="pop-title">选择场次</view>
 			<view class="pop-date-list">
 				<scroll-view scroll-x="true" class="scroll-view_H">
-					<view class="scroll-view-item" v-for="(item,index) in listData.stadiumConcertsVOList" :key="index"
-						@click="sel_tab(item,index)">
-						<view class="today-time">{{item.weekDayAndDate}}</view>
-						<view class="num">{{item.noDayConcertsReservationNum||'0'}}场可订</view>
-						<view class="line" v-if="deteObj==index"></view>
+					<view class="scroll-view-item" v-for="(item, index) in listData.stadiumConcertsVOList" :key="index"
+						@click="sel_tab(item, index)">
+						<view class="today-time">{{ item.weekDayAndDate }}</view>
+						<view class="num">{{ item.noDayConcertsReservationNum || '0' }}场可订</view>
+						<view class="line" v-if="deteObj == index"></view>
 					</view>
 				</scroll-view>
 			</view>
@@ -17,35 +17,38 @@
 				<view class="time-list">
 					<view class="time-title">时间段</view>
 					<block
-						v-for="(concert,index) in listData.stadiumConcertsVOList[0].concertsVOList[0].concertsDetailsVOList"
+						v-for="(concert, index) in listData.stadiumConcertsVOList[0].concertsVOList[0].concertsDetailsVOList"
 						:key="index">
-						<view class="item-time">{{concert.startTime}}-{{concert.endTime}}</view>
+						<view class="item-time">{{ concert.startTime }}-{{ concert.endTime }}</view>
 					</block>
 				</view>
 				<view class="table-list">
 					<scroll-view scroll-x="true" class="table-scroll">
-						<view class="father-list" v-for="(conc,index) in itemList" :key="index"
+						<view class="father-list" v-for="(conc, index) in itemList" :key="index"
 							style="vertical-align: top;">
-							<view class="father-title">{{conc.sitePlaceName}}</view>
-							<view class="children-list" v-for="(concert,index) in conc.concertsDetailsVOList"
+							<view class="father-title">{{ conc.sitePlaceName }}</view>
+							<view class="children-list" v-for="(concert, index) in conc.concertsDetailsVOList"
 								:key="index">
 								<view class="item-card" :class="{ selected: isSelected(concert) }"
-									@click="selectItem(conc, concert)">
-									¥{{concert.price}}
+									@click="selectItem(conc, concert)" v-if="concert.concertStatus==0">
+									¥{{ concert.price }}
+								</view>
+								<view class="item-card" style="color: #AAA;" v-if="concert.concertStatus==1">
+									已选
 								</view>
 							</view>
 						</view>
 					</scroll-view>
 				</view>
 			</view>
-			<view class="select-list" v-if="selArr.length>0">
+			<view class="select-list" v-if="selArr.length > 0">
 				<view class="select-title">已选场次</view>
 				<scroll-view scroll-x="true" class="select-scroll">
-					<view class="item-list" v-for="(item,index) in selArr" :key="index">
+					<view class="item-list" v-for="(item, index) in selArr" :key="index">
 						<view class="list-box">
 							<view class="list-text">
-								<view class="">{{item.time}}</view>
-								<view class="">{{item.name}}</view>
+								<view class="">{{ item.time }}</view>
+								<view class="">{{ item.name }}</view>
 							</view>
 							<view @click="deleteSelarr(item)"> <zzx-icon name="cancel" size="12"></zzx-icon></view>
 						</view>
@@ -56,7 +59,7 @@
 			<view class="footer-submit">
 				<view class="f-price">
 					<view class="">总价</view>
-					<view class="">¥{{priceTotal.toFixed(2)}}</view>
+					<view class="">¥{{ priceTotal.toFixed(2) }}</view>
 				</view>
 				<view class="f-btn" @click="submit_order">
 					<button>提交订单</button>
@@ -66,42 +69,46 @@
 	</uni-popup>
 	<view v-if="isopenDetail">
 		<uni-popup ref="orderPopup" :safe-area="false" type="bottom">
-			<view class="header-text">开场前{{previewgymOrderDetail.earlyRefundTime||'--'}}分钟随时退</view>
+			<view class="header-text">开场前{{ previewgymOrderDetail.earlyRefundTime || '--' }}分钟随时退</view>
 			<view class="order-popup">
 				<view class="p-header-card">
 					<view class="p-school-info">
 						<zzx-icon name="pay-icon1" size="16"></zzx-icon>
-						<view class="name">{{previewgymOrderDetail.storeName}}</view>
+						<view class="name">{{ previewgymOrderDetail.storeName }}</view>
 					</view>
 					<view class="p-title">羽毛球场地预定</view>
 					<view class="p-preset">
-						<view class="preset-info" v-for="item in previewgymOrderDetail.timePeriod" :key="item.id">{{item.name}}</view>
+						<view class="preset-info" v-for="item in previewgymOrderDetail.timePeriod" :key="item.id">
+							{{ item.name }}</view>
 					</view>
 				</view>
 				<view class="p-price-card">
 					<view class="p-price">
-						<view class="text">商品总价(共{{previewgymOrderDetail.timePeriod.length}}场)</view>
-						<view class="price"><text class="mini-text">¥</text>{{previewgymOrderDetail.subtotal}}</view>
+						<view class="text">商品总价(共{{ previewgymOrderDetail.timePeriod.length }}场)</view>
+						<view class="price"><text class="mini-text">¥</text>{{ previewgymOrderDetail.subtotal }}</view>
 					</view>
 					<view class="p-subtotal">
 						<text>小计</text>
-						<view class="total-price"><text class="mini-text">¥</text>{{previewgymOrderDetail.totalPrice}}</view>
+						<view class="total-price"><text class="mini-text">¥</text>{{ previewgymOrderDetail.totalPrice }}
+						</view>
 					</view>
 				</view>
 				<view class="p-phone-card">
 					<view class="p-phone">
 						<view class="text">手机号码</view>
-						<view class="phone">{{phoneHide(previewgymOrderDetail.mobile)}}</view>
+						<view class="phone" v-if="previewgymOrderDetail.mobile">{{ previewgymOrderDetail.mobile ?
+							phoneHide(previewgymOrderDetail.mobile) : '' }}</view>
 					</view>
 					<view class="tips">请通话畅通,商家需要联系您确认到店时间</view>
 				</view>
 				<view class="p-rules-card">
 					<view class="p-title">退改规则</view>
-					<view class="p-text">每场开场前<text>{{previewgymOrderDetail.earlyRefundTime}}分钟</text>可随时退改,之后不可退款。如您有疑问,可联系场馆。</view>
+					<view class="p-text">
+						每场开场前<text>{{ previewgymOrderDetail.earlyRefundTime }}分钟</text>可随时退改,之后不可退款。如您有疑问,可联系场馆。</view>
 				</view>
 				<view class="p-rules-card">
 					<view class="p-title">温馨提示</view>
-					<view class="p-text">{{previewgymOrderDetail.reminder}}</view>
+					<view class="p-text">{{ previewgymOrderDetail.reminder }}</view>
 				</view>
 				<view class="p-remark">
 					<view class="title">备注</view>
@@ -109,8 +116,9 @@
 				</view>
 				<view style="height: 200rpx;"></view>
 				<view class="footer-pay">
-					<button hover-class="hover-style">
-						<view class="btn-price"><text class="mini-text">¥</text>{{previewgymOrderDetail.totalPrice}}</view>
+					<button hover-class="hover-style" @click="submitOrder">
+						<view class="btn-price"><text class="mini-text">¥</text>{{ previewgymOrderDetail.totalPrice }}
+						</view>
 						<view class="btn-text">立即支付</view>
 					</button>
 				</view>
@@ -120,509 +128,524 @@
 </template>
 
 <script lang="ts" setup>
-	import { ref,onMounted, computed } from 'vue';
-	import { http } from '@/utils/http'
-	import { TipsUtils,phoneHide } from '@/utils/util';
-	interface Props {
-		listData ?: any;
-		itemList ?: any;
-		deteObj?:any
-	}
-	const props = withDefaults(defineProps<Props>(), {
-		listData: [],
-		itemList: [],
-		deteObj:null
-	});
-	const selectPopup = ref();
-	const orderPopup = ref()
-	const sel_index = ref(0);
-	const time_list = ref([])
-	onMounted(()=>{
-		
-	})
-	const open = () => {
-		selectPopup.value.open()
-	}
-	defineExpose({
-		open
-	})
-	const emit = defineEmits(['change']);
-	const sel_tab = (e, i) => {
-		emit('change', e, i);
+import { ref, onMounted, computed, nextTick } from 'vue';
+import { http } from '@/utils/http'
+import { TipsUtils, phoneHide, RouterUtils } from '@/utils/util';
+interface Props {
+	listData?: any;
+	itemList?: any;
+	deteObj?: any
+}
+const props = withDefaults(defineProps<Props>(), {
+	listData: [],
+	itemList: [],
+	deteObj: null
+});
+const selectPopup = ref();
+const orderPopup = ref()
+const sel_index = ref(0);
+const time_list = ref([])
+onMounted(() => {
+
+})
+const open = () => {
+	selectPopup.value.open()
+}
+defineExpose({
+	open
+})
+const emit = defineEmits(['change']);
+const sel_tab = (e, i) => {
+	emit('change', e, i);
+}
+
+const selArr = ref([])
+const selectItem = (item1, item2) => {
+	const existingIndex = selArr.value.findIndex(item => item.id === item2.id);
+	if (existingIndex !== -1) {
+		selArr.value.splice(existingIndex, 1);
+	} else {
+		selArr.value.push({
+			name: item1.sitePlaceName,
+			time: item2.startTime + '-' + item2.endTime,
+			price: item2.price,
+			id: item2.id
+		});
 	}
-
-	const selArr = ref([])
-	const selectItem = (item1, item2) => {
-		const existingIndex = selArr.value.findIndex(item => item.id === item2.id);
-		if (existingIndex !== -1) {
-			selArr.value.splice(existingIndex, 1);
-		} else {
-			selArr.value.push({
-				name: item1.sitePlaceName,
-				time: item2.startTime + '-' + item2.endTime,
-				price: item2.price,
-				id: item2.id
-			});
-		}
-	}
-
-	const isSelected = (concert) => {
-		return selArr.value.some(item => item.id === concert.id);
+}
+
+const isSelected = (concert) => {
+	return selArr.value.some(item => item.id === concert.id);
+}
+
+const priceTotal = computed(() => {
+	return selArr.value.reduce((total, item) => {
+		return total + item.price
+	}, 0)
+})
+
+const deleteSelarr = (item) => {
+	const index = selArr.value.findIndex(selItem => selItem.id === item.id);
+	if (index !== -1) {
+		selArr.value.splice(index, 1);
 	}
+}
 
-	const priceTotal = computed(() => {
-		return selArr.value.reduce((total, item) => {
-			return total + item.price
-		}, 0)
-	})
-
-	const deleteSelarr = (item) => {
-		const index = selArr.value.findIndex(selItem => selItem.id === item.id);
-		if (index !== -1) {
-			selArr.value.splice(index, 1);
-		}
+const submit_order = () => {
+	if (selArr.value.length < 1) {
+		return TipsUtils.tips_toast('请选择场次')
 	}
-	
-	const submit_order = () => {
-		if(selArr.value.length<1){
-			return TipsUtils.tips_toast('请选择场次')
-		}
-		get_previewOrderPlaceGymnasiumChartered()
-	}
-	
-	const previewgymOrderDetail=ref()
-	const isopenDetail = ref(false)
-	const get_previewOrderPlaceGymnasiumChartered=()=>{
-		const result = selArr.value.map(item => item.id).join(',')
-		http.get('/order/previewOrderPlaceGymnasiumChartered',{data:{rulesId:result},loading:true}).then((res)=>{
-			previewgymOrderDetail.value=res.result
-			isopenDetail.value=true
-			setTimeout(()=>{
-				selectPopup.value.close()
-				orderPopup.value.open()
-			},500)
+	get_previewOrderPlaceGymnasiumChartered()
+}
+
+const previewgymOrderDetail = ref()
+const isopenDetail = ref(false)
+const get_previewOrderPlaceGymnasiumChartered = () => {
+	const result = selArr.value.map(item => item.id).join(',')
+	http.get('/order/previewOrderPlaceGymnasiumChartered', { data: { rulesId: result }, loading: true }).then((res) => {
+		previewgymOrderDetail.value = res.result
+		isopenDetail.value = true
+		orderFormData.value.productIds = res.result.timePeriod.map(item => item.id).join(',')
+		orderFormData.value.amount = res.result.timePeriod.length
+		nextTick(() => {
+			selectPopup.value.close()
+			orderPopup.value && orderPopup.value.open()
 		})
-	}
+	})
+}
+
+// 提交订单
+const orderFormData = ref({
+	type: 0,
+	orderType: 1,
+	productIds: null,
+	amount: null,
+})
+const submitOrder = () => {
+	http.post('/order/createOrder', orderFormData.value, { loading: true }).then((res) => {
+		RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${res.result.orderId}&orderType=0`)
+	})
+}
 </script>
 
 <style lang="less" scoped>
-	.header-text {
-		margin: auto;
-		background: linear-gradient(90deg, #C8FF0C 0%, rgba(100, 128, 6, 0) 100%);
-		border-radius: 60rpx;
-		width: 286rpx;
-		height: 54rpx;
-		text-align: center;
-		line-height: 54rpx;
-		font-size: 24rpx;
-		color: #FFFFFF;
-		margin-bottom: 20rpx;
+.header-text {
+	margin: auto;
+	background: linear-gradient(90deg, #C8FF0C 0%, rgba(100, 128, 6, 0) 100%);
+	border-radius: 60rpx;
+	width: 286rpx;
+	height: 54rpx;
+	text-align: center;
+	line-height: 54rpx;
+	font-size: 24rpx;
+	color: #FFFFFF;
+	margin-bottom: 20rpx;
+}
+
+.select-popup {
+	background: #F6F6F6;
+	border-radius: 32rpx 32rpx 0rpx 0rpx;
+	max-height: 1200rpx;
+	overflow: auto;
+
+	.pop-title {
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #222222;
+		padding: 20rpx;
 	}
 
-	.select-popup {
-		background: #F6F6F6;
-		border-radius: 32rpx 32rpx 0rpx 0rpx;
-		max-height: 1200rpx;
-		overflow: auto;
-
-		.pop-title {
-			font-weight: bold;
-			font-size: 28rpx;
-			color: #222222;
-			padding: 20rpx;
-		}
-
-		.pop-date-list {
-			border-bottom: 1rpx solid #F0F0F0;
-			background: #FFFFFF;
-			padding: 20rpx;
-			border-radius: 24rpx;
-
-			.scroll-view_H {
-				white-space: nowrap;
-				width: 100%;
-
-				.scroll-view-item {
-					display: inline-block;
-					text-align: center;
-					margin-right: 30rpx;
-
-					.today-time {
-						font-weight: bold;
-						font-size: 28rpx;
-						color: #222222;
-					}
-
-					.num {
-						margin-top: 8rpx;
-						font-size: 24rpx;
-						color: #AAAAAA;
-					}
-
-					.line {
-						margin: auto;
-						width: 50rpx;
-						height: 8rpx;
-						background: #C8FF0C;
-						transition: width 2s ease;
-					}
-				}
-			}
-		}
+	.pop-date-list {
+		border-bottom: 1rpx solid #F0F0F0;
+		background: #FFFFFF;
+		padding: 20rpx;
+		border-radius: 24rpx;
 
-		.gym-list {
-			display: flex;
-			background: #FFFFFF;
-			padding: 20rpx;
+		.scroll-view_H {
+			white-space: nowrap;
+			width: 100%;
 
-			.time-list {
-				width: 180rpx;
+			.scroll-view-item {
+				display: inline-block;
+				text-align: center;
+				margin-right: 30rpx;
 
-				.time-title {
-					height: 60rpx;
-					line-height: 60rpx;
-					text-align: center;
+				.today-time {
 					font-weight: bold;
-					font-size: 24rpx;
+					font-size: 28rpx;
 					color: #222222;
 				}
 
-				.item-time {
-					margin-bottom: 20rpx;
-					height: 54rpx;
+				.num {
+					margin-top: 8rpx;
 					font-size: 24rpx;
-					color: #222222;
-					line-height: 54rpx;
+					color: #AAAAAA;
 				}
-			}
-
-			.table-list {
-				width: 610rpx;
-
-				.table-scroll {
-					white-space: nowrap;
-					width: 100%;
-
-					.father-list {
-						display: inline-block;
-						margin-right: 20rpx;
-
-						.father-title {
-							height: 60rpx;
-							line-height: 60rpx;
-							text-align: center;
-							font-weight: bold;
-							font-size: 24rpx;
-							color: #222222;
-						}
 
-						.children-list {
-							margin-bottom: 20rpx;
-
-							.item-card {
-								width: 124rpx;
-								height: 54rpx;
-								background: #F6F6F6;
-								border-radius: 8rpx;
-								font-weight: bold;
-								font-size: 24rpx;
-								color: #222222;
-								text-align: center;
-								line-height: 54rpx;
-
-								&.selected {
-									background: #C8FF0C !important;
-								}
-							}
-						}
-					}
+				.line {
+					margin: auto;
+					width: 50rpx;
+					height: 8rpx;
+					background: #C8FF0C;
+					transition: width 2s ease;
 				}
-
 			}
 		}
+	}
 
-		.select-list {
-			padding: 20rpx;
+	.gym-list {
+		display: flex;
+		background: #FFFFFF;
+		padding: 20rpx;
 
-			.select-title {
+		.time-list {
+			width:180rpx;
+
+			.time-title {
+				height: 60rpx;
+				line-height: 60rpx;
+				text-align: center;
 				font-weight: bold;
-				font-size: 28rpx;
+				font-size: 24rpx;
+				color: #222222;
+			}
+
+			.item-time {
+				margin-bottom: 20rpx;
+				height: 54rpx;
+				font-size: 24rpx;
 				color: #222222;
+				line-height: 54rpx;
 			}
+		}
+
+		.table-list {
+			width: 560rpx;
 
-			.select-scroll {
+			.table-scroll {
 				white-space: nowrap;
 				width: 100%;
-				margin-top: 20rpx;
 
-				.item-list {
+				.father-list {
 					display: inline-block;
-					padding: 20rpx;
-					width: 180rpx;
-					height: 60rpx;
-					background: #FFFFFF;
-					border-radius: 16rpx;
 					margin-right: 20rpx;
 
-					.list-box {
-						display: flex;
-						align-items: center;
-						justify-content: space-between;
+					.father-title {
+						height: 60rpx;
+						line-height: 60rpx;
+						text-align: center;
+						font-weight: bold;
+						font-size: 24rpx;
+						color: #222222;
+					}
+
+					.children-list {
+						margin-bottom: 20rpx;
 
-						.list-text {
+						.item-card {
+							width: 124rpx;
+							height: 54rpx;
+							background: #F6F6F6;
+							border-radius: 8rpx;
 							font-weight: bold;
 							font-size: 24rpx;
 							color: #222222;
+							text-align: center;
+							line-height: 54rpx;
 
-							&>view:last-child {
-								margin-top: 8rpx;
+							&.selected {
+								background: #C8FF0C !important;
 							}
 						}
 					}
 				}
 			}
+
 		}
+	}
 
-		.footer-submit {
-			position: fixed;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			width: 710rpx;
-			height: 166rpx;
-			background: #FFFFFF;
-			box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09);
-			border-radius: 32rpx 32rpx 0rpx 0rpx;
-			bottom: 0;
-			padding: 0 20rpx;
-
-			.f-price {
-				display: flex;
-				align-items: center;
-				gap: 16rpx;
-
-				&>view:first-child {
-					font-weight: bold;
-					font-size: 28rpx;
-					color: #222222;
-				}
+	.select-list {
+		padding: 20rpx;
 
-				&>view:last-child {
-					font-weight: 800;
-					font-size: 48rpx;
-					color: #FB5B5B;
-				}
-			}
+		.select-title {
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
 
-			.f-btn {
-				&>button {
-					width: 226rpx;
-					height: 100rpx;
-					background: #C8FF0C;
-					border-radius: 60rpx;
-					line-height: 100rpx;
-					text-align: center;
-					font-weight: bold;
-					font-size: 32rpx;
-					color: #222222;
-				}
+		.select-scroll {
+			white-space: nowrap;
+			width: 100%;
+			margin-top: 20rpx;
+
+			.item-list {
+				display: inline-block;
+				padding: 20rpx;
+				width: 180rpx;
+				height: 60rpx;
+				background: #FFFFFF;
+				border-radius: 16rpx;
+				margin-right: 20rpx;
+
+				.list-box {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+
+					.list-text {
+						font-weight: bold;
+						font-size: 24rpx;
+						color: #222222;
 
-				&>button::after {
-					border: none;
+						&>view:last-child {
+							margin-top: 8rpx;
+						}
+					}
 				}
 			}
 		}
 	}
 
-	.order-popup {
-		background: #F6F6F6;
+	.footer-submit {
+		position: fixed;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		width: 710rpx;
+		height: 166rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09);
 		border-radius: 32rpx 32rpx 0rpx 0rpx;
-		max-height: 1200rpx;
-		overflow: auto;
-
-		.p-header-card {
-			background: #fff;
-			padding: 20rpx;
-			margin-top: 20rpx;
+		bottom: 0;
+		padding: 0 20rpx;
 
-			.p-school-info {
-				display: flex;
-				align-items: center;
-				gap: 10rpx;
-				font-size: 24rpx;
-				color: #AAAAAA;
-			}
+		.f-price {
+			display: flex;
+			align-items: center;
+			gap: 16rpx;
 
-			.p-title {
-				margin-top: 20rpx;
+			&>view:first-child {
 				font-weight: bold;
 				font-size: 28rpx;
 				color: #222222;
 			}
 
-			.p-preset {
-				font-size: 24rpx;
-				color: #AAAAAA;
-
-				.preset-info {
-					margin-top: 20rpx;
-				}
+			&>view:last-child {
+				font-weight: 800;
+				font-size: 48rpx;
+				color: #FB5B5B;
 			}
 		}
 
-		.p-price-card {
-			background: #fff;
-			padding: 20rpx;
-			margin-top: 20rpx;
+		.f-btn {
+			&>button {
+				width: 226rpx;
+				height: 100rpx;
+				background: #C8FF0C;
+				border-radius: 60rpx;
+				line-height: 100rpx;
+				text-align: center;
+				font-weight: bold;
+				font-size: 32rpx;
+				color: #222222;
+			}
 
-			.p-price {
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				height: 114rpx;
-				border-bottom: 1rpx solid #F0F0F0;
+			&>button::after {
+				border: none;
+			}
+		}
+	}
+}
 
-				.text {
-					font-weight: bold;
-					font-size: 28rpx;
-					color: #222222;
-				}
+.order-popup {
+	background: #F6F6F6;
+	border-radius: 32rpx 32rpx 0rpx 0rpx;
+	max-height: 1200rpx;
+	overflow: auto;
 
-				.price {
-					font-weight: 800;
-					font-size: 48rpx;
-					color: #222222;
-				}
-			}
+	.p-header-card {
+		background: #fff;
+		padding: 20rpx;
+		margin-top: 20rpx;
 
-			.p-subtotal {
-				display: flex;
-				align-items: center;
-				justify-content: flex-end;
-				gap: 16rpx;
-				margin-top: 20rpx;
+		.p-school-info {
+			display: flex;
+			align-items: center;
+			gap: 10rpx;
+			font-size: 24rpx;
+			color: #AAAAAA;
+		}
 
-				&>text:nth-child(1) {
-					font-weight: bold;
-					font-size: 28rpx;
-					color: #222222;
-				}
+		.p-title {
+			margin-top: 20rpx;
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
 
-				.total-price {
-					font-weight: 800;
-					font-size: 48rpx;
-					color: #FB5B5B;
-				}
+		.p-preset {
+			font-size: 24rpx;
+			color: #AAAAAA;
+
+			.preset-info {
+				margin-top: 20rpx;
 			}
 		}
+	}
 
-		.p-phone-card {
-			background: #fff;
-			padding: 20rpx;
-			margin-top: 20rpx;
+	.p-price-card {
+		background: #fff;
+		padding: 20rpx;
+		margin-top: 20rpx;
+
+		.p-price {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			height: 114rpx;
+			border-bottom: 1rpx solid #F0F0F0;
 
-			.p-phone {
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
+			.text {
 				font-weight: bold;
 				font-size: 28rpx;
 				color: #222222;
 			}
 
-			.tips {
-				margin-top: 20rpx;
-				font-size: 24rpx;
-				color: #AAAAAA;
+			.price {
+				font-weight: 800;
+				font-size: 48rpx;
+				color: #222222;
 			}
 		}
 
-		.p-rules-card {
-			background: #fff;
-			padding: 20rpx;
+		.p-subtotal {
+			display: flex;
+			align-items: center;
+			justify-content: flex-end;
+			gap: 16rpx;
 			margin-top: 20rpx;
 
-			.p-title {
+			&>text:nth-child(1) {
 				font-weight: bold;
 				font-size: 28rpx;
 				color: #222222;
 			}
 
-			.p-text {
-				margin-top: 20rpx;
-				font-size: 24rpx;
-				color: #AAAAAA;
-
-				&>text {
-					color: #222222;
-				}
+			.total-price {
+				font-weight: 800;
+				font-size: 48rpx;
+				color: #FB5B5B;
 			}
 		}
+	}
+
+	.p-phone-card {
+		background: #fff;
+		padding: 20rpx;
+		margin-top: 20rpx;
 
-		.p-remark {
+		.p-phone {
 			display: flex;
 			align-items: center;
-			gap: 10rpx;
-			background: #fff;
-			padding: 20rpx;
+			justify-content: space-between;
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
 
-			.title {
-				width: 60rpx;
-				font-size: 24rpx;
+		.tips {
+			margin-top: 20rpx;
+			font-size: 24rpx;
+			color: #AAAAAA;
+		}
+	}
+
+	.p-rules-card {
+		background: #fff;
+		padding: 20rpx;
+		margin-top: 20rpx;
+
+		.p-title {
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
+
+		.p-text {
+			margin-top: 20rpx;
+			font-size: 24rpx;
+			color: #AAAAAA;
+
+			&>text {
 				color: #222222;
 			}
+		}
+	}
 
-			&>input {
-				width: 690rpx;
-				font-size: 24rpx;
-				color: #757575;
-			}
+	.p-remark {
+		display: flex;
+		align-items: center;
+		gap: 10rpx;
+		background: #fff;
+		padding: 20rpx;
+
+		.title {
+			width: 60rpx;
+			font-size: 24rpx;
+			color: #222222;
 		}
 
-		.footer-pay {
-			position: fixed;
+		&>input {
+			width: 690rpx;
+			font-size: 24rpx;
+			color: #757575;
+		}
+	}
+
+	.footer-pay {
+		position: fixed;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		width: 710rpx;
+		height: 166rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09);
+		border-radius: 32rpx 32rpx 0rpx 0rpx;
+		bottom: 0;
+		padding: 0 20rpx;
+		z-index: 9999;
+
+		&>button {
+			width: 686rpx;
+			height: 100rpx;
+			background: #C8FF0C;
+			border-radius: 60rpx;
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
-			width: 710rpx;
-			height: 166rpx;
-			background: #FFFFFF;
-			box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09);
-			border-radius: 32rpx 32rpx 0rpx 0rpx;
-			bottom: 0;
-			padding: 0 20rpx;
-			z-index: 9999;
-
-			&>button {
-				width: 686rpx;
-				height: 100rpx;
-				background: #C8FF0C;
-				border-radius: 60rpx;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				gap: 10rpx;
-
-				&>button::after {
-					border: none;
-				}
+			justify-content: center;
+			gap: 10rpx;
 
-				.btn-price {
-					font-weight: 800;
-					font-size: 48rpx;
-					color: #222222;
-				}
+			&>button::after {
+				border: none;
+			}
 
-				.btn-text {
-					font-weight: bold;
-					font-size: 32rpx;
-					color: #222222;
-				}
+			.btn-price {
+				font-weight: 800;
+				font-size: 48rpx;
+				color: #222222;
 			}
 
-			.hover-style {
-				color: #999999;
+			.btn-text {
+				font-weight: bold;
+				font-size: 32rpx;
+				color: #222222;
 			}
 		}
+
+		.hover-style {
+			color: #999999;
+		}
 	}
+}
 </style>

+ 2 - 4
src/pages/index/gymDetail/index.vue

@@ -347,9 +347,6 @@ const updateActiveTab = (scrollTop: number) => {
 	}
 };
 
-const select_btn = (i) => {
-	sel_btn.value = i
-}
 const sel_tab = async (i: number) => {
 	isScrollingByTab.value = true; // 标记为Tab点击触发的滚动
 	sel_index.value = i;
@@ -455,6 +452,7 @@ const selectallCategory = (e, i) => {
 // 包场切换
 const selChartered = ref(0)
 const selectChartered = (e, i) => {
+	categoryId.value = e.id
 	selChartered.value = i
 	get_placeInfoNoFixation(e.id)
 	get_placeInfoDetail(e.id, '')
@@ -490,7 +488,7 @@ const selItems = ref()
 const get_placeInfoDetail = (catId, dateIndex) => {
 	http.get('/stadium/getPlaceInfo', { data: { siteId: listId.value, categoryId: catId } }).then((res) => {
 		placedata.value = res.result
-		selItems.value = res.result.stadiumConcertsVOList[dateIndex || 0].concertsVOList
+		selItems.value = res.result.stadiumConcertsVOList[dateIndex].concertsVOList
 	})
 }
 

+ 39 - 26
src/pages/index/gymPay/index.vue

@@ -5,7 +5,7 @@
 			<view class="g-shoping-info">
 				<image class="shoping-img" :src="previewCourseInfo.cover" mode=""></image>
 				<view class="shoping-info">
-					<view class="name">{{ previewCourseInfo.placeName }}</view>
+					<view class="name">{{ previewCourseInfo.placeName||previewCourseInfo.name }}</view>
 					<view class="price-info">
 						<view class="price"><text class="mini-text">¥</text>{{ previewCourseInfo.sellingPrice }}</view>
 						<view class="price-stepper">
@@ -26,10 +26,10 @@
 						<text v-if="buyType == 1">试听优惠</text>
 						<text v-if="buyType == 0 || placeId">团购优惠</text>
 					</view>
-					<view class="">-¥{{
-						previewCourseInfo.discountPrice ? previewCourseInfo.discountPrice :
-							(previewCourseInfo.originalPrice - previewCourseInfo.sellingPrice).toFixed(2)
-					}}</view>
+					<view class="">-¥
+						<text v-if="buyType == 0 || placeId">{{ previewCourseInfo.discountPrice }}</text>
+						<text v-else>{{ (previewCourseInfo.originalPrice - previewCourseInfo.sellingPrice).toFixed(2) }}</text>
+					</view>
 				</view>
 			</view>
 			<view class="subtotal">小计 ¥{{
@@ -140,17 +140,15 @@
 		<view class="footer footer-box">
 			<view class="footer-price">
 				<view class="total-price">合计:</view>
-				<view class="price"><text class="mini-text">¥</text>{{ previewCourseInfo.totalPrice ?
-					(previewCourseInfo.totalPrice * countTotal).toFixed(2) : (previewCourseInfo.sellingPrice *
-						countTotal).toFixed(2) }}
+				<view class="price"><text class="mini-text">¥</text>
+					<text>{{ totalPriceDisplay }}</text>
 				</view>
 				<view class="discount">优惠¥{{ previewCourseInfo.totalDiscount }}</view>
 			</view>
 			<view class="footer-btn" @click="submitOrder">
 				<button>
 					<view class="btn-price">
-						¥{{ previewCourseInfo.totalPrice ? (previewCourseInfo.totalPrice * countTotal).toFixed(2) :
-							(previewCourseInfo.sellingPrice * countTotal).toFixed(2) }}
+						<text> ¥{{ totalPriceDisplay }}</text>
 					</view>
 					<view class="btn-price">立即支付</view>
 				</button>
@@ -176,7 +174,7 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, onMounted } from 'vue';
+import { ref, onMounted, computed } from 'vue';
 import { onLoad } from '@dcloudio/uni-app';
 import { RouterUtils, TipsUtils, idCardHide } from '@/utils/util';
 import { http } from '@/utils/http'
@@ -195,6 +193,29 @@ onLoad((options) => {
 	orderFormData.value.orFreeOrder = options.buyType
 	orderFormData.value.amount = 1
 })
+// 优化价格计算,合并保险价格
+const totalPrice = computed(() => {
+	let basePrice = 0;
+	if (previewCourseInfo.value) {
+		if (previewCourseInfo.value.totalPrice) {
+			basePrice = Number(previewCourseInfo.value.totalPrice) * Number(countTotal.value);
+		} else if (previewCourseInfo.value.sellingPrice) {
+			basePrice = Number(previewCourseInfo.value.sellingPrice) * Number(countTotal.value);
+		}
+	}
+	let insureTotal = 0;
+	if (Array.isArray(insureData.value) && insureData.value.length > 0) {
+		insureTotal = insureData.value.reduce((sum, item) => {
+			const price = Number(item.totalPrice) || 0;
+			return sum + price;
+		}, 0);
+	}
+	return basePrice + insureTotal;
+});
+
+const totalPriceDisplay = computed(() => {
+	return totalPrice.value.toFixed(2);
+});
 onMounted(() => {
 	if (placeId.value) {
 		getEventsDetail()
@@ -355,31 +376,23 @@ let orderFormData = ref({
 		assertEndTime: '',
 		insurePriceId: '',
 		familyMembersIds: '',
-	},
-	// gameCertificationForm:{
-	// 	teamName:'',
-	// 	teamEmblemImg: '',
-	// 	certificationDTOS:[{
-	// 		name: '',
-	// 		certificationImg: '',
-	// 	}]
-	// }
+	}
 })
 const submitOrder = () => {
 	if (!placeId.value) {
 		if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
 		if (userData.value.length < countTotal.value) return TipsUtils.tips_toast(`请至少选择${countTotal.value}人`)
-		orderFormData.value.orderType = null
+		orderFormData.value.orderType = ''
 		orderFormData.value.type = 2
-		console.log('进入fei场地');
-		
 	} else {
-		console.log('进入场地');
-
 		orderFormData.value.type = 0
 		orderFormData.value.orderType = 2
 	}
-	http.post('/order/createOrder', orderFormData.value, { loading: true }).then((res) => {
+	let data = { ...orderFormData.value };
+	if (!insureData.value || insureData.value.length === 0) {
+		delete data.insureOrderInfoForm;
+	}
+	http.post('/order/createOrder', data, { loading: true }).then((res) => {
 		RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${res.result.orderId}&orderType=${loadType.value}`)
 	})
 }

+ 4 - 4
src/pages/index/toBeUsed/index.vue

@@ -15,7 +15,7 @@
 			<view class="booking-btn">立即预约</view>
 		</view>
 		<!-- 包场 -->
-		<view class="c-scheduled-card" v-if="orderPageInfo.orderType != 2">
+		<view class="c-scheduled-card" v-if="orderPageInfo.orderType == 0">
 			<view class="title">预定信息</view>
 			<view class="schedule-address">
 				<view class="text">场馆</view>
@@ -74,7 +74,7 @@
 			</view>
 		</view>
 		<!-- 待使用展示 -->
-		<view class="t-qrcode-card" v-if="orderPageInfo.orderType == 2">
+		<view class="t-qrcode-card" v-if="orderPageInfo.orderType == 2||orderPageInfo.orderType == 0">
 			<view class="qrcode-box">
 				<view class="item-qrcode">
 					<uv-qrcode ref="qrcode" size="100px" :value="orderDetailInfo.id"></uv-qrcode>
@@ -91,7 +91,7 @@
 			</view>
 		</view>
 		<!-- 已使用已过期展示 -->
-		<view class="t-qrcode-card" v-if="orderPageInfo.orderType != 2">
+		<view class="t-qrcode-card" v-if="orderPageInfo.orderType == 0">
 			<view class="t-todeused" v-for="item in 2" style="border-bottom: 1rpx solid #F0F0F0;">
 				<view class="todeused">
 					<view class="item-todeused">
@@ -207,7 +207,7 @@
 			</view>
 		</view>
 		<!-- 已使用展示 -->
-		<view class="appraise-btn" @click="RouterUtils.to_page('/pages/index/writeComments/index')">
+		<view class="appraise-btn" @click="RouterUtils.to_page(`/pages/index/writeComments/index?siteId=${orderDetailInfo.addressSiteId}&orderId=${orderDetailInfo.id}`)">
 			写评价
 		</view>
 	</view>

+ 14 - 2
src/pages/index/verificationRecord/index.vue

@@ -111,14 +111,18 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, onMounted, getCurrentInstance, nextTick } from 'vue';
+import { ref, onMounted } from 'vue';
 import { onLoad, onPageScroll } from '@dcloudio/uni-app';
+import { http } from '@/utils/http'
 const rotate = ref(false);  //核销折叠控制
 const selectList = ref(['正常课', '补课']);
 const sel_index = ref(0);
-//滚动事件
 onLoad((options)=>{
 	console.log(options)
+	formData.value=options
+})
+onMounted(()=>{
+getOrderVerifyRecords()
 })
 onPageScroll((e) => {
 
@@ -126,6 +130,14 @@ onPageScroll((e) => {
 const sel_tab = async (i: number) => {
 	sel_index.value = i;
 }
+
+const formData=ref({})
+const getOrderVerifyRecords=()=>{
+	http.get('/order/queryOrderVerifyRecords',{data:formData.value,loading:true}).then((res)=>{
+
+	})
+}
+
 </script>
 
 <style lang="less" scoped>

+ 81 - 92
src/pages/index/vr/ImageAr.js

@@ -1,106 +1,95 @@
 let {
-  Engine,
-  Scene,
-  RotatePerspectiveCamera,
-  Skybox,
-} = require("./g3d.min.js");
+	Engine,
+	Scene,
+	RotatePerspectiveCamera,
+	Skybox
+} = require("./g3d.min.js")
 
 let lx = null,
-  ly = null,
-  requestId = 0;
+	ly = null,
+	requestId=0;
 class ImageAr {
-  constructor(canvas, images, opt) {
-    this.canvas = canvas;
-    this.images = images;
-    this.opt = opt || {
-      textureComplete: (image360) => {},
-    };
-    this.init();
-  }
+	constructor(canvas, images, opt) {
+		this.canvas = canvas;
+		this.images = images;
+		this.opt = opt || {
+			textureComplete: (image360) => {}
+		}
+		this.init();
+	}
+	
+	init() {
+		let that = this;
+		Engine.prototype.destroy();
+		Engine.instance = null;
+		that.engine = new Engine(that.canvas);
+		that.scene = new Scene(that.engine);
+		that.camera = new RotatePerspectiveCamera(that.scene);
+		this.camera.alpha = 0;
+		this.camera.beta = 0;
+		this.camera.radius = 10;
+		this.camera.near = 0.001;
+		this.camera.far = 2000;
+		let cnt = 0;
+		let imageListPOsi = ["back", "front", "top", "bottom", "left", "right"]; // 注意图片顺序 后, 前, 上, 下, 左, 右
+		let pos = {}
+		for (let i = 0; i < this.images.length; i++) {
+			let image = this.canvas.createImage();
+			pos[imageListPOsi[i]] = image;
+      console.log(image,'kuangao');
+			image.onload = () => {
+				cnt++;
+				if (cnt >= 6) {
+					new Skybox(that.scene, pos, 100, true);
+					function render() {
+						that.scene.render();
+						that.requestAnimationFrame(render);
+					}
+					render();
+					that.opt.textureComplete && that.opt.textureComplete(that);
+				}
+			}
+			image.src = this.images[i];
+		}
+	}
 
-  init() {
-    let that = this;
-    Engine.prototype.destroy();
-    Engine.instance = null;
-    that.engine = new Engine(that.canvas);
-    that.scene = new Scene(that.engine);
-    that.camera = new RotatePerspectiveCamera(that.scene);
-    this.camera.alpha = 0;
-    this.camera.beta = 0;
-    this.camera.radius = 10;
-    this.camera.near = 0.001;
-    this.camera.far = 2000;
-    let cnt = 0;
-    let imageListPOsi = ["back", "front", "top", "bottom", "left", "right"]; // 注意图片顺序 后, 前, 上, 下, 左, 右
-    let pos = {};
-    for (let i = 0; i < this.images.length; i++) {
-      let image = this.canvas.createImage();
-      pos[imageListPOsi[i]] = image;
-      image.onload = () => {
-		console.log(image.width,'图片1');
-		console.log(image.height,'图片2');
-        // 校验图片是否为正方形
-        if (image.width !== image.height) {
-          console.error(
-            `图片${image.src}不是正方形,宽高分别为${image.width}x${image.height}`
-          );
-          return;
-        }
-        if (i > 0) {
-          let first = pos[imageListPOsi[0]];
-          if (image.width !== first.width || image.height !== first.height) {
-            console.error(`图片${image.src}尺寸与第一张不一致`);
-            return;
-          }
-        }
-        cnt++;
-        if (cnt >= 6) {
-          new Skybox(that.scene, pos, 100, true);
-          function render() {
-            that.scene.render();
-            that.requestAnimationFrame(render);
-          }
-          render();
-          that.opt.textureComplete && that.opt.textureComplete(that);
-        }
-      };
-      image.src = this.images[i];
-    }
-  }
 
-  touchmove(e) {
-    let that = this;
-    let x = e.touches[0].clientX;
-    let y = e.touches[0].clientY;
+	touchmove(e) {
+		let that = this;
+		let x = e.touches[0].clientX;
+		let y = e.touches[0].clientY;
 
-    that.camera.alpha += (x - lx) / 5;
-    this.camera.beta = that.clamp(-90, 90, this.camera.beta - (y - ly) / 5);
-    lx = x;
-    ly = y;
-  }
+		that.camera.alpha += (x - lx) / 5;
+		this.camera.beta = that.clamp(-90, 90, this.camera.beta - (y - ly) / 5);
+		lx = x;
+		ly = y;
+	}
 
-  touchstart(e) {
-    let that = this;
-    let x = e.touches[0].clientX;
-    let y = e.touches[0].clientY;
-    lx = x;
-    ly = y;
-  }
+	touchstart(e) {
+		let that = this;
+		let x = e.touches[0].clientX;
+		let y = e.touches[0].clientY;
+		lx = x;
+		ly = y;
+	}
 
-  touchend(e) {}
+	touchend(e) {
 
-  requestAnimationFrame(cb) {
-    requestId = this.canvas.requestAnimationFrame(cb);
-  }
+	}
 
-  cancelAnimationFrame() {
-    console.log("requestId", requestId);
-    this.canvas.cancelAnimationFrame(requestId);
-  }
+	requestAnimationFrame(cb) {
+		requestId = this.canvas.requestAnimationFrame(cb);
+	}
+	
+	cancelAnimationFrame() {
+		console.log("requestId", requestId);
+		this.canvas.cancelAnimationFrame(requestId);
+	}
 
-  clamp(min, max, v) {
-    return v < min ? min : v > max ? max : v;
-  }
+	clamp(min, max, v) {
+		return v < min ? min : v > max ? max : v;
+	}
 }
 
-export default ImageAr;
+
+export default ImageAr

+ 0 - 1
src/pages/index/vr/index.vue

@@ -30,7 +30,6 @@ onLoad((option: any) => {
 		uni.showToast({ title: '需要6张图片', icon: 'none' });
 		return;
 	}
-	// 可以在这里加图片尺寸校验(异步加载图片后判断宽高)
 	console.log("加载图片", images.value);
 })
 nextTick(() => {

+ 10 - 7
src/pages/index/writeComments/index.vue

@@ -28,18 +28,21 @@
 </template>
 
 <script lang="ts" setup>
-	import { ref, onMounted, computed } from 'vue'
+	import { ref, onMounted, computed } from 'vue';
+	import { onLoad } from '@dcloudio/uni-app';
 	import { RouterUtils, TipsUtils } from '@/utils/util';
-	import { http } from '@/utils/http'
+	import { http } from '@/utils/http';
+	onLoad((options)=>{
+		console.log(options);
+		formData.value.siteId=options.siteId
+		formData.value.orderId=options.orderId
+	})
 	const formData=ref({
 		score:0,
 		evaluateContent:'',
 		images:'https://bpic.588ku.com/element_origin_min_pic/23/07/11/d32dabe266d10da8b21bd640a2e9b611.jpg!r650,https://img.keaitupian.cn/newupload/08/1629449018344288.jpg',
-		orgCode:100,
-		deptId:101,
-		siteId:102,
-		userId:1941067719183089666,
-		orderId:103,
+		siteId:null,
+		orderId:null,
 	})
 	const upPicUrl=ref()
 	const onRateChange=(e)=>{

+ 1 - 1
src/pages/mine/reviseNickname/index.vue

@@ -24,7 +24,7 @@
 	const username=ref('')
 	const submit=()=>{
 		if(username.value=='') return TipsUtils.tips_toast('请输入昵称')
-		http.get('/user/updateUserInfo',{data:{nickName:username.value,avatarUrl:''},loading:true}).then((res)=>{
+		http.get('/user/updateUserInfo',{data:{nickName:username.value,avatarUrl:'https://c-ssl.dtstatic.com/uploads/blog/202107/11/20210711174826_ba57b.thumb.1000_0.jpg'},loading:true}).then((res)=>{
 			get_userinfo()
 		})
 	}

+ 3 - 3
src/utils/http/index.ts

@@ -56,7 +56,7 @@ export class HttpClient {
   constructor(config: RequestConfig = {}) {
     this.defaults = {
       baseURL: '',
-      timeout: 10000,
+      timeout: 20000,
       retry: 0,
       retryDelay: 1000,
       loading: false,
@@ -180,8 +180,8 @@ export class HttpClient {
 // 创建实例
 export const http = new HttpClient({
   // baseURL: 'http://192.168.1.34:8080/jeecg-boot/app',
-  // baseURL: 'http://192.168.1.166:8080/jeecg-boot/app',
-  baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
+  baseURL: 'http://192.168.1.166:8080/jeecg-boot/app',
+  // baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
   headers: {
     'Content-Type': 'application/json'
   }

+ 1 - 0
src/utils/util/index.ts

@@ -194,6 +194,7 @@ export const idCardHide = (card: any) => {
  * @returns 脱敏后的手机号字符串
  */
 export const phoneHide = (phone: any) => {
+	 if (!phone) return '';
 	const reg = /^(\d{3})\d{4}(\d{4})$/;
 	const maskedPhone = phone.replace(reg, '$1****$2');
 	return maskedPhone;