فهرست منبع

修复场地数据渲染异常

学习?学个屁 2 روز پیش
والد
کامیت
9a2ee9a5e4

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

@@ -1,7 +1,7 @@
 <template>
 	<zzx-navbar :scrollable="true" :back="true" title="详情"></zzx-navbar>
 	<view class="detail-header">
-		<image class="header-bg" :src="bannerList[0]" mode=""></image>
+		<image class="header-bg" :src="'http://192.168.1.166:8080/jeecg-boot/sys/common/static/'+bannerList[0]" mode=""></image>
 		<view class="back-icon" :style="{paddingTop:(statusBarHeight+10)+'px'}" @click="RouterUtils.back()">
 			<zzx-icon name="back"></zzx-icon>
 		</view>
@@ -11,7 +11,7 @@
 				<block  v-if="courseDetailInfo.video">
 					<video v-for="(item,index) in videoList" :key="index" :src="item"></video>
 				</block>
-				<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="'http://192.168.1.166:8080/jeecg-boot/sys/common/static/'+item" mode=""></image>
 			</view>
 		</scroll-view>
 	</view>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 555 - 685
src/pages/index/gymDetail/index.vue


+ 42 - 15
src/pages/index/gymPay/index.vue

@@ -26,10 +26,14 @@
 						<text v-if="buyType == 1">试听优惠</text>
 						<text v-if="buyType == 0 || placeId">团购优惠</text>
 					</view>
-					<view class="">-¥{{ previewCourseInfo.discountPrice || previewCourseInfo.sellingPrice }}</view>
+					<view class="">-¥{{
+						previewCourseInfo.discountPrice ? previewCourseInfo.discountPrice :
+							(previewCourseInfo.originalPrice - previewCourseInfo.sellingPrice).toFixed(2)
+					}}</view>
 				</view>
 			</view>
-			<view class="subtotal">小计 ¥{{ previewCourseInfo.subtotal }}</view>
+			<view class="subtotal">小计 ¥{{
+				previewCourseInfo.subtotal ? previewCourseInfo.subtotal : previewCourseInfo.sellingPrice }}</view>
 		</view>
 		<!-- 课程进入 -->
 		<view class="r-insurance" v-for="item in insureIdList" :key="item.id">
@@ -87,7 +91,7 @@
 		</view>
 		<view class="g-userinfo-card" v-if="!placeId">
 			<view class="r-user">
-				<view class="user-title">用户信息</view>
+				<view class="user-title">用户信息 <text class="mini-text">至少需选择{{ countTotal }}人</text></view>
 				<view class="invite">
 					<zzx-icon name="wechat" size="16"></zzx-icon>
 					<view style="margin-bottom: 8rpx;">邀请微信好友</view>
@@ -136,12 +140,18 @@
 		<view class="footer footer-box">
 			<view class="footer-price">
 				<view class="total-price">合计:</view>
-				<view class="price"><text class="mini-text">¥</text>{{ previewCourseInfo.totalPrice }}</view>
+				<view class="price"><text class="mini-text">¥</text>{{ previewCourseInfo.totalPrice ?
+					(previewCourseInfo.totalPrice * countTotal).toFixed(2) : (previewCourseInfo.sellingPrice *
+						countTotal).toFixed(2) }}
+				</view>
 				<view class="discount">优惠¥{{ previewCourseInfo.totalDiscount }}</view>
 			</view>
 			<view class="footer-btn" @click="submitOrder">
 				<button>
-					<view class="btn-price">¥{{ previewCourseInfo.totalPrice }}</view>
+					<view class="btn-price">
+						¥{{ previewCourseInfo.totalPrice ? (previewCourseInfo.totalPrice * countTotal).toFixed(2) :
+							(previewCourseInfo.sellingPrice * countTotal).toFixed(2) }}
+					</view>
 					<view class="btn-price">立即支付</view>
 				</button>
 			</view>
