Bladeren bron

分班bug修复

学习?学个屁 5 dagen geleden
bovenliggende
commit
7532706dca

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

@@ -140,7 +140,8 @@
 				<view class="buy-text">抢购</view>
 				<view class="buy-price">
 					<text>¥{{ courseDetailInfo?.sellingPrice }}</text>
-					<text>省10</text>
+					<text v-if="courseDetailInfo?.originalPrice">省{{ (courseDetailInfo?.originalPrice -
+							courseDetailInfo?.sellingPrice) }}</text>
 				</view>
 			</view>
 			<block v-else>

+ 33 - 30
src/pages/index/gymPay/index.vue

@@ -36,10 +36,8 @@
 						<!-- <text v-if="buyType == 0 || !placeId">{{ previewCourseInfo?.discountPrice }}</text> -->
 						<text v-if="buyType == 1">{{ previewCourseInfo?.sellingPrice.toFixed(2) }}</text>
 						<text v-else>{{
-							previewCourseInfo?.originalPrice ? (previewCourseInfo?.originalPrice -
-								previewCourseInfo?.sellingPrice.toFixed(2)) * countTotal : ((previewCourseInfo?.sellingPrice
-									-
-									previewCourseInfo?.totalPrice.toFixed(2))) * countTotal }}</text>
+							previewCourseInfo?.originalPrice ? ((previewCourseInfo?.originalPrice -
+								previewCourseInfo?.sellingPrice.toFixed(2)) * countTotal).toFixed(2) : (((previewCourseInfo?.sellingPrice-previewCourseInfo?.totalPrice.toFixed(2))) * countTotal).toFixed(2) }}</text>
 					</view>
 				</view>
 			</view>
@@ -201,10 +199,10 @@
 				<view class="discount">优惠¥
 					<text v-if="buyType == 1">{{ previewCourseInfo?.sellingPrice.toFixed(2) }}</text>
 					<text v-else>{{
-						previewCourseInfo?.originalPrice ? (previewCourseInfo?.originalPrice -
-							previewCourseInfo?.sellingPrice.toFixed(2)) * countTotal : ((previewCourseInfo?.sellingPrice
+						previewCourseInfo?.originalPrice ? ((previewCourseInfo?.originalPrice -
+							previewCourseInfo?.sellingPrice.toFixed(2)) * countTotal).toFixed(2) : (((previewCourseInfo?.sellingPrice
 								-
-								previewCourseInfo?.totalPrice.toFixed(2))) * countTotal }}</text>
+								previewCourseInfo?.totalPrice.toFixed(2))) * countTotal).toFixed(2) }}</text>
 				</view>
 			</view>
 			<view class="footer-btn" @click="submitOrder">
