فهرست منبع

修复课程相关问题

学习?学个屁 3 روز پیش
والد
کامیت
ab07969d89

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

@@ -145,10 +145,12 @@
 					<view class="buy-text">直接购买</view>
 					<view class="buy-price">
 						<text>¥{{ courseDetailInfo?.sellingPrice }}</text>
-						<text>省{{ (courseDetailInfo?.originalPrice - courseDetailInfo?.sellingPrice) }}</text>
+						<text v-if="courseDetailInfo?.originalPrice">省{{ (courseDetailInfo?.originalPrice -
+							courseDetailInfo?.sellingPrice) }}</text>
 					</view>
 				</view>
 				<view class="gratis" @click="toOrderPage(1)" v-if="courseDetailInfo?.hasDiscount">
+					<view class="gratis-tips">只能试听第一节,请按课表上课,超时作废</view>
 					免费试听
 				</view>
 			</block>
@@ -798,6 +800,20 @@ const fixImgStyle = (html: string) => {
 			color: #222222;
 			text-align: center;
 			line-height: 100rpx;
+			position: relative;
+
+			.gratis-tips {
+				position: absolute;
+				width: 552rpx;
+				height: 80rpx;
+				font-size: 28rpx;
+				color: #FFFFFF;
+				background: rgba(0, 0, 0, 0.6);
+				border-radius: 8rpx;
+				line-height: 80rpx;
+				right: 20rpx;
+				bottom: 110rpx;
+			}
 		}
 	}
 }

+ 36 - 34
src/pages/index/eventsDetail/index.vue

@@ -34,13 +34,13 @@
 		<view class="d-timedown-card">
 			<view class="d-title">距离报名结束</view>
 			<view class="timedown">
-				<view class="time">{{ days? days: '--' }}</view>
+				<view class="time">{{ days ? days : '--' }}</view>
 				<view class="unit">天</view>
-				<view class="time">{{ hours? hours:'--' }}</view>
+				<view class="time">{{ hours ? hours : '--' }}</view>
 				<view class="unit">:</view>
-				<view class="time">{{ minutes ? minutes: '--' }}</view>
+				<view class="time">{{ minutes ? minutes : '--' }}</view>
 				<view class="unit">:</view>
-				<view class="time">{{ seconds ? seconds: '--' }}</view>
+				<view class="time">{{ seconds ? seconds : '--' }}</view>
 			</view>
 			<view class="timedown-tips">
 				<view class="tips-icon">!</view>
@@ -90,7 +90,7 @@
 						<view class="">已报名人数:{{ eventsInfoObj.orderNum }}</view>
 					</view>
 					<view class="cell-num-header">
-						<view class="img" v-for="(item,index) in groupedMessages" :key="index">
+						<view class="img" v-for="(item, index) in groupedMessages" :key="index">
 							<image :src="item.avatar" mode=""></image>
 						</view>
 					</view>
@@ -156,7 +156,7 @@ import { ref, onMounted, computed, onUnmounted, getCurrentInstance, nextTick } f
 import { http } from '@/utils/http';
 import { useCacheStore } from '@/stores/cache';
 import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
-import { RouterUtils, TipsUtils,fixImgStyle } from '@/utils/util';
+import { RouterUtils, TipsUtils, fixImgStyle } from '@/utils/util';
 import { onLoad, onPageScroll } from '@dcloudio/uni-app';
 const statusBarHeight = ref(0);
 const cache = useCacheStore()
