瀏覽代碼

修复若干反馈bug,新增赛事查看成绩、赛程安排

学习?学个屁 4 天之前
父節點
當前提交
48a4539846

+ 49 - 2
src/App.vue

@@ -1,10 +1,57 @@
 <script setup lang="ts">
 import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
-import { initEid} from '@/pages/mp_ecard_sdk/main'
-
+import { initEid } from '@/pages/mp_ecard_sdk/main';
+import { TipsUtils } from '@/utils/util';
+import { useCacheStore } from '@/stores/cache'
+const cache = useCacheStore()
 onLaunch(() => {
 	initEid()
 	console.log("App Launch");
+	uni.authorize({
+		scope: 'scope.userLocation',
+		isHighAccuracy: true,
+		success() {
+			uni.getSystemInfo({
+				success: function (res) {
+					let locationEnabled = res.locationEnabled; //判断手机定位服务是否开启
+					let locationAuthorized = res.locationAuthorized; //判断定位服务是否允许微信授权
+					if (locationEnabled == false || locationAuthorized == false) {
+						TipsUtils.tips_alert('请开启手机定位以提供更好服务', true)
+					}
+				}
+			})
+			uni.getLocation({
+				type: 'gcj02',
+				success: function (res) {
+					uni.hideLoading()
+					cache.set('LON', res.longitude)
+					cache.set('LAT', res.latitude)
+					console.log('当前位置:' + res.longitude);
+				},
+				fail: function (err) {
+					if (err.errMsg === 'getFuzzyLocation:fail system permission denied') {
+						TipsUtils.tips_alert('系统定位未开启,请开启定位以便提供更好服务', false)
+					} else if (err.errMsg === 'getFuzzyLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF' ||
+						err.errMsg === 'getFuzzyLocation:fail system permission denied' ||
+						err.errMsg === 'getFuzzyLocation:fail:system permission denied' || err.errMsg === 'getFuzzyLocation:fail auth deny') {
+						showAuthGuide()
+					}
+					console.log(err, '错误信息')
+				}
+			});
+		},
+		fail: (err) => {
+			showAuthGuide()
+		}
+	});
+
+	// 引导操作
+	const showAuthGuide = async () => {
+		let res: any = await TipsUtils.tips_alert('授权定位以提供更好服务', true)
+		if (res.confirm) {
+			uni.openSetting()
+		}
+	}
 });
 onShow(() => {
 	console.log("App Show");

+ 12 - 1
src/pages.json

@@ -315,9 +315,20 @@
 		{
 			"path": "pages/index/signWebview/index",
 			"style": {
-				"navigationBarTitleText": "index",
 				"navigationBarTitleText": "合同签署"
 			}
+		},
+		{
+			"path": "pages/index/gameResult/index",
+			"style": {
+				"navigationBarTitleText": "查看成绩"
+			}
+		},
+		{
+			"path": "pages/index/gamePlan/index",
+			"style": {
+				"navigationBarTitleText": "赛事安排"
+			}
 		}
 	],
 	"tabBar": {

+ 4 - 9
src/pages/index/detail/components/appraise.vue

@@ -10,13 +10,13 @@
 					<view class="a-text">| {{ listData.scoreNum }}人评论</view>
 				</view>
 			</view>
-			<view class="appraise-info" v-for="item in listData.records" :key="item.id" @click="check_detail">
+			<view class="appraise-info" v-for="item in listData.records" :key="item.id">
 				<view class="a-user-info">
 					<view class="info">
 						<image :src="item.avatar" mode=""></image>
 						<view class="name">{{ item.username }}</view>
 					</view>
-					<view class="time">{{ DateUtils.formatDateToMMDD(item.createTime) }}</view>
+					<view class="time" v-if="item.createTime">{{ DateUtils.formatDateToMMDD(item.createTime) }}</view>
 				</view>
 				<view class="a-score">
 					<text>{{ item.score.toFixed(1) }}</text>
@@ -25,7 +25,7 @@
 				<view class="a-content">
 					{{ item.evaluateContent }}
 				</view>
-				<scroll-view class="scroll-view_H" scroll-x="true" :show-scrollbar="false">
+				<scroll-view class="scroll-view_H" scroll-x="true" :show-scrollbar="false" v-if="item.images">
 					<view class="scroll-view-item_H uni-bg-red" v-for="(img, idx) in item.images.split(',')" :key="idx">
 						<image @click="_previewImage(item.images.split(','), img)" :src="img" mode=""></image>
 					</view>
@@ -36,7 +36,7 @@
 </template>
 
 <script lang="ts" setup>
-import { _previewImage } from '@/utils/util';
+import { DateUtils,_previewImage } from '@/utils/util';
 
 interface Props {
 	listData?: any;
@@ -44,11 +44,6 @@ interface Props {
 const props = withDefaults(defineProps<Props>(), {
 	listData: [],
 });
-const check_detail = () => {
-	uni.navigateTo({
-		url: '/pages/mine/mineComments/index'
-	})
-}
 </script>
 
 <style lang="less" scoped>

+ 2 - 2
src/pages/index/detail/components/course.vue

@@ -19,7 +19,7 @@
 					上课地点:{{item.address}} | {{item.km||'--'}}km
 				</view>
 				<view class="type">
-					{{item.count||'0'}}课时 {{item.startTime}}-{{item.endTime}}
+					{{item.period||'0'}}课时 {{item.startTime}}-{{item.endTime}}
 				</view>
 				<view class="price">
 					<view class="">¥{{item.sellingPrice}}</view>
@@ -29,7 +29,7 @@
 					<view class="sale">
 						已售{{item.sales}} {{item.goodRate}}%好评
 					</view>
-					<view class="price-btn">免费试听</view>
+					<view class="price-btn">{{ item.hasDiscount?'免费试听':'立即购买' }}</view>
 				</view>
 			</view>
 		</view>

+ 76 - 64
src/pages/index/detail/components/instructor.vue

@@ -1,97 +1,109 @@
 <template>
 	<view class="instructor-card">
 		<view class="card-title">
-			<view class="">教练({{instrctorList.length}})</view>
+			<view class="">教练({{ instrctorList.length }})</view>
 			<zzx-icon name="right" size="12"></zzx-icon>
 		</view>
 		<scroll-view class="header-swiper content" scroll-x="true" :show-scrollbar="false">
 			<view class="swiper-box">
-				<view class="swiper-inner" v-for="(item,idx) in instrctorList" :key="idx">
+				<view class="swiper-inner" v-for="(item, idx) in instrctorList" :key="idx"
+					@click="RouterUtils.to_page(`/pages/index/instructorDetail/index?id=${item.id}`)">
 					<view class="header-img">
 						<image :src="item.avatar" mode=""></image>
 						<image src="/src/static/badge.png" mode=""></image>
 					</view>
-					<view class="instructor-name">{{item.name}}</view>
+					<view class="instructor-name">{{ item.name }}</view>
 					<view class="instructor-specialty">
-						<text v-for="(category,index) in item.category" :key="index">{{category}}</text>
+						<text v-for="(category, index) in item.category" :key="index">{{ category }}</text>
 					</view>
 				</view>
 			</view>
 		</scroll-view>
-		<zs-empty v-if="instrctorList.length<1"></zs-empty>
+		<view class="not-data" v-if="instrctorList.length < 1">暂无数据</view>
+
 	</view>
 </template>
 
 <script lang="ts" setup>
-	import zsEmpty from '@/components/zs-empty/index.vue'
-	interface Props {
-		instrctorList ?: any;
-	}
-	const props = withDefaults(defineProps<Props>(), {
-		instrctorList: []
-	});
+import { RouterUtils } from '@/utils/util';
+interface Props {
+	instrctorList?: any;
+}
+const props = withDefaults(defineProps<Props>(), {
+	instrctorList: []
+});
 </script>
 
 <style lang="less" scoped>
-	.instructor-card{
-		padding: 20rpx;
-		background: #FFFFFF;
-		border-radius: 32rpx;
-		margin-top: 20rpx;
+.instructor-card {
+	padding: 20rpx;
+	background: #FFFFFF;
+	border-radius: 32rpx;
+	margin-top: 20rpx;
+	overflow: hidden;
+
+	.card-title {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		font-weight: 800;
+		font-size: 32rpx;
+		color: #222222;
+	}
+
+	.header-swiper {
+		margin-top: 24rpx;
+		width: 700rpx;
+		white-space: nowrap;
 		overflow: hidden;
-		.card-title{
+
+		/* 隐藏滚动条 */
+		/deep/ ::-webkit-scrollbar {
+			display: none;
+			width: 0 !important;
+			height: 0 !important;
+			background: transparent;
+		}
+
+		.swiper-box {
 			display: flex;
 			align-items: center;
-			justify-content: space-between;
-			font-weight: 800;
-			font-size: 32rpx;
-			color: #222222;
-		}
-			.header-swiper {
-				margin-top: 24rpx;
-				width: 700rpx;
-				white-space: nowrap;
-				overflow: hidden;
-				/* 隐藏滚动条 */
-				/deep/ ::-webkit-scrollbar {
-					display: none;
-					width: 0 !important;
-					height: 0 !important;
-					background: transparent;
-				}
-			.swiper-box{
-				display: flex;
-				align-items: center;
-				gap: 44rpx;
-				.swiper-inner {
-					width: 100rpx;
-					text-align: center;
-					.header-img{
-						position: relative;
-						image{
-							width: 100rpx;
-							height: 100rpx;
-							border-radius: 50%;
-							&:nth-child(2){
-								position: absolute;
-								bottom: 0;
-								right: 0;
-								width: 36rpx;
-								height: 36rpx;
-							}
+			gap: 44rpx;
+
+			.swiper-inner {
+				width: 100rpx;
+				text-align: center;
+
+				.header-img {
+					position: relative;
+
+					image {
+						width: 100rpx;
+						height: 100rpx;
+						border-radius: 50%;
+
+						&:nth-child(2) {
+							position: absolute;
+							bottom: 0;
+							right: 0;
+							width: 36rpx;
+							height: 36rpx;
 						}
 					}
-					.instructor-name{
-						font-size: 28rpx;
-						font-weight: 600;
-					}
-					.instructor-specialty{
-						font-size: 22rpx;
-						color: #AAAAAA;
-					}
 				}
-			}
 
+				.instructor-name {
+					font-size: 28rpx;
+					font-weight: 600;
+				}
+
+				.instructor-specialty {
+					font-size: 22rpx;
+					color: #AAAAAA;
+				}
 			}
+		}
+
 	}
+}
 </style>

+ 2 - 2
src/pages/index/detail/index.vue

@@ -26,8 +26,8 @@
 				<view class="open-status">{{ detailInfo.runStatus ? '开放中' : '歇业中' }}</view>
 			</view>
 			<view class="star">
-				<zzx-icon name="star" size="12"></zzx-icon>
-				<text>{{ detailInfo.goodRate||0 }}</text>
+				<uni-rate :readonly="true" :allowHalf="true" size="16" :value="detailInfo.goodRate" />
+				<text>{{ detailInfo.goodRate || 0 }}</text>
 			</view>
 		</view>
 		<view class="open-time">

+ 1 - 2
src/pages/index/events/index.vue

@@ -22,8 +22,7 @@
 					</view>
 					<view class="e-time">
 						<zzx-icon name="clock" size="12"></zzx-icon>
-						<text>{{ DateUtils.formatDateToMMDD(item.startTime)
-						}} 至 {{ DateUtils.formatDateToMMDD(item.endTime) }}</text>
+						<text>{{item.startTime}} 至 {{item.endTime}}</text>
 					</view>
 				</view>
 			</view>

+ 91 - 51
src/pages/index/eventsRegister/index.vue

@@ -1,13 +1,26 @@
 <template>
 	<!-- 类型type 0-个人,1团队 -->
-	<zs-tabs type="underline" :menus="menusItems" activeColor="#222222" @change="changeTab"></zs-tabs>
+	<zs-tabs type="underline" :menus="menusItems" @change="changeTab"></zs-tabs>
 	<view class="content">
 		<view class="r-card-list">
 			<view class="r-title">选择报名项目</view>
-			<view class="r-list-box" v-if="individualEvents[0]">
-				<view class="r-events"
-					v-for="(item, index) in (selectTabs == 0 ? individualEvents[0].gamePriceRulesVOList : teamsEvents[0].gamePriceRulesVOList)"
-					:key="index" @click="toggleSelect(item, index)" :class="{ 'selected-item': selectEvents == index }">
+			<!-- 个人赛项目 -->
+			<view v-if="selectTabs === 0 || menusItems.length === 1" class="r-list-box">
+				<view class="r-events" v-for="(item, index) in individualEvents[0]?.gamePriceRulesVOList" :key="index"
+					@click="toggleSelect(item, index)" :class="{ 'selected-item': selectEvents == index }">
+					<view class="events-type">
+						<view class="r-check">
+							<zzx-icon :name="selectEvents == index ? 'selected' : 'unchecked'" size="14"></zzx-icon>
+						</view>
+						<view>{{ item.categoryName }}</view>
+					</view>
+					<view class="events-price">¥{{ item.sellingPrice }}/人</view>
+				</view>
+			</view>
+			<!-- 团队赛项目 -->
+			<view v-if="selectTabs === 1 || menusItems.length === 1" class="r-list-box">
+				<view class="r-events" v-for="(item, index) in teamsEvents[0]?.gamePriceRulesVOList" :key="index"
+					@click="toggleSelect(item, index)" :class="{ 'selected-item': selectEvents == index }">
 					<view class="events-type">
 						<view class="r-check">
 							<zzx-icon :name="selectEvents == index ? 'selected' : 'unchecked'" size="14"></zzx-icon>
@@ -63,16 +76,15 @@
 			<view class="g-teamBadge">
 				<view class="team-badge" style="margin-left: 20rpx;">队徽</view>
 				<view class="">
-					<sunui-upimg :url="upPicUrl" :header="{ 'x-access-token': cache.get('TOKEN') }" ref="upload1"
-						title="店铺logo" @upload="handleLoaded" @change="handleChange" :number="9"></sunui-upimg>
+					<sunui-upimg :header="{ 'x-access-token': cache.get('TOKEN') }" ref="upload1" title="店铺logo"
+						@upload="handleLoaded" @change="handleChange" :number="9"></sunui-upimg>
 				</view>
 			</view>
 			<view class="g-teamBadge" v-for="(item, index) in aptitudesList" :key="index">
 				<view class="team-badge"><text style="color: #FB5B5B ;">*</text>{{ item }}</view>
 				<view class="">
-					<sunui-upimg :url="upPicUrl" :header="{ 'x-access-token': cache.get('TOKEN') }"
-						:ref="'upload' + index" :title="item"
-						@upload="(imageList: any) => handleLoaded1(imageList, index)"
+					<sunui-upimg :header="{ 'x-access-token': cache.get('TOKEN') }" :ref="'upload' + index"
+						:title="item" @upload="(imageList: any) => handleLoaded1(imageList, index)"
 						@change="(imageList: any) => handleChangeList(imageList, index)" :number="9"></sunui-upimg>
 				</view>
 			</view>
@@ -93,7 +105,7 @@
 					</view>
 					<view class="r-insurance-type">保险公司:{{ item.insuranceName_dictText }}</view>
 					<view class="r-insurance-price">
-						<view class="r-price">¥{{ insurePrice }}/天·人</view>
+						<view class="r-price">¥{{ item.priceDataList[0].insurePrice }}/天·人</view>
 						<view class="r-insurance-btn" v-if="insureData.length < 1"
 							@click="gotoInsuracePage(item, item.priceDataList)">去投保
 						</view>
@@ -165,14 +177,13 @@
 <script lang="ts" setup>
 import { ref, onMounted, computed } from 'vue';
 import { http } from '@/utils/http';
-import { RouterUtils, TipsUtils, idCardHide,debounce } from '@/utils/util';
+import { RouterUtils, TipsUtils, idCardHide, debounce } from '@/utils/util';
 import { onLoad } from '@dcloudio/uni-app';
 import zsTabs from "@/components/zzx-tabs/zzx-tabs.vue";
 import { useCacheStore } from '@/stores/cache';
 const cache = useCacheStore()
 const insurePopup = ref()
 const select_insurance = ref(false)
-const upPicUrl = ref('http://192.168.0.11:8080/jeecg-boot/sys/common/upload')
 onLoad((options) => {
 	eventId.value = options.id;
 	orderFormData.value.orderType = 3
@@ -210,6 +221,7 @@ const toggleSelect = (item: any, index: number) => {
 	orderFormData.value.productIds = item.id
 	peopleNum.value = item.peopleNum
 	selectEvents.value = index;
+	countTotal.value = 1
 };
 const to_play = () => {
 	submitOrder()
@@ -226,12 +238,14 @@ const countTotal = ref(1)
 const reduceNum = () => {
 	if (countTotal.value > 1) {
 		countTotal.value--
+		peopleNum.value = countTotal.value
 		orderFormData.value.amount = countTotal.value
 	}
 }
 
 const addNum = () => {
 	countTotal.value++
+	peopleNum.value = countTotal.value
 	orderFormData.value.amount = countTotal.value || 1
 }
 
@@ -261,7 +275,7 @@ const handleChangeList = (e1: any, e2: any) => {
 };
 
 
-const userData = ref()
+const userData = ref([])
 const get_userData = () => {
 	uni.$on('userData', function (data) {
 		userData.value = data
@@ -278,6 +292,9 @@ const deleteUser = async (e) => {
 	let res = await TipsUtils.tips_alert('确定删除该用户吗?', true)
 	if (res.confirm) {
 		userData.value = userData.value.filter(user => user.id !== e.id)
+		console.log(userData.value, '删除后的列表');
+		let familyIds = userData.value.map(item => item.id)
+		orderFormData.value.familyIds = familyIds.join(',')
 	}
 }
 
@@ -298,24 +315,31 @@ const individualEvents = ref([]) // 个人赛项目
 const teamsEvents = ref([]) // 团队赛项目
 const aptitudesList = ref([]) // 资质列表
 const insureIdList = ref([])  // 保险列表
-const insurePrice = ref() // 保险价格
-const menusItems=ref([])
+const menusItems = ref([]) // 菜单列表
+const eventsTypeList = ref([]) // 项目类型列表
 const get_eventsInfoDetail = () => {
 	http.get('/game/findByGameId', { data: { id: eventId.value }, loading: true }).then((res: any) => {
+		eventsTypeList.value = res.result.gamePriceRulesTypeVOList
 		individualEvents.value = res.result.gamePriceRulesTypeVOList.filter((item: any) => item.type == 0)
 		teamsEvents.value = res.result.gamePriceRulesTypeVOList.filter((item: any) => item.type == 1)
+		console.log(teamsEvents.value, '团队赛');
 		aptitudesList.value = res.result.aptitudesList
-		menusItems.value= res.result.gamePriceRulesTypeVOList.map((e)=>{
-			return e.typeName
-		})
+		// 动态生成菜单项
+		menusItems.value = []
+		if (individualEvents.value.length > 0) {
+			menusItems.value.push('个人赛项目')
+		}
+		if (teamsEvents.value.length > 0) {
+			menusItems.value.push('团队赛项目')
+		}
+
+		// 如果只有一种类型,默认显示该类型
+		if (menusItems.value.length === 1) {
+			selectTabs.value = individualEvents.value.length > 0 ? 0 : 1
+		}
 		res.result.insureIdList.map((item: any) => {
 			item.insuranceObvious = JSON.parse(item.insuranceObvious)
 			item.insuranceObvious = [item.insuranceObvious]
-			item.priceDataList.map((item2: any) => {
-				if (item2.insureDay === 1) {
-					insurePrice.value = item2.insurePrice
-				}
-			})
 		})
 		insureIdList.value = res.result.insureIdList
 	})
@@ -395,12 +419,28 @@ let orderFormData = ref({
 	}
 })
 const submitOrderImpl = () => {
+	if (selectTabs.value == 0) {
+		orderFormData.value.orderType = 3
+	} else {
+		orderFormData.value.orderType = 4
+	}
 	if (!peopleNum.value) return TipsUtils.tips_toast('请选择项目')
+	if (peopleNum.value != userData.value.length) return TipsUtils.tips_toast('请选择' + peopleNum.value + '位用户')
 	if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
 	if (selectTabs.value == 1) {
 		if (!orderFormData.value.gameCertificationForm.teamName) return TipsUtils.tips_toast('请输入队名')
+		// 校验资质证明图片
+		const certificationDTOS = orderFormData.value.gameCertificationForm.certificationDTOS
+		if (!certificationDTOS || certificationDTOS.length !== aptitudesList.value.length) {
+			return TipsUtils.tips_toast('请上传所有必传的资质证明图片')
+		}
+		// 校验每个资质证明是否都已上传图片
+		for (let i = 0; i < certificationDTOS.length; i++) {
+			if (!certificationDTOS[i].certificationImg) {
+				return TipsUtils.tips_toast(`请上传${certificationDTOS[i].name}的图片`)
+			}
+		}
 	}
-
 	let data = { ...orderFormData.value };
 	if (selectTabs.value !== 1) {
 		delete data.gameCertificationForm;
@@ -414,38 +454,38 @@ const submitOrderImpl = () => {
 	}
 	// orPayOrder0-免费/试听 1-调起支付
 	http.post('/order/createOrder', data, { loading: true }).then((res) => {
-		getOrderQuery(res.result.orderCode,res.result.orderId)
+		getOrderQuery(res.result.orderCode, res.result.orderId)
 	})
 }
 const submitOrder = debounce(submitOrderImpl, 500)
 
 // code编码 "100001支付成功";"100002查询失败"; "100003查询中 "; "100004支付失败"
-const getOrderQuery = (orderCode: string,orderId:string, retryCount = 0) => {
-    http.get('/order/orderQuery', { data: { orderCode: orderCode }, loading: true }).then((res) => {
-        if (res.result == '100001') {
-            RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${orderId}&orderType=${orderFormData.value.orderType}`)
-        } else if (retryCount <= 3) {
-            setTimeout(() => {
-                getOrderQuery(orderCode,orderId, retryCount + 1)
-            }, 1000)
-        } else {
-            if (res.result == '100003') {
-                console.log('查询中,但已达到最大查询次数')
-            } else if (res.result == '100002') {
-                console.log('查询失败')
-            } else if (res.result == '100004') {
-                console.log('支付失败')
+const getOrderQuery = (orderCode: string, orderId: string, retryCount = 0) => {
+	http.get('/order/orderQuery', { data: { orderCode: orderCode }, loading: true }).then((res) => {
+		if (res.result == '100001') {
+			RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${orderId}&orderType=${orderFormData.value.orderType}`)
+		} else if (retryCount <= 3) {
+			setTimeout(() => {
+				getOrderQuery(orderCode, orderId, retryCount + 1)
+			}, 1000)
+		} else {
+			if (res.result == '100003') {
+				console.log('查询中,但已达到最大查询次数')
+			} else if (res.result == '100002') {
+				console.log('查询失败')
+			} else if (res.result == '100004') {
+				console.log('支付失败')
 				TipsUtils.tips_toast('支付失败')
-            }
-        }
-    }).catch((error) => {
-        console.error('查询订单失败:', error)
-        if (retryCount < 2) { 
-            setTimeout(() => {
-                getOrderQuery(orderCode,orderId, retryCount + 1)
-            }, 1000)
-        }
-    })
+			}
+		}
+	}).catch((error) => {
+		console.error('查询订单失败:', error)
+		if (retryCount < 2) {
+			setTimeout(() => {
+				getOrderQuery(orderCode, orderId, retryCount + 1)
+			}, 1000)
+		}
+	})
 }
 </script>
 

+ 78 - 0
src/pages/index/gamePlan/index.vue

@@ -0,0 +1,78 @@
+<template>
+  <view class="content">
+    <view class="d-eventsplan-card">
+      <view class="events-list">
+        <view class="list-item" v-for="item in gamesList" :key="item.id">
+          <view class="item-list-box">
+            <view class="item-title">{{ item.name }}</view>
+            <view class="item-info">
+              <view class="item-time">
+                <view>{{ item.startStatus }}</view>
+                <view>{{ item.startTime }}-{{ item.endTime }}</view>
+              </view>
+              <view class="item-type">{{ item.arrange }}</view>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script lang="ts" setup>
+import { ref } from 'vue';
+import { onLoad } from '@dcloudio/uni-app';
+import { http } from '@/utils/http';
+onLoad((option: any) => {
+  console.log(option);
+  getGamePlan(option.orderId)
+})
+
+const gamesList=ref([])
+const getGamePlan=(orderId:string)=>{
+    http.get('/game/findScheduleByOrderId', { data: { orderId: orderId }, loading: true }).then((res: any) => {
+      gamesList.value=res.result
+  })
+}
+</script>
+
+<style scoped lang="less">
+	.d-eventsplan-card {
+		padding: 20rpx;
+		background: #FFFFFF;
+		border-radius: 32rpx;
+		font-size: 24rpx;
+		color: #222222;
+
+		.events-list {
+			.list-item {
+				margin-top: 20rpx;
+
+				.item-list-box {
+					display: flex;
+					justify-content: space-between;
+
+					.item-title {
+						font-size: 24rpx;
+						color: #222222;
+					}
+
+					.item-info {
+						.item-time {
+							font-size: 24rpx;
+							color: #AAAAAA;
+							display: flex;
+							gap: 48rpx;
+						}
+
+						.item-type {
+							margin-top: 20rpx;
+							font-weight: bold;
+							font-size: 28rpx;
+							color: #222222;
+						}
+					}
+				}
+			}
+		}
+	}</style>

+ 30 - 0
src/pages/index/gameResult/index.vue

@@ -0,0 +1,30 @@
+<template>
+  <view>
+    <rich-text :nodes="gameResult"></rich-text>
+		<zs-empty v-if="gameResult==''"></zs-empty>
+  </view>
+</template>
+
+<script lang="ts" setup>
+import { ref, onMounted } from 'vue';
+import { onLoad } from '@dcloudio/uni-app';
+import { http } from '@/utils/http';
+import { fixImgStyle } from '@/utils/util';
+import zsEmpty from '@/components/zs-empty/index.vue'
+onLoad((option: any) => {
+  console.log(option);
+  getGameResult(option.orderId)
+})
+onMounted(() => {
+
+})
+
+const gameResult = ref('');
+const getGameResult = (orderId: string) => {
+  http.get('/game/findScoreByGameId', { data: { orderId: orderId }, loading: true }).then((res: any) => {
+    gameResult.value = fixImgStyle(res.result.gameResults)
+  })
+}
+</script>
+
+<style scoped></style>

+ 64 - 42
src/pages/index/gymDetail/components/popup.vue

@@ -79,7 +79,8 @@
 					<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>
+							{{ item.name }}
+						</view>
 					</view>
 				</view>
 				<view class="p-price-card">
@@ -98,8 +99,9 @@
 				<view class="p-phone-card">
 					<view class="p-phone">
 						<view class="text">手机号码</view>
-						<view class="phone" v-if="previewgymOrderDetail.mobile">{{ previewgymOrderDetail.mobile ?
-							phoneHide(previewgymOrderDetail.mobile) : '' }}</view>
+						<input class="phone" type="number" v-model="displayPhone" @blur="orderDetailPhoneBlur" />
+						<!-- <view class="phone" v-if="previewgymOrderDetail.mobile">{{ previewgymOrderDetail.mobile ?
+							phoneHide(previewgymOrderDetail.mobile) : '' }}</view> -->
 					</view>
 					<view class="tips">请通话畅通,商家需要联系您确认到店时间</view>
 				</view>
@@ -131,9 +133,9 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, onMounted, computed, watch,nextTick } from 'vue';
+import { ref, onMounted, computed, watch, nextTick } from 'vue';
 import { http } from '@/utils/http'
-import { TipsUtils, phoneHide, RouterUtils,debounce } from '@/utils/util';
+import { TipsUtils, phoneHide, RouterUtils, debounce } from '@/utils/util';
 interface Props {
 	listData?: any;
 	itemList?: any;
@@ -149,6 +151,10 @@ const props = withDefaults(defineProps<Props>(), {
 const selectPopup = ref();
 const orderPopup = ref();
 const weekDayDate = ref('');
+const displayPhone = computed({
+	get: () => phoneHide(orderDetailPhone.value),
+	set: (value: any) => { orderDetailPhone.value = value }
+})
 onMounted(() => {
 
 })
@@ -164,7 +170,7 @@ watch(
 			typeof deteSelIndex === 'number' &&
 			listData.stadiumConcertsVOList[deteSelIndex]
 		) {
-			weekDayDate.value = listData.stadiumConcertsVOList[deteSelIndex||0].weekDayDate;
+			weekDayDate.value = listData.stadiumConcertsVOList[deteSelIndex || 0].weekDayDate;
 		} else if (deteObj && deteObj.dateLabel && listData && Array.isArray(listData.stadiumConcertsVOList)) {
 			const match = listData.stadiumConcertsVOList.find(item => item.weekDayAndDate === deteObj.dateLabel);
 			weekDayDate.value = match ? match.weekDayDate : '';
@@ -204,19 +210,20 @@ const selArr = ref([])
 const selectItem = (item1, item2) => {
 	console.log(props.listData, '场次选择');
 	const existingIndex = selArr.value.findIndex(item => item.id === item2.id);
-	if (selArr.value.length >= props.listData.buyLimit) return TipsUtils.tips_toast(`最多选择${props.listData.buyLimit}个场次`)
-
 	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,
-			date: weekDayDate.value // 记录选择时的日期
-		});
+		return;
+	}
+	if (selArr.value.length >= props.listData.buyLimit) {
+		return TipsUtils.tips_toast(`最多选择${props.listData.buyLimit}个场次`);
 	}
+	selArr.value.push({
+		name: item1.sitePlaceName,
+		time: item2.startTime + '-' + item2.endTime,
+		price: item2.price,
+		id: item2.id,
+		date: weekDayDate.value // 记录选择时的日期
+	});
 }
 
 const isSelected = (concert) => {
@@ -245,10 +252,12 @@ const submit_order = () => {
 
 const previewgymOrderDetail = ref()
 const isopenDetail = ref(false)
+const orderDetailPhone = ref()
 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
+		orderDetailPhone.value = phoneHide(res.result.mobile)
 		isopenDetail.value = true
 		orderFormData.value.productIds = res.result.timePeriod.map(item => {
 			// 找到 selArr 里对应的 item,取其 date
@@ -262,6 +271,12 @@ const get_previewOrderPlaceGymnasiumChartered = () => {
 		}, 500)
 	})
 }
+
+const orderDetailPhoneBlur = () => {
+	http.get('/user/updateUserInfo', { data: { phone: orderDetailPhone.value }, loading: true }).then((res) => {
+	})
+}
+
 // 提交订单
 const orderFormData = ref({
 	type: 0,
@@ -271,39 +286,42 @@ const orderFormData = ref({
 })
 const submitOrderImpl = () => {
 	http.post('/order/createOrder', orderFormData.value, { loading: true }).then((res) => {
-		getOrderQuery(res.result.orderCode,res.result.orderId)
+		getOrderQuery(res.result.orderCode, res.result.orderId)
 	})
 }
 
 const submitOrder = debounce(submitOrderImpl, 500)
 
 // code编码 "100001支付成功";"100002查询失败"; "100003查询中 "; "100004支付失败"
-const getOrderQuery = (orderCode: string,orderId: string, retryCount = 0) => {
-    http.get('/order/orderQuery', { data: { orderCode: orderCode }, loading: true }).then((res) => {
-        if (res.result == '100001') {
-            		RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${orderId}&orderType=${orderFormData.value.orderType}`)
-        } else if (retryCount <= 3) {
-            setTimeout(() => {
-                getOrderQuery(orderCode,orderId, retryCount + 1)
-            }, 1000)
-        } else {
-            if (res.result == '100003') {
-                console.log('查询中,但已达到最大查询次数')
-            } else if (res.result == '100002') {
-                console.log('查询失败')
-            } else if (res.result == '100004') {
-                console.log('支付失败')
+const getOrderQuery = (orderCode: string, orderId: string, retryCount = 0) => {
+	http.get('/order/orderQuery', { data: { orderCode: orderCode }, loading: true }).then((res) => {
+		if (res.result == '100001') {
+			RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${orderId}&orderType=${orderFormData.value.orderType}`)
+			selectPopup.value?.close()
+			orderPopup.value?.close()
+			selArr.value = []
+		} else if (retryCount <= 3) {
+			setTimeout(() => {
+				getOrderQuery(orderCode, orderId, retryCount + 1)
+			}, 1000)
+		} else {
+			if (res.result == '100003') {
+				console.log('查询中,但已达到最大查询次数')
+			} else if (res.result == '100002') {
+				console.log('查询失败')
+			} else if (res.result == '100004') {
+				console.log('支付失败')
 				TipsUtils.tips_toast('支付失败')
-            }
-        }
-    }).catch((error) => {
-        console.error('查询订单失败:', error)
-        if (retryCount < 2) { 
-            setTimeout(() => {
-                getOrderQuery(orderCode,orderId, retryCount + 1)
-            }, 1000)
-        }
-    })
+			}
+		}
+	}).catch((error) => {
+		console.error('查询订单失败:', error)
+		if (retryCount < 2) {
+			setTimeout(() => {
+				getOrderQuery(orderCode, orderId, retryCount + 1)
+			}, 1000)
+		}
+	})
 }
 </script>
 
@@ -630,6 +648,10 @@ const getOrderQuery = (orderCode: string,orderId: string, retryCount = 0) => {
 			font-weight: bold;
 			font-size: 28rpx;
 			color: #222222;
+
+			.phone {
+				width: 210rpx;
+			}
 		}
 
 		.tips {

+ 25 - 17
src/pages/index/gymDetail/index.vue

@@ -27,7 +27,7 @@
 				</view>
 			</view>
 			<view class="star">
-				<zzx-icon name="star" size="12"></zzx-icon>
+				<uni-rate :readonly="true" :allowHalf="true" size="16" :value="detailInfo.goodRate" />
 				<text>{{ detailInfo.goodRate || '0.0' }}</text>
 			</view>
 		</view>
@@ -102,7 +102,8 @@
 								:key="item.id" @click="open_popup(item, index)">
 								<view class="today">{{ item.dateLabel }}</view>
 								<view class="time">最早{{ item.startTime }}可订</view>
-								<view class="price" v-if="item.sellingPrice">¥{{ item.sellingPrice.toFixed(2) }}起</view>
+								<view class="price" v-if="item.sellingPrice">¥{{ item.sellingPrice?.toFixed(2) }}起
+								</view>
 							</view>
 							<view class="not-data" v-if="charteredList.timeSlot?.length < 1">暂无可选时间</view>
 						</scroll-view>
@@ -126,8 +127,8 @@
 						</view> -->
 						<view class="price-info">
 							<view class="price">
-								<view class="" v-if="item.sellingPrice">¥{{ item.sellingPrice.toFixed(2) }}</view>
-								<view class="" v-if="item.originalPrice">¥{{ item.originalPrice.toFixed(2) }}</view>
+								<view class="" v-if="item.sellingPrice">¥{{ item?.sellingPrice?.toFixed(2) }}</view>
+								<view class="" v-if="item.originalPrice">¥{{ item?.originalPrice?.toFixed(2) }}</view>
 							</view>
 							<view class="price-btn"
 								@click="RouterUtils.to_page(`/pages/index/gymPay/index?type=1&placeId=${item.id}`)">抢购
@@ -173,8 +174,8 @@
 							{{ item.address }} {{ item.km || '--' }}km
 						</view>
 						<view class="price">
-							<view class="">¥{{ item.sellingPrice.toFixed(2) }}</view>
-							<view class="">¥{{ item.originalPrice.toFixed(2) }}</view>
+							<view class="" v-if="item?.sellingPrice">¥{{ item?.sellingPrice?.toFixed(2) }}</view>
+							<view class="" v-if="item?.originalPrice">¥{{ item?.originalPrice?.toFixed(2) }}</view>
 						</view>
 						<view class="course-count">
 							{{ item.period }}课时 {{ item.startTime }}-{{ item.endTime }}
@@ -185,14 +186,14 @@
 							</view>
 							<view class="price-btn"
 								@click="RouterUtils.to_page(`/pages/index/courseDetail/index?id=${item.id}&type=2`)">
-								免费试听
+								{{ item.hasDiscount ? '免费试听' : '立即购买' }}
 							</view>
 						</view>
 					</view>
 				</view>
 			</block>
 			<loading v-else />
-			<view class="not-data" v-if="courseList?.length < 1 && !courseLoading">暂无数据</view>
+			<view class="not-data" v-if="courseList?.length == 0 && !courseLoading">暂无数据</view>
 			<!-- <view class="more">查看更多</view> -->
 		</view>
 		<view class="instructor-card" id="schedule">
@@ -208,8 +209,10 @@
 							<image :src="item.avatar" mode=""></image>
 							<image src="/src/static/badge.png" mode=""></image>
 						</view>
-						<view class="instructor-name">{{ item.name }}</view>
-						<view class="instructor-specialty">篮球</view>
+						<view class="instructor-name textHidden">{{ item.name }}</view>
+						<view class="instructor-specialty textHidden">
+							<text v-for="(category, index) in item.category" :key="index">{{ category }},</text>
+						</view>
 					</view>
 				</view>
 			</scroll-view>
@@ -220,7 +223,7 @@
 				<view class="comments">
 					<view class="a-star">
 						<zzx-icon name="star" size="10"></zzx-icon>
-						<text>{{ appraiseList.averageScore }}</text>
+						<text v-if="appraiseList?.averageScore">{{ appraiseList?.averageScore?.toFixed(1) }}</text>
 					</view>
 					<view class="a-text">| {{ appraiseList.scoreNum }}人评论</view>
 				</view>
@@ -234,7 +237,7 @@
 					<view class="time">{{ DateUtils.formatDateToMMDD(item.createTime) }}</view>
 				</view>
 				<view class="a-score">
-					<text>{{ item.score.toFixed(1) }}</text>
+					<text>{{ item.score?.toFixed(1) }}</text>
 					<uni-rate :readonly="true" size="16" :value="item.score" />
 				</view>
 				<view class="a-content">
@@ -404,6 +407,8 @@ const open_map = () => {
 	uni.openLocation({
 		latitude: detailInfo.value.latitude,
 		longitude: detailInfo.value.longitude,
+		name: detailInfo.value.name,
+		address: detailInfo.value.address,
 		success: function () {
 			console.log('success');
 		}
@@ -454,11 +459,11 @@ const get_allCategory = () => {
 // 课程列表
 const courseList = ref([])
 const courseLoading = ref(false)
-const get_courseList = (categoryId) => {
+const get_courseList = (categoryId: string) => {
 	courseLoading.value = true
 	http.get('/detail/courseInfoVOList', { data: { categoryId: categoryId, id: listId.value, longitude: cache.get('LON'), latitude: cache.get('LAT') } }).then((res) => {
-		courseList.value = res.result
 		courseLoading.value = false
+		courseList.value = res.result
 	})
 }
 
@@ -506,14 +511,14 @@ const serveTips = (e) => {
 const placedata = ref()
 const selItems = ref()
 const get_placeInfoDetail = (catId: any, dateIndex: any) => {
-	http.get('/stadium/getPlaceInfo', { data: { siteId: listId.value, categoryId: catId } }).then((res) => {
+	http.get('/stadium/getPlaceInfo', { data: { siteId: listId.value, categoryId: catId }, loading: true }).then((res) => {
 		placedata.value = res.result
-		selItems.value = res.result.stadiumConcertsVOList[dateIndex].concertsVOList
+		selItems.value = res.result?.stadiumConcertsVOList[dateIndex]?.concertsVOList
 	})
 }
 
 const onchange = (e, i) => {
-	selItems.value = e.concertsVOList
+	selItems.value = e?.concertsVOList
 	selIndex.value = i
 }
 
@@ -598,6 +603,7 @@ const getFindByOrderPage = () => {
 			display: flex;
 			align-items: center;
 			gap: 20rpx;
+
 			.open-status {
 				font-size: 24rpx;
 				color: #4DD951;
@@ -1185,11 +1191,13 @@ const getFindByOrderPage = () => {
 				}
 
 				.instructor-name {
+					width: 120rpx;
 					font-size: 28rpx;
 					font-weight: 600;
 				}
 
 				.instructor-specialty {
+					width: 120rpx;
 					font-size: 22rpx;
 					color: #AAAAAA;
 				}

+ 23 - 8
src/pages/index/gymPay/index.vue

@@ -44,11 +44,10 @@
 				</view>
 			</view>
 			<view class="subtotal">小计 ¥
-				<text v-if="buyType == 1">{{ (0+ totalInsurePrice).toFixed(2) }}</text>
+				<text v-if="buyType == 1">{{ (0 + totalInsurePrice).toFixed(2) }}</text>
 				<text v-else>{{ previewCourseInfo?.originalPrice ? (previewCourseInfo?.sellingPrice *
-					countTotal).toFixed(2) :
-					(previewCourseInfo?.sellingPrice.toFixed(2) - (previewCourseInfo?.sellingPrice -
-						previewCourseInfo?.totalPrice.toFixed(2))) * countTotal }}</text>
+					countTotal).toFixed(2) : ((previewCourseInfo?.sellingPrice - (previewCourseInfo?.sellingPrice
+						- previewCourseInfo?.totalPrice)) * countTotal).toFixed(2) }}</text>
 			</view>
 		</view>
 		<!-- 课程进入 -->
@@ -68,7 +67,7 @@
 					</view>
 					<view class="r-insurance-type">保险公司:{{ item.insuranceName_dictText }}</view>
 					<view class="r-insurance-price">
-						<view class="r-price">¥{{ insurePrice }}/天·人</view>
+						<view class="r-price">¥{{ item.priceDataList[0].insurePrice }}/天·人</view>
 						<view class="r-insurance-btn" v-if="insureData.length < 1"
 							@click="gotoInsuracePage(item, item.priceDataList)">去投保
 						</view>
@@ -130,20 +129,34 @@
 		</view>
 		<view class="g-usetips-card">
 			<view class="use-title">{{ placeId ? '使用须知' : '购买须知' }}</view>
+			<block v-if="previewCourseInfo?.usableCount && previewCourseInfo?.indate">
+				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">有效期</view>
+				<view class="use-text">购买后{{ previewCourseInfo?.indate }}天有效</view>
+				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">除外日期</view>
+				<view class="use-text">每<text v-for="item in previewCourseInfo?.downTime">{{ '周' + item + ','
+				}}</text>不可用
+				</view>
+				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">预约信息</view>
+				<view class="use-text">请你提前{{ previewCourseInfo?.advanceTime }}天预约</view>
+				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">适用人数</view>
+				<view class="use-text">每张券最多{{ previewCourseInfo?.usableCount }}人使用</view>
+				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">温馨提示</view>
+			</block>
 			<view class="use-text">
 				<view class="item-text">
 					<rich-text :nodes="previewCourseInfo?.reminder"></rich-text>
 				</view>
 			</view>
-			<view class="use-tips-more"
+			<!-- <view class="use-tips-more"
 				@click="RouterUtils.to_page(`/pages/index/useNotice/index?reminder=${previewCourseInfo?.reminder}`)">
 				<view class="more-text">查看更多</view>
 				<view class="use-line"></view>
-			</view>
+			</view> -->
 		</view>
 		<view class="g-usetips-card">
 			<view class="use-title">服务保障</view>
 			<view class="use-text">
+				<view>退款规则</view>
 				<view class="item-text">
 					{{ previewCourseInfo?.refundType == 1 ? '未消费随时退款,过期未消费自动退款。' : '不支退款,请慎重考虑后购买。' }}
 				</view>
@@ -265,9 +278,11 @@ const get_userData = () => {
 }
 
 const deleteUser = async (e) => {
-	let res:any = await TipsUtils.tips_alert('确定删除该用户吗?', true)
+	let res: any = await TipsUtils.tips_alert('确定删除该用户吗?', true)
 	if (res.confirm) {
 		userData.value = userData.value.filter(user => user.id !== e.id)
+		let familyIds = userData.value.map(item => item.id)
+		orderFormData.value.familyIds = familyIds.join(',')
 	}
 }
 

+ 11 - 2
src/pages/index/index.vue

@@ -87,10 +87,11 @@
 					<zzx-icon name="right" size="14"></zzx-icon>
 				</view>
 				<view class="commonweal-detail">
-					<view class="detail-list" v-for="item in gyCourseList" :key="item.id">
+					<view class="detail-list" v-for="item in stCourseList" :key="item.id">
 						<image :src="item.cover"></image>
 						<view class="detail-text">免费</view>
 					</view>
+					<view class="not-data" v-if="stCourseList.length == 0">暂无课程数据</view>
 				</view>
 			</view>
 			<view class="audition" @click="gotoPage(`/pages/index/training/index?priceType=0`)">
@@ -102,11 +103,12 @@
 					<zzx-icon name="whiteRight" size="14"></zzx-icon>
 				</view>
 				<view class="audition-detail">
-					<view class="detail-list" v-for="item in stCourseList" :key="item.id">
+					<view class="detail-list" v-for="item in gyCourseList" :key="item.id">
 						<image :src="item.cover"></image>
 						<view class="detail-text">¥{{ item.sellingPrice || '0' }}</view>
 					</view>
 				</view>
+				<view class="not-data" v-if="gyCourseList.length == 0">暂无课程数据</view>
 			</view>
 		</view>
 		<view class="hot-instructor" v-if="!indexLoading">
@@ -265,9 +267,15 @@ const get_logininfo = (item: string) => {
 		TipsUtils.tips_toast('登录成功')
 		if (cache.get('SHARER_ID') && token.value) {
 			gotoPage('/pages/index/userList/index')
+			setTimeout(() => {
+				cache.remove('SHARER_ID')
+			}, 500)
 		}
 		if (cache.get('COURSE_ID') && token.value) {
 			gotoPage(`/pages/index/courseDetail/index?id=${cache.get('COURSE_ID')}`)
+			setTimeout(() => {
+				cache.remove('COURSE_ID')
+			}, 500)
 		}
 	})
 }
@@ -368,6 +376,7 @@ const get_indexInfo = () => {
 	http.get('/home/homeInfo').then((res) => {
 		indexLoading.value = false
 		bannerList.value = res.result.bannerList
+		// item.priceType === 0精品,1免费
 		gyCourseList.value = res.result.courseList.filter(item => item.priceType === 0)
 		stCourseList.value = res.result.courseList.filter(item => item.priceType === 1)
 		instructorList.value = res.result.instructorList

+ 1 - 1
src/pages/index/messageNotice/index.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="m-message-card" v-for="item in indexMsg" :key="item.id" @click="to_detail(item)">
 			<view class="m-message">
-				<view class="message textHidden">{{item.titile}}</view>
+				<view class="message textHidden">{{item?.titile}}</view>
 				<view class="date">{{item.sender}} {{item.sendTime}}</view>
 			</view>
 			<view class="message-img">

+ 3 - 1
src/pages/index/submitOrder/index.vue

@@ -52,7 +52,7 @@
 					</view>
 					<view class="r-insurance-type">保险公司:{{ item.insuranceName_dictText }}</view>
 					<view class="r-insurance-price">
-						<view class="r-price">¥{{ insurePrice }}/天·人</view>
+						<view class="r-price">¥{{ item.priceDataList[0].insurePrice }}/天·人</view>
 						<view class="r-insurance-btn" v-if="insureData.length < 1"
 							@click="gotoInsuracePage(item, item.priceDataList)">去投保
 						</view>
@@ -340,6 +340,8 @@ const deleteUser = async (e) => {
 	let res = await TipsUtils.tips_alert('确定删除该用户吗?', true)
 	if (res.confirm) {
 		userData.value = userData.value.filter(user => user.id !== e.id)
+		let familyIds = userData.value.map(item => item.id)
+		orderFormData.value.familyIds = familyIds.join(',')
 	}
 }
 

+ 60 - 31
src/pages/index/toBeUsed/index.vue

@@ -10,22 +10,25 @@
 		</view>
 		<view class="t-header" v-else>
 			<view class="title">{{ orderDetailInfo?.orderStatus }}</view>
-			<view style="display: flex;gap: 10rpx;">
+			<view style="display: flex;gap: 10rpx;flex-wrap: wrap;">
 				<view class="time" v-for="item in orderDetailInfo?.proInfoList" :key="item.id">
-					<text style="color: #FB5B5B;" v-if="item.type != 6">{{ item.userName }}</text>
-					<!-- 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款 -->
-					<text v-if="item.type != 6">{{ getStatusText(item.orderStatus) }}</text>
-					<!-- <text v-if="orderDetailInfo?.orderStatus == '待使用'">,请按课表到上课地点按时上课。</text> -->
+					<block v-if="item.userName">
+						<!-- v-if="item.type != 6" -->
+						<text style="color: #FB5B5B;" v-if="item.type != 6">{{ item.userName }}</text>
+						<!-- 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款 -->
+						<text v-if="item.type != 6">{{ getStatusText(item.orderStatus) }}</text>
+						<!-- <text v-if="orderDetailInfo?.orderStatus == '待使用'">,请按课表到上课地点按时上课。</text> -->
+					</block>
 				</view>
 			</view>
 		</view>
-		<!-- <view class="t-booking-card" v-if="orderPageInfo?.orderType == ">
+		<view class="t-booking-card" v-if="orderDetailInfo?.advanceTime">
 			<view class="booking-text">
 				<view class="b-title">请您提前联系场馆进行预约</view>
-				<view class="b-text">请提前一天预约>场馆确认>到馆消费</view>
+				<view class="b-text">请提前{{ orderDetailInfo?.advanceTime }}小时预约>场馆确认>到馆消费</view>
 			</view>
-			<view class="booking-btn">立即预约</view>
-		</view> -->
+			<view class="booking-btn" @click="submitBooking">立即预约</view>
+		</view>
 		<!-- 场地 -->
 		<view class="c-scheduled-card" v-if="orderPageInfo?.orderType == 0 || orderPageInfo?.orderType == 1">
 			<view class="title">预定信息</view>
@@ -39,7 +42,7 @@
 					<view class="time-box" v-for="item in orderDetailInfo?.proInfoList" :key="item.id">
 						<view class="time" v-if="item.type != 6">{{ item.useDateStr }} {{ item.frameTimeStr }} {{
 							item.productName }}</view>
-						<view class="status" v-if="orderPageInfo?.orderType == 1">已退款</view>
+						<!-- <view class="status" v-if="orderPageInfo?.orderType == 1">已退款</view> -->
 					</view>
 				</view>
 			</view>
@@ -69,10 +72,19 @@
 					<!-- refundType:退款类型;0可退/到期自动退 1限时退 2不可退" -->
 					<view class="shoping-refund" v-if="orderDetailInfo?.runType == 0">全天</view>
 					<view class="shoping-refund" v-else>
-						{{ DateUtils.formatDateToHHmm(orderDetailInfo?.createTime) + '-' +
-							DateUtils.formatDateToHHmm(orderDetailInfo?.endTime) }}
+						<!-- {{ DateUtils.formatDateToHHmm(orderDetailInfo?.createTime) + '-' +DateUtils.formatDateToHHmm(orderDetailInfo?.endTime) }} -->
+						{{ orderDetailInfo?.startTime }}-{{ orderDetailInfo?.endTime }}
+					</view>
+					<view class="shoping-refund" style="display: flex;align-items: center;"
+						v-if="orderDetailInfo?.gameScheduleNum"
+						@click="RouterUtils.to_page(`/pages/index/gamePlan/index?orderId=${orderDetailInfo?.id}`)">
+						<text>篮球赛</text>
+						<text>{{ orderDetailInfo?.gameScheduleNum }}场</text>
+						<zzx-icon name="ashRight" size="10"></zzx-icon>
 					</view>
-					<view class="shoping-refund">{{ orderDetailInfo?.refundType == 2 ? '不支持退款' : '随时退·过期退' }}</view>
+					<view class="shoping-refund" v-if="orderDetailInfo?.refundType">{{ orderDetailInfo?.refundType == 2
+						?
+						'不支持退款' : '随时退·过期退' }}</view>
 					<view class="shoping-price" @click="pricePopup.open()">
 						<view class="price">¥{{ orderDetailInfo?.totalPrice.toFixed(2) }}</view>
 						<view class="text">
@@ -102,7 +114,7 @@
 		</view>
 		<!-- 待使用展示 -->
 		<view class="t-qrcode-card"
-			v-if="orderPageInfo?.orderType == 2 || orderPageInfo?.orderType == 5 || orderPageInfo?.orderType == 1 || orderPageInfo?.orderType == 3 || orderPageInfo?.orderType == 4">
+			v-if="orderPageInfo?.orderType == 2 || orderPageInfo?.orderType == 5 || orderPageInfo?.orderType == 1 || orderPageInfo?.orderType == 3 || orderPageInfo?.orderType == 4&&orderDetailInfo?.orderStatus!=0">
 			<block v-if="orderDetailInfo?.orSchoolCourse != 1">
 				<view class="qrcode-box">
 					<view class="item-qrcode">
@@ -115,21 +127,26 @@
 			<view class="t-todeused">
 				<view class="todeused">
 					<view class="text">{{ orderDetailInfo?.orderStatus }}</view>
-					<view class="time" v-if="orderDetailInfo?.appCourses?.endTime || orderDetailInfo?.endTime">{{
-						orderDetailInfo?.appCourses?.endTime || orderDetailInfo?.endTime }} 到期</view>
+					<view class="time" v-if="orderDetailInfo?.appCourses?.endTime || orderDetailInfo?.endTime">
+						<!-- {{ orderDetailInfo?.appCourses?.endTime || orderDetailInfo?.endTime }} -->
+						{{ orderDetailInfo?.proInfoList[0].expireTime }}
+						到期
+					</view>
 				</view>
-				<!-- 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款 -->
+				<!-- orderStatus:0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款 -->
+				<!-- type:0-学校 1-包场 2-无固定场 3-个人赛 4-团队赛 5-课程 6-保险 -->
 				<view class="order-num" v-for="item in orderDetailInfo?.proInfoList" :key="item.id">
 					<text v-if="item.type != 6">{{ item.ticketNo }}&nbsp;&nbsp; {{ item.userName }}</text>
 					<zzx-icon v-if="item.type != 6" name="ashRight" size="12"></zzx-icon>
-					<view v-if="item.type != 6" class="t-use-status">{{ getStatusText(item.orderStatus) }}</view>
+					<!-- <view v-if="item.type != 6" class="t-use-status">{{ getStatusText(item.orderStatus) }}</view> -->
+					 <text v-if="item.type != 6&&orderPageInfo?.orderType == 1">{{ item.expireTime }}到期</text>
 					<!-- 体育馆包场和无固定场 -->
 					<!-- <view>申请退款</view> -->
 				</view>
 			</view>
 		</view>
 		<!-- 已使用已过期展示 -->
-		<view class="t-qrcode-card" v-if="orderPageInfo?.orderType == 1">
+		<!-- <view class="t-qrcode-card" v-if="orderPageInfo?.orderType == 1">
 			<view class="t-todeused" v-for="item in 2" style="border-bottom: 1rpx solid #F0F0F0;">
 				<view class="todeused">
 					<view class="item-todeused">
@@ -143,7 +160,7 @@
 					<zzx-icon name="ashRight" size="12"></zzx-icon>
 				</view>
 			</view>
-		</view>
+		</view> -->
 		<!-- 学校场地预定订单详情展示 -->
 		<!-- <view class="t-scheduled-card" v-if="orderPageInfo?.orderType == 2">
 			<view class="s-title">预定信息</view>
@@ -182,18 +199,21 @@
 				</view>
 			</view>
 		</view>
+		<view class="t-use-card" v-if="orderDetailInfo?.earlyRefundTime">
+			<view class="use-tips">
+				<view class="title">退改规则</view>
+				<view class="text">
+					每场次开场前{{ orderDetailInfo?.earlyRefundTime }}分钟之前可随时退款,之后不可退款,如您有疑问,可联系场馆
+				</view>
+			</view>
+		</view>
 		<view class="t-use-card">
 			<view class="use-tips">
-				<view class="title">使用须知</view>
+				<view class="title">{{ orderPageInfo?.orderType == 1 ? '温馨提示' : '使用须知' }}</view>
 				<view class="text">
-					<!-- {{ orderDetailInfo?.reminder }} -->
-					<rich-text :nodes="orderDetailInfo?.reminder"></rich-text>
+					<rich-text :nodes="fixImgStyle(orderDetailInfo?.reminder)"></rich-text>
 				</view>
 			</view>
-			<!-- <view class="check-all">
-				<text>查看全部</text>
-				<zzx-icon name="ashRight" size="12"></zzx-icon>
-			</view> -->
 		</view>
 		<view class="t-use-card" v-if="orderDetailInfo?.insureOrderInfoList">
 			<view class="use-tips">
@@ -220,7 +240,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="t-use-card" v-if="orderPageInfo?.orderType == 5">
+		<view class="t-use-card" v-if="orderPageInfo?.orderType == 5 && queryWaitSignList?.length > 0&&orderDetailInfo?.orderStatus!=0">
 			<view class="use-tips t-contract-list">
 				<view class="title">电子合同</view>
 				<view class="text contract-list">
@@ -287,9 +307,10 @@
 				</view>
 			</view>
 		</view>
-		<view class="t-morefeatures-card" v-if="orderDetailInfo?.gameCertification">
+		<view class="t-morefeatures-card" v-if="orderPageInfo?.orderType == 3 || orderPageInfo?.orderType == 4">
 			<view class="morefeatures-title">更多功能</view>
-			<view class="morefeatures-btn">查看成绩</view>
+			<view class="morefeatures-btn"
+				@click="RouterUtils.to_page(`/pages/index/gameResult/index?orderId=${orderDetailInfo?.id}`)">查看成绩</view>
 		</view>
 		<!-- 已使用展示 -->
 		<view class="appraise-btn" v-if="orderPageInfo?.orderType != 3 && orderDetailInfo?.orderStatus == '已使用'"
@@ -384,7 +405,7 @@
 
 <script lang="ts" setup>
 import { ref, onMounted } from 'vue';
-import { TipsUtils, RouterUtils, DateUtils, _previewImage } from '@/utils/util'
+import { TipsUtils, RouterUtils, DateUtils, _previewImage, fixImgStyle } from '@/utils/util'
 import { onLoad, onShow, onShareAppMessage } from '@dcloudio/uni-app';
 import { http } from '@/utils/http'
 import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
@@ -476,11 +497,19 @@ const refund_btn = () => {
 	RouterUtils.to_page('/pages/index/refundDetail/index')
 }
 
+const submitBooking = () => {
+	uni.makePhoneCall({
+		phoneNumber: orderDetailInfo.value.phone
+	});
+}
+
 // 打开地图
 const open_map = () => {
 	uni.openLocation({
 		latitude: orderDetailInfo.value.latitude,
 		longitude: orderDetailInfo.value.longitude,
+		name: orderDetailInfo.value.siteName || orderDetailInfo.value.schoolAddress,
+		address: orderDetailInfo.value.courseSiteAddress,
 		success: function () {
 			console.log('success');
 		}

+ 1 - 1
src/pages/index/venue/index.vue

@@ -24,7 +24,7 @@
 					<view class="venues-comments">
 						<view class="star">
 							<zzx-icon name="star" size="12"></zzx-icon>
-							<text style="margin-bottom: 4rpx;">{{item.goodRate||0}}</text>
+							<text style="margin-bottom: 4rpx;">{{item.goodRate.toFixed(1)||0}}</text>
 						</view>
 						<view class="comment">
 							{{item.comments||0}}条评论

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

@@ -123,6 +123,8 @@ onLoad((options) => {
 	console.log(options)
 	formData.value.orderId = options.orderId
 	proInfoList.value = JSON.parse(options.proInfoList)
+	proInfoList.value = proInfoList.value.filter((item: any) => item.type === 5)
+	console.log(proInfoList.value);
 	range.value = proInfoList.value.map((item:any,index:number) => ({
 		value: index,
 		text: `${item.ticketNo} ${item.userName}`

+ 4 - 4
src/pages/mine/orderInfo/index.vue

@@ -8,7 +8,7 @@
 		<view class="o-orderlist-card" v-for="item in orderList" :key="item.orderId"
 			@click="RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${item.orderId}&orderType=${item.orderType}`)">
 			<view class="o-order-name">
-				<view class="order-name">场地:{{ item.orderProInfoList[0].address || '--' }}</view>
+				<view class="order-name">{{item.orderType==5?'上课地点':'场地'}}:{{ item.orderProInfoList[0].address || '--' }}</view>
 				<!-- 待付款 -->
 				<view class="order-status" v-if="item.orderStatus == 0">待支付(剩余{{ item.downTime }})</view>
 				<view class="item-order-status" style="color:#FB5B5B;" v-if="item.orderStatus == 1">待使用</view>
@@ -114,7 +114,7 @@ onLoad((option) => {
 })
 
 onReachBottom(() => {
-	orderFormData.value.pageNum++;
+	orderFormData.value.pageNo++;
 	getOrderList()
 })
 
@@ -144,7 +144,7 @@ const selectedItem = (i) => {
 
 // 获取订单数据
 const orderFormData = ref({
-	pageNum: 1,
+	pageNo: 1,
 	pageSize: 10,
 	orderStatus: null,
 	orAfterSale: 0
@@ -153,7 +153,7 @@ const orderList = ref([])
 // 订单状态 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-待退款 6已退款
 const getOrderList = () => {
 	http.post('/order/pageOrders', orderFormData.value, { loading: true }).then((res) => {
-		if (orderFormData.value.pageNum == 1) {
+		if (orderFormData.value.pageNo == 1) {
 			orderList.value = res.result.records
 		} else {
 			orderList.value = [...orderList.value, ...res.result.records]

+ 2 - 2
src/styles/variables.less

@@ -32,9 +32,9 @@
 		}
 		
 		.not-data{
-			 height: 100rpx;
+			 height: 124rpx;
 			 text-align: center;
 			 font-size: 24rpx;
 			 color: #999999;
-			 line-height: 100rpx;
+			 line-height: 124rpx;
 		}

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

@@ -179,9 +179,9 @@ export class HttpClient {
 
 // 创建实例
 export const http = new HttpClient({
-  // baseURL: 'http://192.168.1.34:8080/jeecg-boot/app',
+  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.0.11:8080/jeecg-boot/app',
   headers: {
     'Content-Type': 'application/json'
   }