@@ -315,12 +313,13 @@ const get_userData = () => {
 const schoolStudentStatus = ref([])
 const gradeClassInfo = ref([])
 
+// 分班状态监听
 watch(userData, (newUserData) => {
-	schoolStudentStatus.value = new Array(newUserData.length).fill(false);
-	gradeClassInfo.value = new Array(newUserData.length).fill(null).map(() => ({
-		grade: '',
-		class: ''
-	}));
+  schoolStudentStatus.value = new Array(newUserData.length).fill(null); 
+  gradeClassInfo.value = new Array(newUserData.length).fill(null).map(() => ({
+    grade: '',
+    class: ''
+  }));
 }, { immediate: true });
 
 const deleteUser = async (e) => {
@@ -481,24 +480,28 @@ const orderCode = ref(null)
 const orderId = ref(null)
 const submitOrderImpl = () => {
 	orderFormData.value.amount = countTotal.value
-	for (let i = 0; i < userData.value.length; i++) {
-		if (schoolStudentStatus.value[i] === true) {
-			const grade = gradeClassInfo.value[i].grade;
-			const clazz = gradeClassInfo.value[i].class;
-
-			if (!grade || !clazz) {
-				return TipsUtils.tips_toast(`请为${userData.value[i].fullName}输入完整的年级和班级信息`);
-			}
-			const gradeNum = parseInt(grade);
-			const classNum = parseInt(clazz);
-			if (isNaN(gradeNum) || gradeNum < 1 || gradeNum > 12) {
-				return TipsUtils.tips_toast(`请为${userData.value[i].fullName}输入有效的年级(1-12)`);
-			}
-			if (isNaN(classNum) || classNum < 1 || classNum > 40) {
-				return TipsUtils.tips_toast(`请为${userData.value[i].fullName}输入有效的班级(1-40)`);
-			}
-		}
-	}
+ for (let i = 0; i < userData.value.length; i++) {
+    if (schoolStudentStatus.value[i] === null || schoolStudentStatus.value[i] === undefined) {
+      return TipsUtils.tips_toast(`请为${userData.value[i].fullName}选择是否本校学生`);
+    }
+    
+    if (schoolStudentStatus.value[i] === true) {
+      const grade = gradeClassInfo.value[i].grade;
+      const clazz = gradeClassInfo.value[i].class;
+
+      if (!grade || !clazz) {
+        return TipsUtils.tips_toast(`请为${userData.value[i].fullName}输入完整的年级和班级信息`);
+      }
+      const gradeNum = parseInt(grade);
+      const classNum = parseInt(clazz);
+      if (isNaN(gradeNum) || gradeNum < 1 || gradeNum > 12) {
+        return TipsUtils.tips_toast(`请为${userData.value[i].fullName}输入有效的年级(1-12)`);
+      }
+      if (isNaN(classNum) || classNum < 1 || classNum > 40) {
+        return TipsUtils.tips_toast(`请为${userData.value[i].fullName}输入有效的班级(1-40)`);
+      }
+    }
+  }
 	orderFormData.value.addGradeLevelInformation = userData.value.map((user, index) => ({
 		class: schoolStudentStatus.value[index] === true ? gradeClassInfo.value[index].class : '',
 		familyId: user.id,

+ 43 - 15
src/pages/index/toBeUsed/index.vue

@@ -136,7 +136,8 @@
 				</view>
 				<view class="download-qrcode" @click="download_qrcode">下载到手机</view>
 			</block>
-			<view v-if="orderDetailInfo?.orderType == 0" style="color: #222;font-size: 26rpx;">通过学校门口闸机时,通过人脸自动核验</view>
+			<view v-if="orderDetailInfo?.orderType == 0 || orderDetailInfo?.orderType == 5"
+				style="color: #222;font-size: 26rpx;">通过学校门口闸机时,通过人脸自动核验</view>
 			<view class="t-todeused" v-for="(item, index) in orderDetailInfo?.proInfoList" :key="item.id">
 				<view class="todeused">
 					<view class="text">
@@ -158,7 +159,9 @@
 				<!-- type:0-学校 1-包场 2-无固定场 3-个人赛 4-团队赛 5-课程 6-保险 -->
 				<view style="display: flex;align-items: center;justify-content: space-between;">
 					<view class="order-num" @click="selectOrderInfo(item, index)">
-						<text v-if="item.type != 6">{{ item.ticketNo }}&nbsp;&nbsp; {{ item.userName }} {{item.classGroupingName}} {{ item.coachName }}</text>
+						<text v-if="item.type != 6">{{ item.ticketNo }}&nbsp;&nbsp; {{ item.userName }}
+							{{item.classGroupingName }} {{ item.coachName }}</text>
+							<text v-if="!item.classGroupingName&& item.type ==5">暂未分班</text>
 						<zzx-icon v-if="item.type != 6" name="ashRight" size="12"></zzx-icon>
 						<!-- <text v-if="item.type != 6 && orderPageInfo?.orderType == 1">{{ item.expireTime }}到期</text> -->
 					</view>
@@ -235,13 +238,19 @@
 				<view class="text contract-list">
 					<view class="item-no-sign">
 						<view class="sign-title">未签署:</view>
-						<view class="sign-name" v-for="item in notSignList" :key="item.id" @click="checkSign(item)">{{
-							item.fullName }}</view>
+						<view class="sign-names-container">
+							<view class="sign-name" v-for="item in notSignList" :key="item.id" @click="checkSign(item)">
+								{{ item.fullName }}
+							</view>
+						</view>
 					</view>
 					<view class="item-sign">
 						<view class="sign-title">已签署:</view>
-						<view class="sign-name" v-for="item in signList" :key="item.id" @click="checkItemSign(item)">{{
-							item.fullName }}</view>
+						<view class="sign-names-container">
+							<view class="sign-name" v-for="item in signList" :key="item.id" @click="checkSign(item)">
+								{{ item.fullName }}
+							</view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -1411,10 +1420,19 @@ const getSignUrl = (signFlowId: string) => {
 		.contract-list {
 			.item-no-sign {
 				display: flex;
-				align-items: center;
-				gap: 20rpx;
+				flex-wrap: wrap;
 
-				.sign-title {}
+				.sign-title {
+					white-space: nowrap;
+					margin-right: 20rpx;
+				}
+
+				.sign-names-container {
+					display: flex;
+					flex-wrap: wrap;
+					flex: 1;
+					gap: 20rpx;
+				}
 
 				.sign-name {
 					padding: 4rpx 10rpx 4rpx 10rpx;
@@ -1422,23 +1440,33 @@ const getSignUrl = (signFlowId: string) => {
 					background: #F6F6F6;
 					font-size: 24rpx;
 					color: #AAAAAA;
+					white-space: nowrap;
 				}
 			}
 
 			.item-sign {
 				display: flex;
-				align-items: center;
-				gap: 20rpx;
-				margin-top: 20rpx;
+				flex-wrap: wrap;
+
+				.sign-title {
+					white-space: nowrap;
+					margin-right: 20rpx;
+				}
 
-				.sign-title {}
+				.sign-names-container {
+					display: flex;
+					flex-wrap: wrap; 
+					flex: 1;
+					gap: 20rpx;
+				}
 
 				.sign-name {
 					padding: 4rpx 10rpx 4rpx 10rpx;
 					border-radius: 8rpx;
-					background: #FDD143;
+					background: #F6F6F6;
 					font-size: 24rpx;
-					color: #222222;
+					color: #AAAAAA;
+					white-space: nowrap;
 				}
 			}
 		}

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

@@ -55,7 +55,7 @@ export class HttpClient {
   constructor(config: RequestConfig = {}) {
     this.defaults = {
       baseURL: '',
-      timeout: 20000,
+      timeout: 2000000,
       retry: 0,
       retryDelay: 1000,
       loading: false,
@@ -180,8 +180,8 @@ export class HttpClient {
 export const http = new HttpClient({
   // baseURL: 'http://192.168.0.217: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: 'https://api.qlapp.cn/jeecgboot/app', //生产
+  // baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
+  baseURL: 'https://api.qlapp.cn/jeecgboot/app', //生产
   headers: {
     'Content-Type': 'application/json'
   }