@@ -176,6 +186,7 @@ const loadType = ref(1)
 const buyType = ref()
 const placeId = ref()
 onLoad((options) => {
+	console.log(options);
 	loadType.value = options.type
 	courseId.value = options.courseId
 	placeId.value = options.placeId
@@ -259,7 +270,7 @@ const get_previewOrderCourse = () => {
 const getEventsDetail = () => {
 	http.get('/order/PreviewOrderPlaceGymnasiumNoFixation', { data: { placeId: placeId.value }, loading: true }).then((res) => {
 		previewCourseInfo.value = res.result
-		orderFormData.value.productIds = res.result.id
+		orderFormData.value.productIds = res.result.id || res.result.placeId
 	})
 }
 
@@ -337,13 +348,13 @@ let orderFormData = ref({
 	orFreeOrder: 1,
 	productIds: null,
 	amount: null,
-	familyIds: null,
+	familyIds: '',
 	insureOrderInfoForm: {
-		insureId: null,
-		assertStartTime: null,
-		assertEndTime: null,
-		insurePriceId: null,
-		familyMembersIds: null,
+		insureId: '',
+		assertStartTime: '',
+		assertEndTime: '',
+		insurePriceId: '',
+		familyMembersIds: '',
 	},
 	// gameCertificationForm:{
 	// 	teamName:'',
@@ -355,7 +366,19 @@ let orderFormData = ref({
 	// }
 })
 const submitOrder = () => {
-	if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
+	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.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) => {
 		RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${res.result.orderId}&orderType=${loadType.value}`)
 	})
@@ -814,9 +837,13 @@ const submitOrder = () => {
 			background: #C8FF0C;
 			border-radius: 60rpx;
 			font-weight: bold;
-			font-size: 32rpx;
+			font-size: 26rpx;
 			color: #222222;
-			line-height: 44rpx;
+			line-height: 30rpx;
+
+			.btn-price:nth-child(1) {
+				margin-top: 20rpx;
+			}
 		}
 
 		&>button::after {

+ 6 - 5
src/pages/index/index.vue

@@ -133,8 +133,8 @@
 						<view class="i-name-tag">
 							<view class="name-tag">
 								<view class="name">
-									<view class="">
-										<text>{{item.name}}</text>
+									<view>
+										<text class="textHidden" style="width: 130rpx;">{{item.name}}</text>
 									</view>
 									<image v-if="index % 2=== 0" src="/src/static/name_bg.png" mode=""></image>
 									<image v-else src="/src/static/name_bg1.png" mode=""></image>
@@ -142,7 +142,7 @@
 								<view class="tag" v-for="(tag,index) in item.list">{{tag}}</view>
 							</view>
 							<view class="ascription">{{item.orgName}}</view>
-							<view class="sign">{{item.teachingPhilosophy}}</view>
+							<view class="sign textHidden">{{item.teachingPhilosophy}}</view>
 						</view>
 						<view class="type-icon">
 							<image src="/src/static/hot-icon2.png" mode=""></image>
@@ -174,6 +174,7 @@
 					</view>
 				</view>
 			</view>
+			<zs-empty v-if="!loading && instructorList.length === 0" />
 		</view>
 		<view class="login-tips" v-if="!token">
 			<view class="">终于等到你!快去登录吧~</view>
@@ -186,6 +187,7 @@
 	import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
 	import { ref, onMounted, computed } from 'vue'
 	import { onLoad, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app';
+	import zsEmpty from '@/components/zs-empty/index.vue'
 	import { RouterUtils, TipsUtils } from '@/utils/util';
 	import { http } from '@/utils/http'
 	import { useCacheStore } from '@/stores/cache'
@@ -406,7 +408,6 @@
 	.index-header {
 		position: relative;
 		height: 580rpx;
-
 		.header-bg {
 			position: absolute;
 			width: 100%;
@@ -768,7 +769,6 @@
 						display: flex;
 						align-items: center;
 						gap: 8rpx;
-
 						.name {
 							width: 134rpx;
 							height: 60rpx;
@@ -806,6 +806,7 @@
 					}
 
 					.sign {
+						width: 360rpx;
 						margin-top: 20rpx;
 						font-weight: bold;
 						font-size: 24rpx;

+ 124 - 63
src/pages/index/toBeUsed/index.vue

@@ -2,10 +2,12 @@
 <template>
 	<view class="content">
 		<view class="t-header">
-			<view class="title">待使用</view>
-			<view class="time"><text>0017 1712 5994</text>待使用,请按课表到上课地点按时上课。</view>
+			<view class="title">{{ orderDetailInfo.orderStatus }}</view>
+			<view class="time" v-for="item in orderDetailInfo.proInfoList" :key="item.id"><text>{{ item.ticketNo
+			}}</text>{{ orderDetailInfo.orderStatus }}<text
+					v-if="orderDetailInfo.orderStatus == '待使用'">,请按课表到上课地点按时上课。</text></view>
 		</view>
-		<view class="t-booking-card">
+		<view class="t-booking-card" v-if="orderPageInfo.orderType != 2">
 			<view class="booking-text">
 				<view class="b-title">请您提前联系场馆进行预约</view>
 				<view class="b-text">请提前一天预约>场馆确认>到馆消费</view>
@@ -13,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 != 2">
 			<view class="title">预定信息</view>
 			<view class="schedule-address">
 				<view class="text">场馆</view>
@@ -30,11 +32,11 @@
 			</view>
 		</view>
 		<view class="t-shoping-card">
-			<view class="venue-address">
+			<view class="venue-address" v-if="orderPageInfo.orderType != 2">
 				<view class="address">
 					<zzx-icon name="venue-icon4" size="14"></zzx-icon>
-					<view class="name">林旦综合运动馆</view>
-					<view class="venue-tags">营业中</view>
+					<view class="name">{{ orderDetailInfo.siteName }}</view>
+					<view class="venue-tags">{{ orderDetailInfo.runStatus == 0 ? '营业中' : '休息中' }}</view>
 				</view>
 				<view class="check-all">
 					<text>查看所有可用场馆</text>
@@ -42,25 +44,28 @@
 				</view>
 			</view>
 			<view class="t-shoping-info">
-				<image class="shoping-img" src="https://img.shetu66.com/2023/06/13/1686646672844195.jpg" mode="">
+				<image class="shoping-img" :src="orderDetailInfo.appCourses.cover" mode="">
 				</image>
 				<view class="shoping-info">
-					<view class="name">一对一篮球30分钟室内精品课程,一对...</view>
+					<view class="name">{{ orderDetailInfo.appCourses.name }}</view>
 					<view class="shoping-price" @click="pricePopup.open()">
-						<view class="price">¥45.9</view>
+						<view class="price">¥{{ orderDetailInfo.totalPrice }}</view>
 						<view class="text">
 							<text>实付</text>
 							<text class="mini-text">¥</text>
-							<text class="price-big">25.1</text>
+							<text class="price-big">{{ orderDetailInfo.price }}</text>
 							<zzx-icon name="ashRight" size="10"></zzx-icon>
 						</view>
 					</view>
 				</view>
 			</view>
-			<view class="t-shoping-address">
-				<view class="address">上课地点:观山湖区第十二小学</view>
-				<view class="course-time" @click="torecord_page">
-					<text>10课时 05.06-05.11</text>
+			<view class="t-shoping-address"
+				@click="RouterUtils.to_page(`/pages/index/verificationRecord/index?orderId=${orderDetailInfo.id}&ticketNo=${orderDetailInfo.proInfoList[0].ticketNo}`)">
+				<view class="address">上课地点:{{ orderDetailInfo.courseSiteAddress }}</view>
+				<view class="course-time">
+					<text>{{ orderDetailInfo.appCourses.classNum }}课时
+						{{ DateUtils.formatDateToMMDD(orderDetailInfo.appCourses.startTime) + '-' +
+							DateUtils.formatDateToMMDD(orderDetailInfo.appCourses.endTime) }}</text>
 					<zzx-icon name="ashRight" size="10"></zzx-icon>
 				</view>
 			</view>
@@ -69,23 +74,24 @@
 			</view>
 		</view>
 		<!-- 待使用展示 -->
-		<view class="t-qrcode-card" v-if="orderPageInfo.orderType==2">
+		<view class="t-qrcode-card" v-if="orderPageInfo.orderType == 2">
 			<view class="qrcode-box">
 				<view class="item-qrcode">
-					<uv-qrcode ref="qrcode" size="100px" value="https://h5.uvui.cn"></uv-qrcode>
+					<uv-qrcode ref="qrcode" size="100px" :value="orderDetailInfo.id"></uv-qrcode>
 				</view>
 			</view>
 			<view class="download-qrcode" @click="download_qrcode">下载到手机</view>
 			<view class="t-todeused">
 				<view class="todeused">
 					<view class="text">待使用</view>
-					<view class="time">07-25 14:25:45 到期</view>
+					<view class="time">{{ orderDetailInfo.appCourses.endTime }} 到期</view>
+				</view>
+				<view class="order-num" v-for="item in orderDetailInfo.proInfoList" :key="item.id">{{ item.ticketNo }}
 				</view>
-				<view class="order-num" v-for="item in 2">0017 1712 5994</view>
 			</view>
 		</view>
 		<!-- 已使用已过期展示 -->
-		<view class="t-qrcode-card" v-if="orderPageInfo.orderType!=2">
+		<view class="t-qrcode-card" v-if="orderPageInfo.orderType != 2">
 			<view class="t-todeused" v-for="item in 2" style="border-bottom: 1rpx solid #F0F0F0;">
 				<view class="todeused">
 					<view class="item-todeused">
@@ -101,7 +107,7 @@
 			</view>
 		</view>
 		<!-- 学校场地预定订单详情展示 -->
-		<view class="t-scheduled-card" v-if="orderPageInfo.orderType!=2">
+		<view class="t-scheduled-card" v-if="orderPageInfo.orderType != 2">
 			<view class="s-title">预定信息</view>
 			<view class="t-scheduled-list">
 				<view class="item-list">
@@ -125,14 +131,14 @@
 		<view class="t-address-card">
 			<view class="address">
 				<zzx-icon name="location"></zzx-icon>
-				<view class="">印象城购物中心6楼</view>
+				<view class="">{{ orderDetailInfo.courseSiteAddress }}</view>
 			</view>
 			<view class="nav-info">
-				<view class="nav">
+				<view class="nav" @click="open_map">
 					<zzx-icon name="navigation" size="14"></zzx-icon>
 					<view class="nav-text">导航</view>
 				</view>
-				<view class="phone">
+				<view class="phone" @click="open_phone">
 					<zzx-icon name="phone" size="14"></zzx-icon>
 					<view class="">电话</view>
 				</view>
@@ -141,14 +147,14 @@
 		<view class="t-use-card">
 			<view class="use-tips">
 				<view class="title">使用须知</view>
-				<view class="text">请妥善保存核销券号</view>
+				<view class="text">{{ orderDetailInfo.reminder }}</view>
 			</view>
-			<view class="check-all">
+			<!-- <view class="check-all">
 				<text>查看全部</text>
 				<zzx-icon name="ashRight" size="12"></zzx-icon>
-			</view>
+			</view> -->
 		</view>
-		<view class="t-use-card" v-if="orderPageInfo.orderType!=2">
+		<view class="t-use-card" v-if="orderPageInfo.orderType != 2">
 			<view class="use-tips">
 				<view class="title">参赛意外险</view>
 				<view class="text">实际付款:6元(3元/份×2)</view>
@@ -158,46 +164,46 @@
 				<zzx-icon name="ashRight" size="12"></zzx-icon>
 			</view>
 		</view>
-		<view class="t-use-card" v-if="orderPageInfo.orderType!=2">
+		<view class="t-use-card" v-if="orderPageInfo.orderType == 2">
 			<view class="use-tips t-contract-list">
 				<view class="title">电子合同</view>
 				<view class="text contract-list">
 					<view class="item-no-sign">
 						<view class="sign-title">未签署:</view>
-						<view class="sign-name">张三</view>
+						<view class="sign-name"  v-for="item in notSignList" :key="item.id" @click="checkSign(item)">{{ item.fullName }}</view>
 					</view>
 					<view class="item-sign">
 						<view class="sign-title">已签署:</view>
-						<view class="sign-name">李四</view>
+						<view class="sign-name" v-for="item in signList" :key="item.id">{{ item.fullName }}</view>
 					</view>
 				</view>
 			</view>
-			<view class="check-all" @click="goToContract">
+			<!-- <view class="check-all" @click="goToContract">
 				<text>查看详情</text>
 				<zzx-icon name="ashRight" size="12"></zzx-icon>
-			</view>
+			</view> -->
 		</view>
 		<view class="t-order-info-card">
 			<view class="title">订单信息</view>
 			<view class="info-list">
 				<view class="item-left">实际付款</view>
-				<view class="item-right">¥25.9</view>
+				<view class="item-right">¥{{ orderDetailInfo.price }}</view>
 			</view>
 			<view class="info-list">
 				<view class="item-left">手机号码</view>
-				<view class="item-right">189****5960</view>
+				<view class="item-right">{{ orderDetailInfo.phoneNumber }}</view>
 			</view>
 			<view class="info-list">
 				<view class="item-left">订单编号</view>
-				<view class="item-right">46476465456464156486</view>
+				<view class="item-right">{{ orderDetailInfo.orderCode }}</view>
 			</view>
 			<view class="info-list">
 				<view class="item-left">下单时间</view>
-				<view class="item-right">2023-7-25 14:25:45</view>
+				<view class="item-right">{{ orderDetailInfo.createTime }}</view>
 			</view>
 			<view class="info-list">
 				<view class="item-left">付款时间</view>
-				<view class="item-right">2023-7-25 14:25:45</view>
+				<view class="item-right">{{ orderDetailInfo.payTime || '--' }}</view>
 			</view>
 		</view>
 		<!-- 已使用展示 -->
@@ -212,15 +218,15 @@
 			<view class="price-list">
 				<view class="price-total">
 					<view class="text">商品总价(共2件)</view>
-					<view class="price">¥45.9</view>
+					<view class="price">¥{{ orderDetailInfo.totalPrice }}</view>
 				</view>
 				<view class="price-total">
 					<view class="text">团购优惠</view>
-					<view class="price">-¥2</view>
+					<view class="price">-¥{{ orderDetailInfo.tdiscounts || '0' }}</view>
 				</view>
 				<view class="price-total">
 					<view class="text">实付金额</view>
-					<view class="price">¥45.9</view>
+					<view class="price">¥{{ orderDetailInfo.price }}</view>
 				</view>
 			</view>
 		</view>
@@ -290,20 +296,20 @@
 </template>
 
 <script lang="ts" setup>
-import { ref,onMounted } from 'vue';
-import { TipsUtils, RouterUtils } from '@/utils/util'
+import { ref, onMounted } from 'vue';
+import { TipsUtils, RouterUtils, DateUtils } from '@/utils/util'
 import { onLoad } from '@dcloudio/uni-app';
 import { http } from '@/utils/http'
 const qrcode = ref();
 const pricePopup = ref()  //价格
 const refundPopup = ref()  //退款
 const selected = ref(false)
-const orderPageInfo=ref()
+const orderPageInfo = ref()
 onLoad((option) => {
 	orderPageInfo.value = option
 	console.log(orderPageInfo.value);
 })
-onMounted(()=>{
+onMounted(() => {
 	getOrderDetailInfo()
 })
 const download_qrcode = () => {//下载二维码
@@ -314,58 +320,113 @@ const download_qrcode = () => {//下载二维码
 			TipsUtils.tips_toast('下载成功')
 		},
 		fail: (err) => {
+			console.log(err);
+			
 			uni.hideLoading()
 		}
 	});
 }
 
-const torecord_page = () => {
-	RouterUtils.to_page('/pages/index/verificationRecord/index')
-}
-
 const refund_btn = () => {
 	RouterUtils.to_page('/pages/index/refundDetail/index')
 }
 
-const goToContract = () => {
-	get_UserIdentityInfo()
+// 打开地图
+const open_map = () => {
+	uni.openLocation({
+		latitude: orderDetailInfo.value.latitude,
+		longitude: orderDetailInfo.value.longitude,
+		success: function () {
+			console.log('success');
+		}
+	});
 }
 
-const getOrderDetailInfo=(()=>{
-	http.get('/order/queryOrderInfo',{data:{orderId:orderPageInfo.value.orderId},loading:true}).then((res)=>{
+// 拨打电话
+const open_phone = () => {
+	uni.makePhoneCall({
+		phoneNumber: orderDetailInfo.value.phone
+	});
+}
 
+// 订单状态 0-待付款 1-待使用 2-已使用 3-已到期 4-已取消 5-退款中 6已退款
+const orderDetailInfo = ref()
+const getOrderDetailInfo = (() => {
+	http.get('/order/queryOrderInfo', { data: { orderId: orderPageInfo.value.orderId }, loading: true }).then((res) => {
+		switch (res.result.orderStatus) {
+			case 0:
+				res.result.orderStatus = '待付款'
+				break;
+			case 1:
+				res.result.orderStatus = '待使用'
+				break;
+			case 2:
+				res.result.orderStatus = '已使用'
+				break;
+			case 3:
+				res.result.orderStatus = '已到期'
+				break;
+			case 4:
+				res.result.orderStatus = '已取消'
+				break;
+			case 5:
+				res.result.orderStatus = '退款中'
+				break;
+			case 6:
+				res.result.orderStatus = '已退款'
+			default:
+				break;
+		}
+		orderDetailInfo.value = res.result
+		getQueryWaitSignList(res.result.id)
 	})
 })
 
+const queryWaitSignList = ref([]) // 合同信息
+const notSignList = ref([]) // 未签署
+const signList = ref([]) // 已签署
+const getQueryWaitSignList = (orderId: string) => {
+	http.get('/esign/queryWaitSignList', { data: { orderId: orderId }, loading: true }).then((res) => {
+		notSignList.value = res.result.filter((item:any) => item.isSign == 0)
+		signList.value = res.result.filter((item:any) => item.isSign == 1)
+		queryWaitSignList.value = res.result
+	})
+}
+
+
+const checkSign = (e) => {
+	get_UserIdentityInfo(e.familyId)
+}
+
 // 查询授权
-const get_UserIdentityInfo = () => {
-	http.get('/esign/getUserIdentityInfo', { data: { phoneNumber: '17585167187' }, loading: true }).then((res) => {
+const get_UserIdentityInfo = (familyId:string) => {
+	http.get('/esign/getUserIdentityInfo', { data: { familyId: familyId }, loading: true }).then((res) => {
 		if (res.result) {
-			get_createSign()
+			get_createSign(familyId)
 		} else {
-			getAuthUrl()
+			getAuthUrl(familyId)
 		}
 	})
 }
 
 // 发起签署
-const get_createSign = () => {
-	http.get('/esign/createSign', { data: { orderCode: '234' }, loading: true }).then((res) => {
+const get_createSign = (familyId:string) => {
+	http.get('/esign/createSign', { data: { orderCode: orderDetailInfo.value.orderCode,familyId:familyId }, loading: true }).then((res) => {
 		getSignUrl()
 	})
 }
 
 // 未授权跳转链接
-const getAuthUrl = () => {
-	http.get('/esign/getAuthUrl', { loading: true }).then((res) => {
-		RouterUtils.to_page(`/pages/index/signWebview/index?url=${res.result}`)
+const getAuthUrl = (familyId:string) => {
+	http.get('/esign/getAuthUrl', {data:{familyId: familyId}, loading: true }).then((res) => {
+		RouterUtils.to_page(`/pages/index/signWebview/index?url=${encodeURIComponent(res.result)}`)
 	})
 }
 
 // 获取签署链接
 const getSignUrl = () => {
 	http.get('/esign/getSignUrl', { data: { signFlowId: '8d143f604578435db064c04ddaa1fc48' }, loading: true }).then((res) => {
-		RouterUtils.to_page(`/pages/index/signWebview/index?url=${res.result}`)
+		RouterUtils.to_page(`/pages/index/signWebview/index?url=${encodeURIComponent(res.result)}`)
 	})
 }
 </script>

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

@@ -19,7 +19,7 @@
 			<view class="u-user-list" v-for="(item, index) in userList" :key="index" @click="selectUser(item)">
 				<view class="user-info">
 					<view class="name">{{ item.fullName }}</view>
-					<view class="idcard">身份证 {{ idCardHide(item.identityCard) }}</view>
+					<view class="idcard" v-if="item.identityCard">身份证 {{ idCardHide(item.identityCard) }}</view>
 				</view>
 				<view class="">
 					<zzx-icon :name="item.selOut ? 'selected' : 'unchecked'" size="14"></zzx-icon>

+ 286 - 334
src/pages/index/verificationRecord/index.vue

@@ -8,19 +8,19 @@
 		</view>
 		<uv-sticky offset-top="-14">
 			<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="normal-course-list">
-			<view class="list-header">
-				<view class="total">总共<text style="color: #222;">6</text>节</view>
-				<view class="total">已核销<text style="color: #222;">6</text>节</view>
-				<view class="total">未核销<text style="color: #222;">6</text>节</view>
-			</view>
-			<view id="normalCourse">
+			<view id="normalCourse" v-if="sel_index === 0">
+				<view class="list-header">
+					<view class="total">总共<text style="color: #222;">6</text>节</view>
+					<view class="total">已核销<text style="color: #222;">6</text>节</view>
+					<view class="total">未核销<text style="color: #222;">6</text>节</view>
+				</view>
 				<view class="v-list-card" v-for="item in 4">
 					<view class="list-ard">
 						<view class="card-info">
@@ -34,13 +34,14 @@
 						<view class="card-status">
 							<view class="status-btn">已核销</view>
 							<!-- <view class="status-btn-not">未核销</view>  -->
-							<view :class="[rotate?'icon-tans':'status-icon']" @click="rotate=!rotate">
+							<view :class="[rotate ? 'icon-tans' : 'status-icon']" @click="rotate = !rotate">
 								<zzx-icon name="up" size="12"></zzx-icon>
 							</view>
 						</view>
 					</view>
 
-					<view class="v-list-fold" :style="{ height:rotate ? `${(4 * 84) - 20 }rpx` : '0',borderTop:rotate?'1rpx solid #F0F0F0':'none' }">
+					<view class="v-list-fold"
+						:style="{ height: rotate ? `${(4 * 84) - 20}rpx` : '0', borderTop: rotate ? '1rpx solid #F0F0F0' : 'none' }">
 						<view class="item-fold">
 							<view class="text">核验人</view>
 							<view class="name">杨锦新</view>
@@ -56,9 +57,9 @@
 					</view>
 				</view>
 			</view>
-			<view id="lessons">
+			<view id="lessons" v-if="sel_index === 1">
 				<view class="v-lessons-list">
-					<view class="title">补课</view>
+					<!-- <view class="title">补课</view> -->
 					<view class="list-header">
 						<view class="total">总共<text style="color: #222;">6</text>节</view>
 						<view class="total">已核销<text style="color: #222;">6</text>节</view>
@@ -78,20 +79,22 @@
 								<view class="card-status">
 									<view class="status-btn">已核销</view>
 									<!-- <view class="status-btn-not">未核销</view>  -->
-									<view :class="[rotate?'icon-tans':'status-icon']" @click="rotate=!rotate">
+									<view :class="[rotate ? 'icon-tans' : 'status-icon']" @click="rotate = !rotate">
 										<zzx-icon name="up" size="12"></zzx-icon>
 									</view>
 								</view>
 							</view>
-						
-							<view class="v-list-fold" :style="{ height:rotate ? `${(4 * 84) - 20 }rpx` : '0',borderTop:rotate?'1rpx solid #F0F0F0':'none' }">
+
+							<view class="v-list-fold"
+								:style="{ height: rotate ? `${(4 * 84) - 20}rpx` : '0', borderTop: rotate ? '1rpx solid #F0F0F0' : 'none' }">
 								<view class="item-fold">
 									<view class="text">核验人</view>
 									<view class="name">杨锦新</view>
 								</view>
 								<view class="item-fold">
 									<view class="text">核验照片</view>
-									<image src="https://img.shetu66.com/2023/06/13/1686646672844195.jpg" mode=""></image>
+									<image src="https://img.shetu66.com/2023/06/13/1686646672844195.jpg" mode="">
+									</image>
 								</view>
 								<view class="item-fold">
 									<view class="text">核验时间</view>
@@ -108,383 +111,332 @@
 </template>
 
 <script lang="ts" setup>
-	import { ref, onMounted, getCurrentInstance, nextTick } from 'vue';
-	import { onLoad, onPageScroll } from '@dcloudio/uni-app';
-	const rotate = ref(false);  //核销折叠控制
-	const sectionTops = ref<number[]>([]);
-	const isScrollingByTab = ref(false);
-	const scrollTimer = ref<any>(null);
-	const selectList = ref(['正常课', '补课']);
-	const sel_index = ref(0);
-	const instance = getCurrentInstance();
-	// 获取所有模块的位置信息
-	const getSectionsTop = () => {
-		const ids = ['normalCourse', 'lessons'];
-		const query = uni.createSelectorQuery().in(instance.proxy);
-		ids.forEach(id => {
-			query.select(`#${id}`).boundingClientRect();
-		});
-		query.exec((rects) => {
-			// 计算各模块相对于页面顶部的距离
-			sectionTops.value = rects.map((rect : any) => rect.top - 130);
-		})
-	};
-	//滚动事件
-	onPageScroll((e) => {
-		if (isScrollingByTab.value) return;
-		if (scrollTimer.value) return;
-		scrollTimer.value = setTimeout(() => {
-			updateActiveTab(e.scrollTop);
-			scrollTimer.value = null;
-		}, 100);
-	});
-	// 根据滚动位置更新激活的Tab
-	const updateActiveTab = (scrollTop : number) => {
-		const offset = 130;
-		const scrollPosition = scrollTop + offset;
-		let activeIndex = 0;
-		for (let i = 0; i < sectionTops.value.length; i++) {
-			if (scrollPosition >= sectionTops.value[i]) {
-				activeIndex = i;
-			} else {
-				break; // 模块位置已排序,可提前结束
-			}
-		}
-		if (sel_index.value !== activeIndex) {
-			sel_index.value = activeIndex;
-		}
-	};
-	const sel_tab = async (i : number) => {
-		isScrollingByTab.value = true; // 标记为Tab点击触发的滚动
-		sel_index.value = i;
-		const ids = ['normalCourse', 'lessons'];
-		const id = ids[i];
-		await scrollToTop();
-		await nextTick();
-		const query = uni.createSelectorQuery().in(instance.proxy);
-		query.select(`#${id}`).boundingClientRect(data => {
-			if (!data) return;
-			uni.pageScrollTo({
-				scrollTop: data.top - 130,
-				duration: 500,
-				complete: () => {
-					setTimeout(() => {
-						isScrollingByTab.value = false;
-					}, 300);
-				}
-			});
-		}).exec();
-	}
-	const scrollToTop = () => {
-		return new Promise(resolve => {
-			uni.pageScrollTo({
-				scrollTop: 0,
-				duration: 0,
-				success: resolve
-			});
-		});
-	}
+import { ref, onMounted, getCurrentInstance, nextTick } from 'vue';
+import { onLoad, onPageScroll } from '@dcloudio/uni-app';
+const rotate = ref(false);  //核销折叠控制
+const selectList = ref(['正常课', '补课']);
+const sel_index = ref(0);
+//滚动事件
+onLoad((options)=>{
+	console.log(options)
+})
+onPageScroll((e) => {
+
+});
+const sel_tab = async (i: number) => {
+	sel_index.value = i;
+}
 </script>
 
 <style lang="less" scoped>
-	.v-header-card {
-		margin-top: 20rpx;
-		display: flex;
-		align-items: center;
-		gap: 20rpx;
-		font-size: 28rpx;
-		color: #222222;
-		background: #FFFFFF;
-		border-radius: 16rpx;
-		padding: 20rpx;
+.v-header-card {
+	margin-top: 20rpx;
+	display: flex;
+	align-items: center;
+	gap: 20rpx;
+	font-size: 28rpx;
+	color: #222222;
+	background: #FFFFFF;
+	border-radius: 16rpx;
+	padding: 20rpx;
 
-		.header-icon-box {
-			transform: rotate(180deg)
-		}
+	.header-icon-box {
+		transform: rotate(180deg)
 	}
+}
 
-	.detail-select {
-		display: flex;
-		align-items: center;
-		gap: 60rpx;
-		margin-top: 20rpx;
-		height: 80rpx;
-		background-color: #F6F6F6;
+.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,
+	.notsel-text {
+		position: relative;
+		transition: all 0.3s ease;
+	}
 
-		.select-text {
-			font-weight: 800;
-			font-size: 32rpx;
-			color: #222222;
-			position: relative;
-		}
+	.select-text {
+		font-weight: 800;
+		font-size: 32rpx;
+		color: #222222;
+		position: relative;
+	}
 
-		.notsel-text {
-			font-size: 32rpx;
-			color: #AAAAAA;
-		}
+	.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;
-		}
+	.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;
-		}
+	.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;
+	}
+}
+
+.normal-course-list {
+	margin-top: 20rpx;
+
+	.list-header {
+		display: flex;
+		align-items: center;
+		gap: 40rpx;
+		font-size: 24rpx;
+		color: #AAAAAA;
 	}
 
-	.normal-course-list {
+	.v-list-card {
 		margin-top: 20rpx;
+		padding: 20rpx;
+		background: #FFFFFF;
+		border-radius: 32rpx;
 
-		.list-header {
+		.list-ard {
 			display: flex;
 			align-items: center;
-			gap: 40rpx;
-			font-size: 24rpx;
-			color: #AAAAAA;
-		}
+			justify-content: space-between;
 
-		.v-list-card {
-			margin-top: 20rpx;
-			padding: 20rpx;
-			background: #FFFFFF;
-			border-radius: 32rpx;
+			.card-info {
+				font-size: 28rpx;
+				color: #222222;
 
-			.list-ard {
+				.time {
+					border-left: 8rpx solid #C8FF0C;
+
+					&>text {
+						margin-left: 20rpx;
+					}
+				}
+
+				.name {
+					margin-left: 28rpx;
+					margin-top: 20rpx;
+				}
+			}
+
+			.card-status {
 				display: flex;
 				align-items: center;
-				justify-content: space-between;
+				gap: 20rpx;
 
-				.card-info {
+				.status-btn {
+					width: 152rpx;
+					height: 48rpx;
+					background: #F5F5F5;
+					border-radius: 8rpx;
+					text-align: center;
+					line-height: 48rpx;
 					font-size: 28rpx;
-					color: #222222;
+					color: #AAAAAA;
+				}
 
-					.time {
-						border-left: 8rpx solid #C8FF0C;
+				.status-btn-not {
+					width: 152rpx;
+					height: 48rpx;
+					background: #C8FF0C;
+					border-radius: 8rpx;
+					text-align: center;
+					line-height: 48rpx;
+					font-size: 28rpx;
+					color: #222222;
+				}
 
-						&>text {
-							margin-left: 20rpx;
-						}
-					}
+				.icon-tans {
+					transition: all 0.3s;
+				}
 
-					.name {
-						margin-left: 28rpx;
-						margin-top: 20rpx;
-					}
+				.status-icon {
+					transition: all 0.4s;
+					transform: rotate(180deg);
 				}
+			}
+		}
 
-				.card-status {
-					display: flex;
-					align-items: center;
-					gap: 20rpx;
-
-					.status-btn {
-						width: 152rpx;
-						height: 48rpx;
-						background: #F5F5F5;
-						border-radius: 8rpx;
-						text-align: center;
-						line-height: 48rpx;
-						font-size: 28rpx;
-						color: #AAAAAA;
-					}
+		.v-list-fold {
+			margin-top: 20rpx;
+			height: 0rpx;
+			overflow: hidden;
+			transition: all .4s;
 
-					.status-btn-not {
-						width: 152rpx;
-						height: 48rpx;
-						background: #C8FF0C;
-						border-radius: 8rpx;
-						text-align: center;
-						line-height: 48rpx;
-						font-size: 28rpx;
-						color: #222222;
-					}
+			.item-fold {
+				display: flex;
+				gap: 20rpx;
+				margin-top: 20rpx;
 
-					.icon-tans {
-						transition: all 0.3s;
-					}
+				.text {
+					font-size: 28rpx;
+					color: #AAAAAA;
+				}
 
-					.status-icon {
-						transition: all 0.4s;
-						transform: rotate(180deg);
-					}
+				&>image {
+					width: 160rpx;
+					height: 160rpx;
+					border-radius: 8rpx;
 				}
-			}
 
-			.v-list-fold {
-				margin-top: 20rpx;
-				height: 0rpx;
-				overflow: hidden;
-				transition: all .4s;
-				.item-fold{
-					display: flex;
-					gap: 20rpx;
-					margin-top: 20rpx;
-					.text{
-						font-size: 28rpx;
-						color: #AAAAAA;
-					}
-					&>image{
-						width: 160rpx;
-						height: 160rpx;
-						border-radius: 8rpx;
-					}
-					.name{
-						font-size: 28rpx;
-						color: #222222;
-					}
-					
+				.name {
+					font-size: 28rpx;
+					color: #222222;
 				}
+
 			}
 		}
+	}
+
+	.v-lessons-list {
+		margin-top: 20rpx;
 
-		.v-lessons-list {
+		.title {
+			font-weight: 800;
+			font-size: 32rpx;
+			color: #222222;
+		}
+
+		.v-lessons-card {
 			margin-top: 20rpx;
+			padding: 20rpx;
+			background: #FFFFFF;
+			border-radius: 32rpx;
 
-			.title {
-				font-weight: 800;
-				font-size: 32rpx;
-				color: #222222;
+			.list-header {
+				display: flex;
+				align-items: center;
+				gap: 40rpx;
+				font-size: 24rpx;
+				color: #AAAAAA;
 			}
 
-			.v-lessons-card {
+			.v-list-card {
 				margin-top: 20rpx;
 				padding: 20rpx;
 				background: #FFFFFF;
 				border-radius: 32rpx;
-				.list-header {
+
+				.list-ard {
 					display: flex;
 					align-items: center;
-					gap: 40rpx;
-					font-size: 24rpx;
-					color: #AAAAAA;
-				}
-				
-				.v-list-card {
-					margin-top: 20rpx;
-					padding: 20rpx;
-					background: #FFFFFF;
-					border-radius: 32rpx;
-				
-					.list-ard {
+					justify-content: space-between;
+
+					.card-info {
+						font-size: 28rpx;
+						color: #222222;
+
+						.time {
+							border-left: 8rpx solid #C8FF0C;
+
+							&>text {
+								margin-left: 20rpx;
+							}
+						}
+
+						.name {
+							margin-left: 28rpx;
+							margin-top: 20rpx;
+						}
+					}
+
+					.card-status {
 						display: flex;
 						align-items: center;
-						justify-content: space-between;
-				
-						.card-info {
+						gap: 20rpx;
+
+						.status-btn {
+							width: 152rpx;
+							height: 48rpx;
+							background: #F5F5F5;
+							border-radius: 8rpx;
+							text-align: center;
+							line-height: 48rpx;
+							font-size: 28rpx;
+							color: #AAAAAA;
+						}
+
+						.status-btn-not {
+							width: 152rpx;
+							height: 48rpx;
+							background: #C8FF0C;
+							border-radius: 8rpx;
+							text-align: center;
+							line-height: 48rpx;
 							font-size: 28rpx;
 							color: #222222;
-				
-							.time {
-								border-left: 8rpx solid #C8FF0C;
-				
-								&>text {
-									margin-left: 20rpx;
-								}
-							}
-				
-							.name {
-								margin-left: 28rpx;
-								margin-top: 20rpx;
-							}
 						}
-				
-						.card-status {
-							display: flex;
-							align-items: center;
-							gap: 20rpx;
-				
-							.status-btn {
-								width: 152rpx;
-								height: 48rpx;
-								background: #F5F5F5;
-								border-radius: 8rpx;
-								text-align: center;
-								line-height: 48rpx;
-								font-size: 28rpx;
-								color: #AAAAAA;
-							}
-				
-							.status-btn-not {
-								width: 152rpx;
-								height: 48rpx;
-								background: #C8FF0C;
-								border-radius: 8rpx;
-								text-align: center;
-								line-height: 48rpx;
-								font-size: 28rpx;
-								color: #222222;
-							}
-				
-							.icon-tans {
-								transition: all 0.3s;
-							}
-				
-							.status-icon {
-								transition: all 0.4s;
-								transform: rotate(180deg);
-							}
+
+						.icon-tans {
+							transition: all 0.3s;
+						}
+
+						.status-icon {
+							transition: all 0.4s;
+							transform: rotate(180deg);
 						}
 					}
-				
-					.v-list-fold {
+				}
+
+				.v-list-fold {
+					margin-top: 20rpx;
+					height: 0rpx;
+					overflow: hidden;
+					transition: all .4s;
+
+					// border-top: 1rpx solid #F0F0F0;
+					.item-fold {
+						display: flex;
+						gap: 20rpx;
 						margin-top: 20rpx;
-						height: 0rpx;
-						overflow: hidden;
-						transition: all .4s;
-						// border-top: 1rpx solid #F0F0F0;
-						.item-fold{
-							display: flex;
-							gap: 20rpx;
-							margin-top: 20rpx;
-							.text{
-								font-size: 28rpx;
-								color: #AAAAAA;
-							}
-							&>image{
-								width: 160rpx;
-								height: 160rpx;
-								border-radius: 8rpx;
-							}
-							.name{
-								font-size: 28rpx;
-								color: #222222;
-							}
-							
+
+						.text {
+							font-size: 28rpx;
+							color: #AAAAAA;
+						}
+
+						&>image {
+							width: 160rpx;
+							height: 160rpx;
+							border-radius: 8rpx;
 						}
+
+						.name {
+							font-size: 28rpx;
+							color: #222222;
+						}
+
 					}
 				}
-				.item-tips-text{
-					font-size: 24rpx;
-					color: #AAAAAA;
-					text-align: center;
-				}
+			}
+
+			.item-tips-text {
+				font-size: 24rpx;
+				color: #AAAAAA;
+				text-align: center;
 			}
 		}
 	}
+}
 </style>

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

@@ -1,94 +1,106 @@
 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();
-	}
-	
-	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 = () => {
-				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];
-		}
-	}
+  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;
+      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);
+  }
 
-	requestAnimationFrame(cb) {
-		requestId = this.canvas.requestAnimationFrame(cb);
-	}
-	
-	cancelAnimationFrame() {
-		console.log("requestId", requestId);
-		this.canvas.cancelAnimationFrame(requestId);
-	}
+  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;

+ 72 - 64
src/pages/index/vr/index.vue

@@ -1,80 +1,88 @@
 <template>
 	<view class="canvas-box">
-		<canvas type="webgl" :id="canvasId" :canvas-id="canvasId" :style="{width: '100%', height:'100%'}"
+		<canvas type="webgl" :id="canvasId" :canvas-id="canvasId" :style="{ width: '100%', height: '100%' }"
 			:disable-scroll="true" @touchmove.prevent.stop="touchmove" @touchstart.prevent.stop="touchstart"
 			@touchend.prevent.stop="touchend" @error="canvasIdErrorCallback"></canvas>
 	</view>
 </template>
 
 <script lang="ts" setup>
-	import ImageAr from "./ImageAr.js";
-	import { ref, onMounted,nextTick  } from 'vue';
-	import { onLoad, onUnload } from '@dcloudio/uni-app';
-	const imagebox = ref(null);
-	const inited = ref(false);
-	const canvasId = ref("canvas_id");
-	const images = ref([
-		'https://cdn.huodao.hk/upload_img/20220620/c34262935511d61b2e9f456b689f5c1c.jpg', // 后
-		'https://cdn.huodao.hk/upload_img/20220620/722d2bf88f6087800ddf116511b51e73.jpg', // 前
-		'https://cdn.huodao.hk/upload_img/20220620/273081d1896fc66866842543090916d3.jpg', // 上
-		'https://cdn.huodao.hk/upload_img/20220620/8747f61fd2215aa748dd2afb6dce3822.jpg', // 下
-		'https://cdn.huodao.hk/upload_img/20220620/3e532822bd445485d27677ca55a79b10.jpg', // 左
-		'https://cdn.huodao.hk/upload_img/20220620/cebf6fbcafdf4f5c945e0881418e34ec.jpg', // 右
-	]);
-	const engine = ref(null);
-	onLoad(() => {
+import ImageAr from "./ImageAr.js";
+import { ref, onMounted, nextTick } from 'vue';
+import { onLoad, onUnload } from '@dcloudio/uni-app';
+const imagebox = ref(null);
+const inited = ref(false);
+const canvasId = ref("canvas_id");
+// 'https://cdn.huodao.hk/upload_img/20220620/c34262935511d61b2e9f456b689f5c1c.jpg', // 后
+// 'https://cdn.huodao.hk/upload_img/20220620/722d2bf88f6087800ddf116511b51e73.jpg', // 前
+// 'https://cdn.huodao.hk/upload_img/20220620/273081d1896fc66866842543090916d3.jpg', // 上
+// 'https://cdn.huodao.hk/upload_img/20220620/8747f61fd2215aa748dd2afb6dce3822.jpg', // 下
+// 'https://cdn.huodao.hk/upload_img/20220620/3e532822bd445485d27677ca55a79b10.jpg', // 左
+// 'https://cdn.huodao.hk/upload_img/20220620/cebf6fbcafdf4f5c945e0881418e34ec.jpg', // 右
 
+const images = ref([]);
+const engine = ref(null);
+// 'http://192.168.1.166:8080/jeecg-boot/sys/common/static/'+
+onLoad((option: any) => {
+	images.value = option.vrImg.split(',');
+	images.value = images.value.map(item => 'http://192.168.0.11:8080/jeecg-boot/sys/common/static/' + item);
+	if (images.value.length !== 6) {
+		uni.showToast({ title: '需要6张图片', icon: 'none' });
+		return;
+	}
+	// 可以在这里加图片尺寸校验(异步加载图片后判断宽高)
+	console.log("加载图片", images.value);
+})
+nextTick(() => {
+	setG3D()
+})
+onMounted(() => {
+	cancelAnimationFrame()
+})
+onUnload(() => {
+	cancelAnimationFrame()
+})
+const setG3D = () => {
+	uni.showLoading({
+		title: "加载中..."
 	})
-	nextTick(() => {
-		setG3D()
-	})
-	onMounted(() => {
-		cancelAnimationFrame()
-	})
-	onUnload(() => {
-		cancelAnimationFrame()
-	})
-	const setG3D = () => {
-		uni.showLoading({
-			title: "加载中..."
+	let selector = uni.createSelectorQuery().select(`#${canvasId.value}`);
+	selector.node()
+		.exec((res) => {
+			const canvas = res[0].node
+			imagebox.value = new ImageAr(canvas, images.value, {
+				textureComplete: (e) => {
+					uni.hideLoading();
+					inited.value = true;
+				}
+			});
 		})
-		let selector = uni.createSelectorQuery().select(`#${canvasId.value}`);
-		selector.node()
-			.exec((res) => {
-				const canvas = res[0].node
-				imagebox.value = new ImageAr(canvas, images.value, {
-					textureComplete: (e) => {
-						uni.hideLoading();
-						inited.value = true;
-					}
-				});
-			})
-	}
-	const canvasIdErrorCallback = (e) => {
-		console.error("canvas 操作异常", e.detail.errMsg)
-	}
-	const touchmove = (e) => {
-		if (!inited.value) return;
-		imagebox.value.touchmove(e)
-	}
-	const touchstart = (e) => {
-		imagebox.value.touchstart(e)
-	}
-	const touchend = (e) => {
-		if (!inited.value) return;
-		imagebox.value.touchend(e)
-	}
-	const cancelAnimationFrame = () => {
-		if (imagebox.value) {
-			imagebox.value.cancelAnimationFrame();
-		}
+}
+const canvasIdErrorCallback = (e) => {
+	console.error("canvas 操作异常", e.detail.errMsg)
+}
+const touchmove = (e) => {
+	if (!inited.value) return;
+	imagebox.value.touchmove(e)
+}
+const touchstart = (e) => {
+	imagebox.value.touchstart(e)
+}
+const touchend = (e) => {
+	if (!inited.value) return;
+	imagebox.value.touchend(e)
+}
+const cancelAnimationFrame = () => {
+	if (imagebox.value) {
+		imagebox.value.cancelAnimationFrame();
 	}
+}
 </script>
 
 <style lang="less" scoped>
-	.canvas-box {
-		width: 100vw;
-		height:100vh;
-		overflow: hidden;
-	}
+.canvas-box {
+	width: 100vw;
+	height: 100vh;
+	overflow: hidden;
+}
 </style>

+ 0 - 0
src/utils/util/date.ts


+ 7 - 7
src/utils/util/index.ts

@@ -137,13 +137,13 @@ export class DateUtils {
 	 * @returns 
 	 */
 	static addDays(dateString: string, days: number) {
-	const date = new Date(dateString);
-	date.setDate(date.getDate() + days);
-	const year = date.getFullYear();
-	const month = String(date.getMonth() + 1).padStart(2, '0');
-	const day = String(date.getDate()).padStart(2, '0');
-	return `${year}-${month}-${day}`;
-}
+		const date = new Date(dateString);
+		date.setDate(date.getDate() + days);
+		const year = date.getFullYear();
+		const month = String(date.getMonth() + 1).padStart(2, '0');
+		const day = String(date.getDate()).padStart(2, '0');
+		return `${year}-${month}-${day}`;
+	}
 
 }
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است