@@ -278,36 +278,36 @@ const seconds = ref<string>('00');
 let timer: number | null = null;
 // 将日期字符串转换为 iOS 支持的格式
 const formatDateForIOS = (dateStr: string): string => {
-  // 将 "yyyy-MM-dd HH:mm:ss" 转换为 "yyyy/MM/dd HH:mm:ss"
-  return dateStr.replace(/-/g, '/');
+	// 将 "yyyy-MM-dd HH:mm:ss" 转换为 "yyyy/MM/dd HH:mm:ss"
+	return dateStr.replace(/-/g, '/');
 };
 const updateCountdown = () => {
-  const now = new Date().getTime();
-  // 使用格式化后的日期字符串
-  const formattedEndTime = formatDateForIOS(endTime.value);
-  const endDate = new Date(formattedEndTime).getTime();
-  const timeLeft = endDate - now;
-  if (timeLeft <= 0) {
-    days.value = '00';
-    hours.value = '00';
-    minutes.value = '00';
-    seconds.value = '00';
-    if (timer) {
-      clearInterval(timer);
-      timer = null;
-    }
-    return;
-  }
-  // 计算剩余时间并更新显示
-  const calcDays = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
-  const calcHours = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
-  const calcMinutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
-  const calcSeconds = Math.floor((timeLeft % (1000 * 60)) / 1000);
-
-  days.value = String(calcDays).padStart(2, '0');
-  hours.value = String(calcHours).padStart(2, '0');
-  minutes.value = String(calcMinutes).padStart(2, '0');
-  seconds.value = String(calcSeconds).padStart(2, '0');
+	const now = new Date().getTime();
+	// 使用格式化后的日期字符串
+	const formattedEndTime = formatDateForIOS(endTime.value);
+	const endDate = new Date(formattedEndTime).getTime();
+	const timeLeft = endDate - now;
+	if (timeLeft <= 0) {
+		days.value = '00';
+		hours.value = '00';
+		minutes.value = '00';
+		seconds.value = '00';
+		if (timer) {
+			clearInterval(timer);
+			timer = null;
+		}
+		return;
+	}
+	// 计算剩余时间并更新显示
+	const calcDays = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
+	const calcHours = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
+	const calcMinutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
+	const calcSeconds = Math.floor((timeLeft % (1000 * 60)) / 1000);
+
+	days.value = String(calcDays).padStart(2, '0');
+	hours.value = String(calcHours).padStart(2, '0');
+	minutes.value = String(calcMinutes).padStart(2, '0');
+	seconds.value = String(calcSeconds).padStart(2, '0');
 };
 // 获取详情数据
 const eventsInfoObj = ref({})
@@ -329,6 +329,8 @@ const open_map = () => {
 	uni.openLocation({
 		latitude: eventsInfoObj.value.latitude,
 		longitude: eventsInfoObj.value.longitude,
+		name: eventsInfoObj.value.name,
+		address: eventsInfoObj.value.address,
 		success: function () {
 			console.log('success');
 		}

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

@@ -125,7 +125,7 @@
 						<view class="r-userinfo-item">
 							<view class="r-item-title">被保人</view>
 							<view class="r-item-info">{{ insureUser.userData.length }}人(<text
-									v-for="user in insureUser.userData" :key="user.id">{{ user.fullName }},</text>)
+									v-for="(user,index) in insureUser.userData" :key="user.id">{{ user.fullName }}{{ index < insureUser.userData.length - 1 ? ',' : '' }}</text>)
 							</view>
 						</view>
 						<view class="r-userinfo-item">

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

@@ -87,7 +87,7 @@
 						<view class="r-userinfo-item">
 							<view class="r-item-title">被保人</view>
 							<view class="r-item-info">{{ insureUser.userData.length }}人(<text
-									v-for="user in insureUser.userData" :key="user.id">{{ user.fullName }},</text>)
+									v-for="(user,index) in insureUser.userData" :key="user.id">{{ user.fullName }}{{ index < insureUser.userData.length - 1 ? ',' : '' }}</text>)
 							</view>
 						</view>
 						<view class="r-userinfo-item">

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

@@ -72,7 +72,7 @@
 						<view class="r-userinfo-item">
 							<view class="r-item-title">被保人</view>
 							<view class="r-item-info">{{ insureUser.userData.length }}人(<text
-									v-for="user in insureUser.userData" :key="user.id">{{ user.fullName }},</text>)
+									v-for="(user,index) in insureUser.userData" :key="user.id">{{ user.fullName }}{{ index < insureUser.userData.length - 1 ? ',' : '' }}</text>)
 							</view>
 						</view>
 						<view class="r-userinfo-item">

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

@@ -222,8 +222,8 @@
 					<view class="insureOrder-title">被保人</view>
 					<view class="insureOrder-text" v-if="orderDetailInfo?.insureOrderInfoList">
 						{{ orderDetailInfo?.insureOrderInfoList.length }}人(<text
-							v-for="name in orderDetailInfo?.insureOrderInfoList" :key="name.id">{{ name.familyUserName
-							}}</text>)</view>
+							v-for="(name,index) in orderDetailInfo?.insureOrderInfoList" :key="name.id">{{ name.familyUserName
+							}}{{ index < orderDetailInfo?.insureOrderInfoList.length - 1 ? ',' : '' }}</text>)</view>
 				</view>
 				<view class="t-use-insureOrder">
 					<view class="insureOrder-title">生效时间</view>

+ 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'
   }