浏览代码

赛事保险;课程订单生成

学习?学个屁 2 天之前
父节点
当前提交
28ee00e625

+ 95 - 40
src/pages.json

@@ -9,112 +9,130 @@
 				"enablePullDownRefresh": true,
 				"enablePullDownRefresh": true,
 				"backgroundTextStyle": "dark"
 				"backgroundTextStyle": "dark"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/venue/index",
 			"path": "pages/index/venue/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "场地"
 				"navigationBarTitleText": "场地"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/detail/index",
 			"path": "pages/index/detail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "场地详情",
 				"navigationBarTitleText": "场地详情",
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/basisInfo/index",
 			"path": "pages/index/basisInfo/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "基础信息"
 				"navigationBarTitleText": "基础信息"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/useNotice/index",
 			"path": "pages/index/useNotice/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "使用须知"
 				"navigationBarTitleText": "使用须知"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/gymDetail/index",
 			"path": "pages/index/gymDetail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "体育馆",
 				"navigationBarTitleText": "体育馆",
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/gymPay/index",
 			"path": "pages/index/gymPay/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "提交订单"
 				"navigationBarTitleText": "提交订单"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/cancelOrder/index",
 			"path": "pages/index/cancelOrder/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "订单详情"
 				"navigationBarTitleText": "订单详情"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/toBeUsed/index",
 			"path": "pages/index/toBeUsed/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "订单详情"
 				"navigationBarTitleText": "订单详情"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/tryUseRecord/index",
 			"path": "pages/index/tryUseRecord/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "使用记录"
 				"navigationBarTitleText": "使用记录"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/verificationRecord/index",
 			"path": "pages/index/verificationRecord/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "核销记录"
 				"navigationBarTitleText": "核销记录"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/courseDetail/index",
 			"path": "pages/index/courseDetail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "课程详情",
 				"navigationBarTitleText": "课程详情",
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/submitOrder/index",
 			"path": "pages/index/submitOrder/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "提交订单"
 				"navigationBarTitleText": "提交订单"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/userList/index",
 			"path": "pages/index/userList/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "选择用户"
 				"navigationBarTitleText": "选择用户"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/attestation/index",
 			"path": "pages/index/attestation/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "用户认证"
 				"navigationBarTitleText": "用户认证"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/identityCertifying/index",
 			"path": "pages/index/identityCertifying/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "本人身份认证"
 				"navigationBarTitleText": "本人身份认证"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/training/index",
 			"path": "pages/index/training/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "培训"
 				"navigationBarTitleText": "培训"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/events/index",
 			"path": "pages/index/events/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "赛事"
 				"navigationBarTitleText": "赛事"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/eventsDetail/index",
 			"path": "pages/index/eventsDetail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
@@ -128,142 +146,179 @@
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "赛事订单"
 				"navigationBarTitleText": "赛事订单"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/eventsRegister/index",
 			"path": "pages/index/eventsRegister/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "完善报名信息"
 				"navigationBarTitleText": "完善报名信息"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/allInstructor/index",
 			"path": "pages/index/allInstructor/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "全部教练"
 				"navigationBarTitleText": "全部教练"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/instructorDetail/index",
 			"path": "pages/index/instructorDetail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "教练主页",
 				"navigationBarTitleText": "教练主页",
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/certifyingDetail/index",
 			"path": "pages/index/certifyingDetail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "认证详情"
 				"navigationBarTitleText": "认证详情"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/messageNotice/index",
 			"path": "pages/index/messageNotice/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "消息通知"
 				"navigationBarTitleText": "消息通知"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/messageDetail/index",
 			"path": "pages/index/messageDetail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "通知详情"
 				"navigationBarTitleText": "通知详情"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/search/index",
 			"path": "pages/index/search/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "搜索"
 				"navigationBarTitleText": "搜索"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/searchPage/index",
 			"path": "pages/index/searchPage/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "搜索结果"
 				"navigationBarTitleText": "搜索结果"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/refundDetail/index",
 			"path": "pages/index/refundDetail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "退款详情"
 				"navigationBarTitleText": "退款详情"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/index/writeComments/index",
 			"path": "pages/index/writeComments/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "写评价"
 				"navigationBarTitleText": "写评价"
 			}
 			}
-		}, {
+		},
+		{
 			"path": "pages/index/commentsSuccess/index",
 			"path": "pages/index/commentsSuccess/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "评价成功"
 				"navigationBarTitleText": "评价成功"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/index/commentsDetail/index",
 			"path": "pages/index/commentsDetail/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "评论详情"
 				"navigationBarTitleText": "评论详情"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/index/vr/index",
 			"path": "pages/index/vr/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "场馆全景"
 				"navigationBarTitleText": "场馆全景"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/index/mapPage/index",
 			"path": "pages/index/mapPage/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "导航"
 				"navigationBarTitleText": "导航"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/mine/index",
 			"path": "pages/mine/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "我的",
 				"navigationBarTitleText": "我的",
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/mine/accountSetting/index",
 			"path": "pages/mine/accountSetting/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "账户设置"
 				"navigationBarTitleText": "账户设置"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/mine/reviseNickname/index",
 			"path": "pages/mine/reviseNickname/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "修改昵称"
 				"navigationBarTitleText": "修改昵称"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/mine/orderInfo/index",
 			"path": "pages/mine/orderInfo/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "订单"
 				"navigationBarTitleText": "订单"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/mine/feedback/index",
 			"path": "pages/mine/feedback/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "意见反馈",
 				"navigationBarTitleText": "意见反馈",
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/mine/feedbackRecord/index",
 			"path": "pages/mine/feedbackRecord/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "反馈记录",
 				"navigationBarTitleText": "反馈记录",
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
-		},{
+		},
+		{
 			"path": "pages/mine/mineComments/index",
 			"path": "pages/mine/mineComments/index",
 			"style": {
 			"style": {
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTitleText": "评价详情",
 				"navigationBarTitleText": "评价详情",
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
+		},
+		{
+			"path": "pages/index/insure/index",
+			"style": {
+				"navigationBarBackgroundColor": "#fff",
+				"navigationBarTitleText": "投保"
+			}
+		},
+		{
+			"path": "pages/index/signWebview/index",
+			"style": {
+				"navigationBarTitleText": "index",
+				"navigationBarTitleText": "合同签署"
+
+			}
 		}
 		}
 	],
 	],
 	"tabBar": {
 	"tabBar": {
 		"selectedColor": "#222222",
 		"selectedColor": "#222222",
-		"list": [{
+		"list": [
+			{
 				"text": "首页",
 				"text": "首页",
 				"pagePath": "pages/index/index",
 				"pagePath": "pages/index/index",
 				"iconPath": "/static/tabbar/home.png",
 				"iconPath": "/static/tabbar/home.png",

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

@@ -255,7 +255,7 @@
 	}
 	}
 
 
 	const toOrderPage = () => {
 	const toOrderPage = () => {
-		RouterUtils.to_page(`/pages/index/gymPay/index?courseId=${courseId.value}&type=${type.value}`)
+		RouterUtils.to_page(`/pages/index/gymPay/index?courseId=${courseId.value}&type=${type.value}&orderType=2`)
 	}
 	}
 
 
 	const courseId = ref()
 	const courseId = ref()

+ 31 - 26
src/pages/index/eventsDetail/index.vue

@@ -274,40 +274,45 @@ const scrollToTop = () => {
 }
 }
 
 
 // 倒计时
 // 倒计时
-// 设置报名结束时间 (格式:YYYY-MM-DD HH:mm:ss)
 const endTime = ref<string>('0000-00-00 00:00:00');
 const endTime = ref<string>('0000-00-00 00:00:00');
 const days = ref<string>('00');
 const days = ref<string>('00');
 const hours = ref<string>('00');
 const hours = ref<string>('00');
 const minutes = ref<string>('00');
 const minutes = ref<string>('00');
 const seconds = ref<string>('00');
 const seconds = ref<string>('00');
 let timer: number | null = null;
 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, '/');
+};
 const updateCountdown = () => {
 const updateCountdown = () => {
-	const now = new Date().getTime();
-	const endDate = new Date(endTime.value).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 d = Math.floor(timeLeft / (1000 * 60 * 60 * 24));
-	const h = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
-	const m = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60));
-	const s = Math.floor((timeLeft % (1000 * 60)) / 1000);
-	// 格式化为两位数
-	days.value = d.toString().padStart(2, '0');
-	hours.value = h.toString().padStart(2, '0');
-	minutes.value = m.toString().padStart(2, '0');
-	seconds.value = s.toString().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 eventsId = ref()
 const eventsId = ref()
 const eventsInfoObj = ref({})
 const eventsInfoObj = ref({})

+ 312 - 61
src/pages/index/eventsRegister/index.vue

@@ -3,7 +3,7 @@
 	<view class="content">
 	<view class="content">
 		<view class="r-card-list">
 		<view class="r-card-list">
 			<view class="r-title">选择报名项目</view>
 			<view class="r-title">选择报名项目</view>
-			<view class="r-list-box">
+			<view class="r-list-box" v-if="individualEvents[0]">
 				<view class="r-events"
 				<view class="r-events"
 					v-for="(item, index) in (selectTabs == 0 ? individualEvents[0].gamePriceRulesVOList : teamsEvents[0].gamePriceRulesVOList)"
 					v-for="(item, index) in (selectTabs == 0 ? individualEvents[0].gamePriceRulesVOList : teamsEvents[0].gamePriceRulesVOList)"
 					:key="index" @click="toggleSelect(item, index)" :class="{ 'selected-item': selectEvents == index }">
 					:key="index" @click="toggleSelect(item, index)" :class="{ 'selected-item': selectEvents == index }">
@@ -73,22 +73,54 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		<view class="r-insurance">
-			<view class="r-image-box">
-				<image src="https://img.keaitupian.cn/newupload/08/1629449018344288.jpg" mode=""></image>
-			</view>
-			<view class="r-insurance-title">
-				<view class="r-insurance-name">
-					<view class="r-name">运动无忧保</view>
-					<view class="r-tags">不支持退款</view>
+		<view class="r-insurance" v-for="item in insureIdList" :key="item.id">
+			<view class="r-insurance-infobox">
+				<view class="r-image-box">
+					<image :src="item.coverImg" mode=""></image>
 				</view>
 				</view>
-				<view class="r-insurance-desc">意外身故、残疾10万;意外医疗1万;意外补充医疗1万;</view>
-				<view class="r-insurance-type">保险公司:中国人保</view>
-				<view class="r-insurance-price">
-					<view class="r-price">¥2/天·人</view>
-					<view class="r-insurance-btn">去投保</view>
+				<view class="r-insurance-title">
+					<view class="r-insurance-name">
+						<view class="r-name">{{ item.name }}</view>
+						<view class="r-tags">不支持退款</view>
+					</view>
+					<view class="r-insurance-desc" v-for="(desc, index) in item.insuranceObvious" :key="index">
+						<text v-for="([key, value], idx) in Object.entries(desc)" :key="key + idx">{{ key }}, {{
+							value }};</text>
+					</view>
+					<view class="r-insurance-type">保险公司:{{ item.insuranceName_dictText }}</view>
+					<view class="r-insurance-price">
+						<view class="r-price">¥{{ insurePrice }}/天·人</view>
+						<view class="r-insurance-btn" v-if="insureData.length < 1"
+							@click="gotoInsuracePage(item.priceDataList)">去投保
+						</view>
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
+			<view class="line" v-if="insureData.length > 0"></view>
+			<blcok v-if="insureData.length > 0">
+				<view class="r-insurance-adduser" v-for="(insureUser, index) in insureData" :key="index">
+					<view class="r-adduser-btn">
+						<view class="r-celar" @click="clearUser">清除</view>
+						<view class="r-edit" @click="RouterUtils.to_page(`/pages/index/insure/index?priceDataList=${JSON.stringify(item.priceDataList)}`)">修改</view>
+					</view>
+					<view class="r-userinfo-list">
+						<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>)</view>
+						</view>
+						<view class="r-userinfo-item">
+							<view class="r-item-title">生效时间</view>
+							<view class="r-item-info">{{ insureUser.slectObj.day }}天({{ insureUser.startDate }}-{{ insureUser.endDate }})
+							</view>
+						</view>
+						<view class="r-userinfo-item">
+							<view class="r-item-title">保费总金额</view>
+							<view class="r-item-info">¥{{ insureUser.totalPrice }}</view>
+						</view>
+					</view>
+				</view>
+			</blcok>
 		</view>
 		</view>
 	</view>
 	</view>
 	<view style="height: 140rpx;"></view>
 	<view style="height: 140rpx;"></view>
@@ -104,6 +136,45 @@
 			<button hover-class="hvoer-style">立即支付</button>
 			<button hover-class="hvoer-style">立即支付</button>
 		</view>
 		</view>
 	</view>
 	</view>
+	<uni-popup ref="insurePopup" type="center">
+		<view class="r-center-popup">
+			<view class="r-popup-title">无保险免责声明</view>
+			<view class="r-popup-content">
+				一、本声明的目的是为了使用体育场地的人员明确
+				知晓体育活动所存在的风险,凡签署本声明的人员,
+				均视为已经仔细阅读和完全理解并同意接受本声明
+				的全部条款。对于违反国家相关法规、恶意侵犯他
+				人或其他涉及犯罪行为的事件,均不在本声明范国
+				内跟覆篮戏娇须由个人承担相应的法律责任。
+				一、本声明的目的是为了使用体育场地的人员明确
+				知晓体育活动所存在的风险,凡签署本声明的人员,
+				均视为已经仔细阅读和完全理解并同意接受本声明
+				的全部条款。对于违反国家相关法规、恶意侵犯他
+				人或其他涉及犯罪行为的事件,均不在本声明范国
+				内跟覆篮戏娇须由个人承担相应的法律责任。
+				一、本声明的目的是为了使用体育场地的人员明确
+				知晓体育活动所存在的风险,凡签署本声明的人员,
+				均视为已经仔细阅读和完全理解并同意接受本声明
+				的全部条款。对于违反国家相关法规、恶意侵犯他
+				人或其他涉及犯罪行为的事件,均不在本声明范国
+				内跟覆篮戏娇须由个人承担相应的法律责任。
+				一、本声明的目的是为了使用体育场地的人员明确
+				知晓体育活动所存在的风险,凡签署本声明的人员,
+				均视为已经仔细阅读和完全理解并同意接受本声明
+				的全部条款。对于违反国家相关法规、恶意侵犯他
+				人或其他涉及犯罪行为的事件,均不在本声明范国
+				内跟覆篮戏娇须由个人承担相应的法律责任。
+			</view>
+			<view class="r-popup-footer">
+				<view class="r-popup-needbtn" @click="toNeed">我需要购买保险</view>
+				<view class="r-popup-refusebtn" @click="toRefuse">我拒绝购买保险</view>
+				<view class="r-popup-checkbox" @click="select_insurance = !select_insurance">
+					<zzx-icon :name="select_insurance ? 'selected' : 'unchecked'" size="14"></zzx-icon>
+					<text>我已认真阅读及确认</text>
+				</view>
+			</view>
+		</view>
+	</uni-popup>
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
@@ -112,14 +183,15 @@ import { http } from '@/utils/http';
 import { RouterUtils, TipsUtils, idCardHide } from '@/utils/util';
 import { RouterUtils, TipsUtils, idCardHide } from '@/utils/util';
 import { onLoad } from '@dcloudio/uni-app';
 import { onLoad } from '@dcloudio/uni-app';
 import zsTabs from "@/components/zzx-tabs/zzx-tabs.vue";
 import zsTabs from "@/components/zzx-tabs/zzx-tabs.vue";
-
-const select_insurance = ref(false);
+const insurePopup = ref()
+const select_insurance = ref(false)
 onLoad((options) => {
 onLoad((options) => {
 	eventId.value = options.id;
 	eventId.value = options.id;
 })
 })
 onMounted(() => {
 onMounted(() => {
 	get_userData()
 	get_userData()
 	get_eventsInfoDetail()
 	get_eventsInfoDetail()
+	getInsureData()
 })
 })
 // 切换选中状态
 // 切换选中状态
 const selectEvents = ref()
 const selectEvents = ref()
@@ -158,16 +230,63 @@ const changeTab = (e: any) => {
 }
 }
 
 
 const eventId = ref()
 const eventId = ref()
-const individualEvents = ref([])
-const teamsEvents = ref([])
-const aptitudesList = ref([])
+const individualEvents = ref([]) // 个人赛项目
+const teamsEvents = ref([]) // 团队赛项目
+const aptitudesList = ref([]) // 资质列表
+const insureIdList = ref([])  // 保险列表
+const insurePrice = ref() // 保险价格
 const get_eventsInfoDetail = () => {
 const get_eventsInfoDetail = () => {
 	http.get('/game/findByGameId', { data: { id: eventId.value }, loading: true }).then((res: any) => {
 	http.get('/game/findByGameId', { data: { id: eventId.value }, loading: true }).then((res: any) => {
 		individualEvents.value = res.result.gamePriceRulesTypeVOList.filter((item: any) => item.type == 0)
 		individualEvents.value = res.result.gamePriceRulesTypeVOList.filter((item: any) => item.type == 0)
 		teamsEvents.value = res.result.gamePriceRulesTypeVOList.filter((item: any) => item.type == 1)
 		teamsEvents.value = res.result.gamePriceRulesTypeVOList.filter((item: any) => item.type == 1)
 		aptitudesList.value = res.result.aptitudesList
 		aptitudesList.value = res.result.aptitudesList
+		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
 	})
 	})
 }
 }
+
+const priceDataListData = ref([])
+const gotoInsuracePage = (e: any) => {
+	priceDataListData.value = e
+	insurePopup.value.open()
+}
+
+const toNeed = () => {
+	if (!select_insurance.value) return TipsUtils.tips_toast('请先阅读并同意协议')
+	RouterUtils.to_page(`/pages/index/insure/index?priceDataList=${JSON.stringify(priceDataListData.value)}`)
+	insurePopup.value.close()
+}
+
+const toRefuse = () => {
+	if (select_insurance.value) {
+		insurePopup.value.close()
+	} else {
+		TipsUtils.tips_toast('请先阅读并同意协议')
+	}
+}
+const insureData = ref([])
+const getInsureData = () => {
+	uni.$on('insureData', function (data) {
+		insureData.value = data
+		console.log(insureData.value, '投保信息');
+
+	})
+}
+
+const clearUser = async () => {
+	let res:any = await TipsUtils.tips_alert('确定清除投保人信息吗?', true)
+	if (res.confirm) {
+		insureData.value = []
+	}
+}
 </script>
 </script>
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
@@ -402,67 +521,112 @@ const get_eventsInfoDetail = () => {
 	padding: 20rpx;
 	padding: 20rpx;
 	background: #FFFFFF;
 	background: #FFFFFF;
 	border-radius: 32rpx;
 	border-radius: 32rpx;
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	gap: 20rpx;
 
 
-	.r-image-box {
-		&>image {
-			width: 200rpx;
-			height: 200rpx;
-			border-radius: 32rpx;
+	.r-insurance-infobox {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		gap: 20rpx;
+		margin-bottom: 20rpx;
+
+		.r-image-box {
+			&>image {
+				width: 200rpx;
+				height: 200rpx;
+				border-radius: 32rpx;
+			}
 		}
 		}
-	}
 
 
-	.r-insurance-title {
-		.r-insurance-name {
-			display: flex;
-			align-items: center;
-			gap: 16rpx;
+		.r-insurance-title {
+			.r-insurance-name {
+				display: flex;
+				align-items: center;
+				gap: 16rpx;
 
 
-			.r-name {
-				font-weight: 800;
-				font-size: 28rpx;
-				color: #222222;
+				.r-name {
+					font-weight: 800;
+					font-size: 28rpx;
+					color: #222222;
+				}
+
+				.r-tags {
+					width: 136rpx;
+					height: 36rpx;
+					background: #FDD143;
+					border-radius: 8rpx;
+					font-size: 22rpx;
+					color: #222222;
+					text-align: center;
+					line-height: 36rpx;
+				}
 			}
 			}
 
 
-			.r-tags {
-				width: 136rpx;
-				height: 36rpx;
-				background: #FDD143;
-				border-radius: 8rpx;
-				font-size: 22rpx;
-				color: #222222;
-				text-align: center;
-				line-height: 36rpx;
+			.r-insurance-desc {
+				width: 440rpx;
+				margin-top: 10rpx;
+				font-size: 24rpx;
+				color: #AAAAAA;
+				word-wrap: break-word;
 			}
 			}
-		}
 
 
-		.r-insurance-desc {
-			margin-top: 10rpx;
-			font-size: 24rpx;
-			color: #AAAAAA;
-		}
+			.r-insurance-type {
+				margin-top: 10rpx;
+				font-size: 24rpx;
+				color: #AAAAAA;
+			}
 
 
-		.r-insurance-type {
-			margin-top: 10rpx;
-			font-size: 24rpx;
-			color: #AAAAAA;
+			.r-insurance-price {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				.r-price {
+					font-weight: bold;
+					font-size: 28rpx;
+					color: #FB5B5B;
+				}
+
+				.r-insurance-btn {
+					width: 200rpx;
+					height: 68rpx;
+					background: #C8FF0C;
+					border-radius: 60rpx;
+					font-weight: bold;
+					font-size: 28rpx;
+					color: #222222;
+					text-align: center;
+					line-height: 68rpx;
+				}
+			}
 		}
 		}
+	}
+
+	.r-insurance-adduser {
+		background: #F6F6F6;
+		border-radius: 32rpx;
+		padding: 20rpx;
+		margin-top: 20rpx;
 
 
-		.r-insurance-price {
+		.r-adduser-btn {
 			display: flex;
 			display: flex;
 			align-items: center;
 			align-items: center;
-			justify-content: space-between;
+			justify-content: flex-end;
+			gap: 20rpx;
 
 
-			.r-price {
+			.r-celar {
+				width: 192rpx;
+				height: 60rpx;
+				background: #FFFFFF;
+				border-radius: 60rpx;
+				border: 2rpx solid #FB5B5B;
 				font-weight: bold;
 				font-weight: bold;
 				font-size: 28rpx;
 				font-size: 28rpx;
 				color: #FB5B5B;
 				color: #FB5B5B;
+				text-align: center;
+				line-height: 68rpx;
 			}
 			}
 
 
-			.r-insurance-btn {
+			.r-edit {
 				width: 200rpx;
 				width: 200rpx;
 				height: 68rpx;
 				height: 68rpx;
 				background: #C8FF0C;
 				background: #C8FF0C;
@@ -474,6 +638,25 @@ const get_eventsInfoDetail = () => {
 				line-height: 68rpx;
 				line-height: 68rpx;
 			}
 			}
 		}
 		}
+
+		.r-userinfo-list {
+			.r-userinfo-item {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				margin-top: 20rpx;
+
+				.r-item-title {
+					font-size: 28rpx;
+					color: #AAAAAA;
+				}
+
+				.r-item-info {
+					font-size: 28rpx;
+					color: #222222;
+				}
+			}
+		}
 	}
 	}
 }
 }
 
 
@@ -534,4 +717,72 @@ const get_eventsInfoDetail = () => {
 		}
 		}
 	}
 	}
 }
 }
+
+.r-center-popup {
+	width: 646rpx;
+	height: 1220rpx;
+	background: #F6F6F6;
+	border-radius: 32rpx;
+	padding: 20rpx;
+
+	.r-popup-title {
+		font-weight: bold;
+		font-size: 32rpx;
+		color: #222222;
+		text-align: center;
+	}
+
+	.r-popup-content {
+		margin-top: 28rpx;
+		font-size: 28rpx;
+		color: #222222;
+		height: 800rpx;
+		overflow: auto;
+	}
+
+	.r-popup-footer {
+		margin-top: 20rpx;
+
+		.r-popup-needbtn {
+			margin: auto;
+			width: 598rpx;
+			height: 100rpx;
+			background: #C8FF0C;
+			border-radius: 60rpx;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #222222;
+			text-align: center;
+			line-height: 100rpx;
+		}
+
+		.r-popup-refusebtn {
+			margin: auto;
+			margin-top: 24rpx;
+			width: 598rpx;
+			height: 100rpx;
+			background: #f0eeee;
+			border-radius: 60rpx;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #AAAAAA;
+			text-align: center;
+			line-height: 100rpx;
+		}
+
+		.r-popup-checkbox {
+			margin-top: 20rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			gap: 16rpx;
+			font-size: 24rpx;
+			color: #AAAAAA;
+
+			&>text {
+				margin-bottom: 8rpx;
+			}
+		}
+	}
+}
 </style>
 </style>

+ 617 - 391
src/pages/index/gymPay/index.vue

@@ -5,9 +5,9 @@
 			<view class="g-shoping-info">
 			<view class="g-shoping-info">
 				<image class="shoping-img" :src="previewCourseInfo.cover" mode=""></image>
 				<image class="shoping-img" :src="previewCourseInfo.cover" mode=""></image>
 				<view class="shoping-info">
 				<view class="shoping-info">
-					<view class="name">{{previewCourseInfo.name}}</view>
+					<view class="name">{{ previewCourseInfo.name }}</view>
 					<view class="price-info">
 					<view class="price-info">
-						<view class="price"><text class="mini-text">¥</text>{{previewCourseInfo.sellingPrice}}</view>
+						<view class="price"><text class="mini-text">¥</text>{{ previewCourseInfo.sellingPrice }}</view>
 						<view class="price-stepper">
 						<view class="price-stepper">
 							<view class="minus" @click="minusNum">-</view>
 							<view class="minus" @click="minusNum">-</view>
 							<input v-model="countTotal" disabled type="number" />
 							<input v-model="countTotal" disabled type="number" />
@@ -19,20 +19,20 @@
 			<view class="g-shoping-total">
 			<view class="g-shoping-total">
 				<view class="total-price">
 				<view class="total-price">
 					<view class="">商品总价(共1件)</view>
 					<view class="">商品总价(共1件)</view>
-					<view class="">¥{{previewCourseInfo.sellingPrice}}</view>
+					<view class="">¥{{ previewCourseInfo.sellingPrice }}</view>
 				</view>
 				</view>
 				<view class="total-price">
 				<view class="total-price">
 					<view class="">
 					<view class="">
-						<text v-if="loadType==1||loadType==2">试听优惠</text>
-						<text v-if="loadType==3">团购优惠</text>
+						<text v-if="loadType == 1 || loadType == 2">试听优惠</text>
+						<text v-if="loadType == 3">团购优惠</text>
 					</view>
 					</view>
-					<view class="">-¥{{previewCourseInfo.discountPrice}}</view>
+					<view class="">-¥{{ previewCourseInfo.discountPrice }}</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view class="subtotal">小计 ¥{{previewCourseInfo.subtotal}}</view>
+			<view class="subtotal">小计 ¥{{ previewCourseInfo.subtotal }}</view>
 		</view>
 		</view>
 		<!-- 无固定场进入 -->
 		<!-- 无固定场进入 -->
-		<view class="g-buy-tips" v-if="loadType==4">
+		<view class="g-buy-tips" v-if="loadType == 4">
 			<view class="tips-title">购买须知</view>
 			<view class="tips-title">购买须知</view>
 			<view class="tips-info-card">
 			<view class="tips-info-card">
 				<view class="title">有效期</view>
 				<view class="title">有效期</view>
@@ -49,30 +49,50 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<!-- 课程进入 -->
 		<!-- 课程进入 -->
-		 <!-- v-if="loadType==1||loadType==3" -->
-		<view class="g-insurance-card">
-			<view class="g-insurance-info">
-				<view class="insurance-type">
-					<view class="type-name">
-						<view class="name">意外险</view>
-						<view class="tips">不支持退款</view>
+		<!-- v-if="loadType==1||loadType==3" -->
+		<view class="r-insurance">
+			<view class="r-insurance-infobox">
+				<view class="r-image-box">
+					<image src="https://img.keaitupian.cn/newupload/08/1629449018344288.jpg" mode=""></image>
+				</view>
+				<view class="r-insurance-title">
+					<view class="r-insurance-name">
+						<view class="r-name">运动无忧保</view>
+						<view class="r-tags">不支持退款</view>
 					</view>
 					</view>
-					<view class="insurance-more">
-						<text>查看详情</text>
-						<zzx-icon name="ashRight" size="12"></zzx-icon>
+					<view class="r-insurance-desc">意外身故、残疾10万;意外医疗1万;意外补充医疗1万;</view>
+					<view class="r-insurance-type">保险公司:中国人保</view>
+					<view class="r-insurance-price">
+						<view class="r-price">¥2/天·人</view>
+						<!-- RouterUtils.to_page('/pages/index/insure/index') -->
+						<view class="r-insurance-btn" @click="insurePopup.open()">去投保
+						</view>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="insurance-num" @click="select_insurance=!select_insurance">
-					<view class="">¥3/人×1份(意外事故10万,社保内医疗1万)</view>
-					<zzx-icon :name="select_insurance?'selected' : 'unchecked'" size="14"></zzx-icon>
-				</view>
 			</view>
 			</view>
-			<view class="insurance-total">
-				<view class="text">保险总价(共2件)</view>
-				<view class="price">¥6</view>
+			<view class="line"></view>
+			<view class="r-insurance-adduser">
+				<view class="r-adduser-btn" @click="toUserList">
+					<view class="r-celar" @click="clearUser">清除</view>
+					<view class="r-edit" @click="editUser">修改</view>
+				</view>
+				<view class="r-userinfo-list">
+					<view class="r-userinfo-item">
+						<view class="r-item-title">被保人</view>
+						<view class="r-item-info">2人(杨锦新、赵四儿)</view>
+					</view>
+					<view class="r-userinfo-item">
+						<view class="r-item-title">生效时间</view>
+						<view class="r-item-info">2天(2025.07.24-2025.07-28)</view>
+					</view>
+					<view class="r-userinfo-item">
+						<view class="r-item-title">保费总金额</view>
+						<view class="r-item-info">¥8</view>
+					</view>
+				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		  <!-- v-if="loadType==1||loadType==3" -->
+		<!-- v-if="loadType==1||loadType==3" -->
 		<view class="g-userinfo-card">
 		<view class="g-userinfo-card">
 			<view class="r-user">
 			<view class="r-user">
 				<view class="user-title">用户信息</view>
 				<view class="user-title">用户信息</view>
@@ -87,8 +107,8 @@
 			<view class="r-user-list" v-for="item in userData" :key="item.id">
 			<view class="r-user-list" v-for="item in userData" :key="item.id">
 				<view class="minus-user" @click="deleteUser(item)">-</view>
 				<view class="minus-user" @click="deleteUser(item)">-</view>
 				<view class="r-list">
 				<view class="r-list">
-					<view class="name">{{item.fullName}}</view>
-					<view class="id-num">身份证 {{idCardHide(item.identityCard)}}</view>
+					<view class="name">{{ item.fullName }}</view>
+					<view class="id-num">身份证 {{ idCardHide(item.identityCard) }}</view>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="g-adduser-btn" @click="toUserList">
 			<view class="g-adduser-btn" @click="toUserList">
@@ -96,7 +116,7 @@
 				<view class="add-text">添加用户</view>
 				<view class="add-text">添加用户</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		  <!-- v-if="loadType==1" -->
+		<!-- v-if="loadType==1" -->
 		<view class="g-usetips-card">
 		<view class="g-usetips-card">
 			<view class="use-title">使用须知</view>
 			<view class="use-title">使用须知</view>
 			<view class="use-text">
 			<view class="use-text">
@@ -113,496 +133,702 @@
 		<view class="footer footer-box">
 		<view class="footer footer-box">
 			<view class="footer-price">
 			<view class="footer-price">
 				<view class="total-price">合计:</view>
 				<view class="total-price">合计:</view>
-				<view class="price"><text class="mini-text">¥</text>{{previewCourseInfo.totalPrice}}</view>
-				<view class="discount">优惠¥{{previewCourseInfo.totalDiscount}}</view>
+				<view class="price"><text class="mini-text">¥</text>{{ previewCourseInfo.totalPrice }}</view>
+				<view class="discount">优惠¥{{ previewCourseInfo.totalDiscount }}</view>
 			</view>
 			</view>
-			<view class="footer-btn" @click="to_pay">
+			<view class="footer-btn" @click="submitOrder">
 				<button>
 				<button>
-					<view class="btn-price">¥{{previewCourseInfo.totalPrice}}</view>
+					<view class="btn-price">¥{{ previewCourseInfo.totalPrice }}</view>
 					<view class="btn-price">立即支付</view>
 					<view class="btn-price">立即支付</view>
 				</button>
 				</button>
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
+	<uni-popup ref="insurePopup" type="center">
+		<view class="r-center-popup">
+			<view class="r-popup-title">无保险免责声明</view>
+			<view class="r-popup-content">
+				一、本声明的目的是为了使用体育场地的人员明确
+				知晓体育活动所存在的风险,凡签署本声明的人员,
+				均视为已经仔细阅读和完全理解并同意接受本声明
+				的全部条款。对于违反国家相关法规、恶意侵犯他
+				人或其他涉及犯罪行为的事件,均不在本声明范国
+				内跟覆篮戏娇须由个人承担相应的法律责任。
+				一、本声明的目的是为了使用体育场地的人员明确
+				知晓体育活动所存在的风险,凡签署本声明的人员,
+				均视为已经仔细阅读和完全理解并同意接受本声明
+				的全部条款。对于违反国家相关法规、恶意侵犯他
+				人或其他涉及犯罪行为的事件,均不在本声明范国
+				内跟覆篮戏娇须由个人承担相应的法律责任。
+				一、本声明的目的是为了使用体育场地的人员明确
+				知晓体育活动所存在的风险,凡签署本声明的人员,
+				均视为已经仔细阅读和完全理解并同意接受本声明
+				的全部条款。对于违反国家相关法规、恶意侵犯他
+				人或其他涉及犯罪行为的事件,均不在本声明范国
+				内跟覆篮戏娇须由个人承担相应的法律责任。
+				一、本声明的目的是为了使用体育场地的人员明确
+				知晓体育活动所存在的风险,凡签署本声明的人员,
+				均视为已经仔细阅读和完全理解并同意接受本声明
+				的全部条款。对于违反国家相关法规、恶意侵犯他
+				人或其他涉及犯罪行为的事件,均不在本声明范国
+				内跟覆篮戏娇须由个人承担相应的法律责任。
+			</view>
+			<view class="r-popup-footer">
+				<view class="r-popup-needbtn" @click="toNeed">我需要购买保险</view>
+				<view class="r-popup-refusebtn" @click="toRefuse">我拒绝购买保险</view>
+				<view class="r-popup-checkbox" @click="select_insurance = !select_insurance">
+					<zzx-icon :name="select_insurance ? 'selected' : 'unchecked'" size="14"></zzx-icon>
+					<text>我已认真阅读及确认</text>
+				</view>
+			</view>
+		</view>
+	</uni-popup>
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
-	import { ref, onMounted,computed } from 'vue';
-	import { onLoad, onPageScroll } from '@dcloudio/uni-app';
-	import { RouterUtils, TipsUtils,idCardHide } from '@/utils/util';
-	import { http } from '@/utils/http'
-	const select_insurance = ref(false);
-	const loadType = ref(1)
-	onLoad((options) => {
-		console.log(options);
-		loadType.value = options.type
-		courseId.value = options.courseId
-	})
-	onMounted(() => {
-		get_previewOrderCourse()
-		get_userData()
-	})
-	
-	
-	const to_pay = () => {
-		uni.navigateTo({
-			url: '/pages/index/toBeUsed/index'
-		})
-	}
-	
-	const toUserList = () => {
-		RouterUtils.to_page('/pages/index/userList/index')
-	}
-	
-	const userData=ref()
-	const get_userData=()=>{
-		uni.$on('userData',function(data){
-			userData.value=data
-		})
-	}
-	
-	const deleteUser=async(e)=>{
-		let res = await TipsUtils.tips_alert('确定删除该用户吗?',true)
-		if(res.confirm){
-			userData.value=userData.value.filter(user=>user.id!==e.id)
+import { ref, onMounted, computed } from 'vue';
+import { onLoad, onPageScroll } from '@dcloudio/uni-app';
+import { RouterUtils, TipsUtils, idCardHide } from '@/utils/util';
+import { http } from '@/utils/http'
+const insurePopup = ref()
+const select_insurance = ref(false)
+const loadType = ref(1)
+onLoad((options) => {
+	loadType.value = options.type
+	courseId.value = options.courseId
+	orderFormData.value.type = options.orderType
+})
+onMounted(() => {
+	get_previewOrderCourse()
+	get_userData()
+})
+
+const toUserList = () => {
+	RouterUtils.to_page('/pages/index/userList/index')
+}
+
+const userData = ref()
+const get_userData = () => {
+	uni.$on('userData', function (data) {
+		userData.value = data
+		if (data.length > 0) {
+			let familyIds = data.map(item => item.id)
+			orderFormData.value.familyIds = familyIds.join(',')
+		} else {
+			orderFormData.value.familyIds = []
 		}
 		}
-	}
+	})
+}
 
 
-	const courseId = ref()
-	const previewCourseInfo = ref()
-	const get_previewOrderCourse = () => {
-		http.get('/order/previewOrderCourse', { data: { courseId: courseId.value }, loading: true }).then((res) => {
-			previewCourseInfo.value = res.result
-		})
+const deleteUser = async (e) => {
+	let res = await TipsUtils.tips_alert('确定删除该用户吗?', true)
+	if (res.confirm) {
+		userData.value = userData.value.filter(user => user.id !== e.id)
 	}
 	}
+}
+
+const courseId = ref()
+const previewCourseInfo = ref()
+const get_previewOrderCourse = () => {
+	http.get('/order/previewOrderCourse', { data: { courseId: courseId.value }, loading: true }).then((res) => {
+		previewCourseInfo.value = res.result
+		orderFormData.value.productIds = res.result.id
+	})
+}
 
 
-	const countTotal = ref(1)
-	const minusNum = () => {
-		if (countTotal.value > 1) {
-			countTotal.value--
+const countTotal = ref(1)
+const minusNum = () => {
+	if (countTotal.value > 1) {
+		countTotal.value--
+		orderFormData.value.amount = countTotal.value
+	}
+}
+
+// const subtotal=computed(()=>{
+// 	return (previewCourseInfo.value.subtotal*countTotal.value).toFixed(2)-previewCourseInfo.value.
+// })
+
+const addNum = () => {
+	get_checkCourseLimitNum(countTotal.value + 1)
+	orderFormData.value.amount = countTotal.value+1
+}
+
+const get_checkCourseLimitNum = (targetNum) => {
+	http.get('/order/checkCourseLimitNum', {
+		data: {
+			courseId: courseId.value,
+			limitNum: targetNum
+		},
+		loading: true
+	}).then((res) => {
+		if (res.result === true) {
+			countTotal.value = targetNum
+		} else {
+			TipsUtils.tips_toast('超出可购数量')
 		}
 		}
+	})
+}
+
+const toNeed = () => {
+	if (!select_insurance.value) return TipsUtils.tips_toast('请先阅读并同意协议')
+	insurePopup.value.close()
+	RouterUtils.to_page('/pages/index/insure/index')
+}
+
+const toRefuse = () => {
+	if (select_insurance.value) {
+		insurePopup.value.close()
+	} else {
+		TipsUtils.tips_toast('请先阅读并同意协议')
 	}
 	}
-	
-	// const subtotal=computed(()=>{
-	// 	return (previewCourseInfo.value.subtotal*countTotal.value).toFixed(2)-previewCourseInfo.value.
-	// })
+}
+
+// uni.navigateTo({
+// 	url: '/pages/index/toBeUsed/index'
+// })
+let orderFormData = ref({
+	type: null,
+	orderType: null,
+	orFreeOrder: 1,
+	productIds: null,
+	amount: null,
+	familyIds: null,
+})
+const submitOrder = () => {
+	if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
+	http.post('/order/createOrder', orderFormData.value, { loading: true }).then((res) => {
 
 
-	const addNum = () => {
-		get_checkCourseLimitNum(countTotal.value + 1)
-	}
-	
-	const get_checkCourseLimitNum = (targetNum) => {
-		http.get('/order/checkCourseLimitNum', {
-			data: {
-				courseId: courseId.value,
-				limitNum: targetNum
-			},
-			loading: true
-		}).then((res) => {
-			if (res.result === true) {
-				countTotal.value = targetNum
-			} else {
-				TipsUtils.tips_toast('超出可购数量')
-			}
-		})
-	}
+	})
+}
 </script>
 </script>
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
-	.g-orderinfo-card {
-		background: #FFFFFF;
-		border-radius: 32rpx;
-		padding: 20rpx;
-		margin-top: 20rpx;
+.g-orderinfo-card {
+	background: #FFFFFF;
+	border-radius: 32rpx;
+	padding: 20rpx;
+	margin-top: 20rpx;
+
+	.g-shoping-info {
+		display: flex;
+		align-items: center;
+		gap: 20rpx;
+
+		.shoping-img {
+			width: 200rpx;
+			height: 200rpx;
+			border-radius: 32rpx;
+		}
 
 
-		.g-shoping-info {
-			display: flex;
-			align-items: center;
-			gap: 20rpx;
+		.shoping-info {
+			width: 440rpx;
 
 
-			.shoping-img {
-				width: 200rpx;
-				height: 200rpx;
-				border-radius: 32rpx;
+			.name {
+				font-weight: 800;
+				font-size: 32rpx;
+				color: #222222;
+				line-height: 44rp
 			}
 			}
 
 
-			.shoping-info {
-				width: 440rpx;
+			.price-info {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				margin-top: 26rpx;
 
 
-				.name {
+				.price {
 					font-weight: 800;
 					font-weight: 800;
-					font-size: 32rpx;
-					color: #222222;
-					line-height: 44rp
+					font-size: 48rpx;
+					color: #FB5B5B;
 				}
 				}
 
 
-				.price-info {
+				.price-stepper {
 					display: flex;
 					display: flex;
 					align-items: center;
 					align-items: center;
-					justify-content: space-between;
-					margin-top: 26rpx;
+					border: 1rpx solid #F0F0F0;
+					border-radius: 8rpx;
 
 
-					.price {
-						font-weight: 800;
-						font-size: 48rpx;
-						color: #FB5B5B;
+					.minus {
+						text-align: center;
+						width: 44rpx;
+						border-right: 1rpx solid #F0F0F0;
 					}
 					}
 
 
-					.price-stepper {
-						display: flex;
-						align-items: center;
-						border: 1rpx solid #F0F0F0;
-						border-radius: 8rpx;
-
-						.minus {
-							text-align: center;
-							width: 44rpx;
-							border-right: 1rpx solid #F0F0F0;
-						}
-
-						&>input {
-							width: 80rpx;
-							font-size: 28rpx;
-							color: #222222;
-							text-align: center;
-						}
-
-						.add {
-							text-align: center;
-							width: 44rpx;
-							border-left: 1rpx solid #F0F0F0;
-						}
+					&>input {
+						width: 80rpx;
+						font-size: 28rpx;
+						color: #222222;
+						text-align: center;
+					}
+
+					.add {
+						text-align: center;
+						width: 44rpx;
+						border-left: 1rpx solid #F0F0F0;
 					}
 					}
 				}
 				}
 			}
 			}
 		}
 		}
+	}
 
 
-		.g-shoping-total {
-			height: 148rpx;
-			margin-top: 24rpx;
-			border-top: 1rpx solid #F0F0F0;
+	.g-shoping-total {
+		height: 148rpx;
+		margin-top: 24rpx;
+		border-top: 1rpx solid #F0F0F0;
 
 
-			.total-price {
-				margin-top: 24rpx;
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-				font-size: 28rpx;
-				color: #222222;
-			}
-		}
-
-		.subtotal {
-			border-top: 1rpx solid #F0F0F0;
-			height: 84rpx;
-			line-height: 84rpx;
-			font-weight: bold;
+		.total-price {
+			margin-top: 24rpx;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
 			font-size: 28rpx;
 			font-size: 28rpx;
-			color: #FB5B5B;
-			text-align: right;
+			color: #222222;
 		}
 		}
 	}
 	}
 
 
-	.g-buy-tips {
+	.subtotal {
+		border-top: 1rpx solid #F0F0F0;
+		height: 84rpx;
+		line-height: 84rpx;
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #FB5B5B;
+		text-align: right;
+	}
+}
+
+.g-buy-tips {
+	margin-top: 20rpx;
+
+	.tips-title {
+		font-weight: bold;
+		font-size: 32rpx;
+		color: #222222;
+	}
+
+	.tips-info-card {
+		background: #FFFFFF;
+		border-radius: 32rpx;
+		padding: 20rpx;
 		margin-top: 20rpx;
 		margin-top: 20rpx;
 
 
-		.tips-title {
+		.title {
 			font-weight: bold;
 			font-weight: bold;
-			font-size: 32rpx;
+			font-size: 28rpx;
 			color: #222222;
 			color: #222222;
 		}
 		}
 
 
-		.tips-info-card {
-			background: #FFFFFF;
-			border-radius: 32rpx;
-			padding: 20rpx;
+		.text {
+			font-size: 24rpx;
+			color: #AAAAAA;
 			margin-top: 20rpx;
 			margin-top: 20rpx;
-
-			.title {
-				font-weight: bold;
-				font-size: 28rpx;
-				color: #222222;
-			}
-
-			.text {
-				font-size: 24rpx;
-				color: #AAAAAA;
-				margin-top: 20rpx;
-				margin-bottom: 20rpx;
-			}
+			margin-bottom: 20rpx;
 		}
 		}
 	}
 	}
+}
+
+.r-insurance {
+	margin-top: 20rpx;
+	padding: 20rpx;
+	background: #FFFFFF;
+	border-radius: 32rpx;
+
+	.r-insurance-infobox {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		gap: 20rpx;
+		margin-bottom: 20rpx;
+
+		.r-image-box {
+			&>image {
+				width: 200rpx;
+				height: 200rpx;
+				border-radius: 32rpx;
+			}
+		}
 
 
-	.g-insurance-card {
-		background: #FFFFFF;
-		border-radius: 32rpx;
-		padding: 20rpx;
-		margin-top: 20rpx;
-
-		.g-insurance-info {
-			.insurance-type {
+		.r-insurance-title {
+			.r-insurance-name {
 				display: flex;
 				display: flex;
 				align-items: center;
 				align-items: center;
-				justify-content: space-between;
-
-				.type-name {
-					display: flex;
-					align-items: center;
-					gap: 10rpx;
+				gap: 16rpx;
 
 
-					.name {
-						font-weight: bold;
-						font-size: 28rpx;
-						color: #222222;
-					}
-
-					.tips {
-						width: 136rpx;
-						height: 36rpx;
-						background: #FDD143;
-						border-radius: 8rpx;
-						font-size: 22rpx;
-						color: #222222;
-						text-align: center;
-						line-height: 36rpx;
-					}
+				.r-name {
+					font-weight: 800;
+					font-size: 28rpx;
+					color: #222222;
 				}
 				}
 
 
-				.insurance-more {
-					display: flex;
-					align-items: center;
-					gap: 10rpx;
-
-					&>text {
-						margin-bottom: 4rpx;
-						font-size: 24rpx;
-						color: #AAAAAA;
-					}
+				.r-tags {
+					width: 136rpx;
+					height: 36rpx;
+					background: #FDD143;
+					border-radius: 8rpx;
+					font-size: 22rpx;
+					color: #222222;
+					text-align: center;
+					line-height: 36rpx;
 				}
 				}
 			}
 			}
 
 
-			.insurance-num {
-				margin-top: 16rpx;
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
+			.r-insurance-desc {
+				margin-top: 10rpx;
 				font-size: 24rpx;
 				font-size: 24rpx;
 				color: #AAAAAA;
 				color: #AAAAAA;
 			}
 			}
-		}
 
 
-		.insurance-total {
-			margin-top: 20rpx;
-			border-top: 1rpx solid #F0F0F0;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-			height: 88rpx;
-
-			.text {
-				font-size: 28rpx;
-				color: #222222;
+			.r-insurance-type {
+				margin-top: 10rpx;
+				font-size: 24rpx;
+				color: #AAAAAA;
 			}
 			}
 
 
-			.price {
-				font-weight: bold;
-				font-size: 28rpx;
-				color: #FB5B5B;
+			.r-insurance-price {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+
+				.r-price {
+					font-weight: bold;
+					font-size: 28rpx;
+					color: #FB5B5B;
+				}
+
+				.r-insurance-btn {
+					width: 200rpx;
+					height: 68rpx;
+					background: #C8FF0C;
+					border-radius: 60rpx;
+					font-weight: bold;
+					font-size: 28rpx;
+					color: #222222;
+					text-align: center;
+					line-height: 68rpx;
+				}
 			}
 			}
 		}
 		}
 	}
 	}
 
 
-	.g-userinfo-card {
-		margin-top: 20rpx;
-		padding: 20rpx;
-		background: #FFFFFF;
+	.r-insurance-adduser {
+		background: #F6F6F6;
 		border-radius: 32rpx;
 		border-radius: 32rpx;
+		padding: 20rpx;
+		margin-top: 20rpx;
 
 
-		.r-user {
+		.r-adduser-btn {
 			display: flex;
 			display: flex;
 			align-items: center;
 			align-items: center;
-			justify-content: space-between;
+			justify-content: flex-end;
+			gap: 20rpx;
 
 
-			.user-title {
+			.r-celar {
+				width: 192rpx;
+				height: 60rpx;
+				background: #FFFFFF;
+				border-radius: 60rpx;
+				border: 2rpx solid #FB5B5B;
+				font-weight: bold;
+				font-size: 28rpx;
+				color: #FB5B5B;
+				text-align: center;
+				line-height: 68rpx;
+			}
+
+			.r-edit {
+				width: 200rpx;
+				height: 68rpx;
+				background: #C8FF0C;
+				border-radius: 60rpx;
 				font-weight: bold;
 				font-weight: bold;
 				font-size: 28rpx;
 				font-size: 28rpx;
 				color: #222222;
 				color: #222222;
+				text-align: center;
+				line-height: 68rpx;
 			}
 			}
+		}
 
 
-			.invite {
+		.r-userinfo-list {
+			.r-userinfo-item {
 				display: flex;
 				display: flex;
 				align-items: center;
 				align-items: center;
-				gap: 8rpx;
-				font-size: 24rpx;
-				color: #AAAAAA;
-				position: relative;
-				.g-share-btn{
-					position: absolute;
-					width: 200rpx;
-					height: 60rpx;
-					opacity: 0;
+				justify-content: space-between;
+				margin-top: 20rpx;
+
+				.r-item-title {
+					font-size: 28rpx;
+					color: #AAAAAA;
+				}
+
+				.r-item-info {
+					font-size: 28rpx;
+					color: #222222;
 				}
 				}
 			}
 			}
 		}
 		}
+	}
+}
 
 
-		.user-tags {
-			margin-top: 20rpx;
-			width: 112rpx;
-			height: 40rpx;
-			background: #FDD143;
-			border-radius: 8rpx;
-			line-height: 40rpx;
+.g-userinfo-card {
+	margin-top: 20rpx;
+	padding: 20rpx;
+	background: #FFFFFF;
+	border-radius: 32rpx;
+
+	.r-user {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.user-title {
 			font-weight: bold;
 			font-weight: bold;
 			font-size: 28rpx;
 			font-size: 28rpx;
 			color: #222222;
 			color: #222222;
-			text-align: center;
-			font-size: 28rpx;
-			color: #222222;
 		}
 		}
 
 
-		.r-user-list {
-			margin-top: 20rpx;
+		.invite {
 			display: flex;
 			display: flex;
 			align-items: center;
 			align-items: center;
-			gap: 20rpx;
-			border-top: 1rpx solid #F0F0F0;
-			height: 140rpx;
-
-			.minus-user {
-				width: 30rpx;
-				height: 30rpx;
-				border-radius: 50%;
-				background: #FB5B5B;
-				text-align: center;
-				line-height: 20rpx;
-				font-weight: 600;
-				color: #fff;
-				font-size: 40rpx;
+			gap: 8rpx;
+			font-size: 24rpx;
+			color: #AAAAAA;
+			position: relative;
+
+			.g-share-btn {
+				position: absolute;
+				width: 200rpx;
+				height: 60rpx;
+				opacity: 0;
 			}
 			}
+		}
+	}
 
 
-			.r-list {
-				.name {
-					font-weight: bold;
-					font-size: 28rpx;
-					color: #222222;
-				}
+	.user-tags {
+		margin-top: 20rpx;
+		width: 112rpx;
+		height: 40rpx;
+		background: #FDD143;
+		border-radius: 8rpx;
+		line-height: 40rpx;
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #222222;
+		text-align: center;
+		font-size: 28rpx;
+		color: #222222;
+	}
 
 
-				.id-num {
-					font-size: 28rpx;
-					color: #222222;
-				}
-			}
+	.r-user-list {
+		margin-top: 20rpx;
+		display: flex;
+		align-items: center;
+		gap: 20rpx;
+		border-top: 1rpx solid #F0F0F0;
+		height: 140rpx;
+
+		.minus-user {
+			width: 30rpx;
+			height: 30rpx;
+			border-radius: 50%;
+			background: #FB5B5B;
+			text-align: center;
+			line-height: 20rpx;
+			font-weight: 600;
+			color: #fff;
+			font-size: 40rpx;
 		}
 		}
 
 
-		.g-adduser-btn {
-			display: flex;
-			height: 88rpx;
-			align-items: center;
-			justify-content: center;
-			gap: 20rpx;
-			border-top: 1rpx solid #F0F0F0;
-
-			.add-icon {
-				width: 30rpx;
-				height: 30rpx;
-				border-radius: 50%;
-				background: #FDD143;
-				font-size: 30rpx;
-				font-weight: 600;
-				color: #fff;
-				text-align: center;
-				line-height: 20rpx;
+		.r-list {
+			.name {
+				font-weight: bold;
+				font-size: 28rpx;
+				color: #222222;
 			}
 			}
 
 
-			.add-text {
+			.id-num {
 				font-size: 28rpx;
 				font-size: 28rpx;
-				color: #FDD143;
+				color: #222222;
 			}
 			}
 		}
 		}
 	}
 	}
 
 
-	.g-usetips-card {
+	.g-adduser-btn {
+		display: flex;
+		height: 88rpx;
+		align-items: center;
+		justify-content: center;
+		gap: 20rpx;
+		border-top: 1rpx solid #F0F0F0;
+
+		.add-icon {
+			width: 30rpx;
+			height: 30rpx;
+			border-radius: 50%;
+			background: #FDD143;
+			font-size: 30rpx;
+			font-weight: 600;
+			color: #fff;
+			text-align: center;
+			line-height: 20rpx;
+		}
+
+		.add-text {
+			font-size: 28rpx;
+			color: #FDD143;
+		}
+	}
+}
+
+.g-usetips-card {
+	margin-top: 20rpx;
+	padding: 20rpx;
+	background: #FFFFFF;
+	border-radius: 32rpx;
+
+	.use-title {
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #222222;
+	}
+
+	.use-text {
+		font-size: 24rpx;
+		color: #222222;
+
+		.item-text {
+			margin-top: 20rpx;
+		}
+	}
+
+	.use-tips-more {
 		margin-top: 20rpx;
 		margin-top: 20rpx;
-		padding: 20rpx;
-		background: #FFFFFF;
-		border-radius: 32rpx;
 
 
-		.use-title {
+		.more-text {
+			text-align: center;
+			font-size: 24rpx;
+			color: #CCCCCC;
+		}
+
+		.use-line {
+			margin: auto;
+			margin-top: 10rpx;
+			width: 38rpx;
+			height: 4rpx;
+			background: #CCCCCC;
+			border-radius: 2rpx;
+		}
+	}
+}
+
+.footer {
+	left: 0;
+
+	.footer-price {
+		display: flex;
+		align-items: center;
+
+		.total-price {
 			font-weight: bold;
 			font-weight: bold;
 			font-size: 28rpx;
 			font-size: 28rpx;
 			color: #222222;
 			color: #222222;
 		}
 		}
 
 
-		.use-text {
+		.price {
+			font-weight: 800;
+			font-size: 48rpx;
+			color: #FB5B5B;
+		}
+
+		.discount {
+			margin-left: 10rpx;
 			font-size: 24rpx;
 			font-size: 24rpx;
 			color: #222222;
 			color: #222222;
-
-			.item-text {
-				margin-top: 20rpx;
-			}
 		}
 		}
+	}
 
 
-		.use-tips-more {
-			margin-top: 20rpx;
-
-			.more-text {
-				text-align: center;
-				font-size: 24rpx;
-				color: #CCCCCC;
-			}
+	.footer-btn {
+		&>button {
+			width: 226rpx;
+			height: 100rpx;
+			background: #C8FF0C;
+			border-radius: 60rpx;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #222222;
+			line-height: 44rpx;
+		}
 
 
-			.use-line {
-				margin: auto;
-				margin-top: 10rpx;
-				width: 38rpx;
-				height: 4rpx;
-				background: #CCCCCC;
-				border-radius: 2rpx;
-			}
+		&>button::after {
+			border: none;
 		}
 		}
 	}
 	}
+}
+
+.r-center-popup {
+	width: 646rpx;
+	height: 1000rpx;
+	background: #F6F6F6;
+	border-radius: 32rpx;
+	padding: 20rpx;
+
+	.r-popup-title {
+		font-weight: bold;
+		font-size: 32rpx;
+		color: #222222;
+		text-align: center;
+	}
 
 
-	.footer {
-		left: 0;
-
-		.footer-price {
-			display: flex;
-			align-items: center;
+	.r-popup-content {
+		margin-top: 28rpx;
+		font-size: 28rpx;
+		color: #222222;
+		height: 600rpx;
+		overflow: auto;
+	}
 
 
-			.total-price {
-				font-weight: bold;
-				font-size: 28rpx;
-				color: #222222;
-			}
+	.r-popup-footer {
+		margin-top: 20rpx;
 
 
-			.price {
-				font-weight: 800;
-				font-size: 48rpx;
-				color: #FB5B5B;
-			}
+		.r-popup-needbtn {
+			margin: auto;
+			width: 598rpx;
+			height: 100rpx;
+			background: #C8FF0C;
+			border-radius: 60rpx;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #222222;
+			text-align: center;
+			line-height: 100rpx;
+		}
 
 
-			.discount {
-				margin-left: 10rpx;
-				font-size: 24rpx;
-				color: #222222;
-			}
+		.r-popup-refusebtn {
+			margin: auto;
+			margin-top: 24rpx;
+			width: 598rpx;
+			height: 100rpx;
+			background: #f0eeee;
+			border-radius: 60rpx;
+			font-weight: bold;
+			font-size: 32rpx;
+			color: #AAAAAA;
+			text-align: center;
+			line-height: 100rpx;
 		}
 		}
 
 
-		.footer-btn {
-			&>button {
-				width: 226rpx;
-				height: 100rpx;
-				background: #C8FF0C;
-				border-radius: 60rpx;
-				font-weight: bold;
-				font-size: 32rpx;
-				color: #222222;
-				line-height: 44rpx;
-			}
+		.r-popup-checkbox {
+			margin-top: 20rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			gap: 16rpx;
+			font-size: 24rpx;
+			color: #AAAAAA;
 
 
-			&>button::after {
-				border: none;
+			&>text {
+				margin-bottom: 8rpx;
 			}
 			}
 		}
 		}
 	}
 	}
+}
 </style>
 </style>

+ 337 - 0
src/pages/index/insure/index.vue

@@ -0,0 +1,337 @@
+<template>
+  <view class="content">
+    <view class="i-userinfo-card">
+      <view class="i-userinfo-card-header">
+        <image src="@/static/insure-icon1.png" mode="widthFix" />
+        <view class="i-text">用户信息</view>
+      </view>
+      <view class="r-user-list" v-for="item in insureuserData" :key="item.id">
+        <view class="minus-user" @click="deleteUser(item)">-</view>
+        <view class="r-list">
+          <view class="name">{{ item.fullName }}</view>
+          <view class="id-num">身份证 {{ idCardHide(item.identityCard) }}</view>
+        </view>
+      </view>
+      <view class="g-adduser-btn" @click="RouterUtils.to_page(`/pages/index/userList/index?type=${'insure'}`)">
+        <view class="add-icon">+</view>
+        <view class="add-text">添加被保人</view>
+      </view>
+    </view>
+    <view class="i-userinfo-card i-time-card">
+      <view class="i-userinfo-card-header">
+        <image src="@/static/insure-icon2.png" mode="widthFix" />
+        <view class="i-text">生效时间</view>
+      </view>
+      <view class="i-time-tips">
+        提示:投保成功后,整点生效。
+      </view>
+      <view class="i-time-list">
+        <view class="i-time-item">开始日期:
+          <picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
+            <view class="uni-input">
+              <text>{{ selectDate }}</text>&nbsp;
+              <zzx-icon name="ashRight" size="10" color="#FDD143"></zzx-icon>
+            </view>
+          </picker>
+        </view>
+        <view class="i-time-item">结束日期:
+          <text class="uni-input" v-if="slectObj">{{ DateUtils.addDays(selectDate, slectObj.insureDay) }}</text>
+          <text v-else>--</text>
+        </view>
+      </view>
+    </view>
+    <view class="i-userinfo-card i-time-card">
+      <view class="i-userinfo-card-header">
+        <image src="@/static/insure-icon3.png" mode="widthFix" />
+        <view class="i-text">生效时间</view>
+      </view>
+      <view class="i-day-list">
+        <view class="item-day" v-for="(item, idx) in priceDataList" :key="idx"
+          :class="{ selected: selectedDay === idx }" @click="selectDay(item, idx)">{{ item.insureDay }}天</view>
+      </view>
+    </view>
+    <view class="i-detail-card">
+      <view class="detail-item">
+        <view class="item-title">保费单价</view>
+        <view class="item-text">
+          <text v-if="slectObj">¥{{ slectObj.insurePrice }}/天·人</text>
+          <text v-else>--</text>
+        </view>
+      </view>
+      <view class="detail-item">
+        <view class="item-title">投保人数</view>
+        <view class="item-text">
+          <text v-if="insureuserData">{{ insureuserData.length }}人</text>
+          <text v-else>--</text>
+        </view>
+      </view>
+      <view class="detail-item">
+        <view class="item-title">生效天数</view>
+        <view class="item-text">
+          <text v-if="slectObj">{{ slectObj.day || '0' }}天</text>
+          <text v-else>--</text>
+        </view>
+      </view>
+    </view>
+    <view class="i-price-card" v-if="insureuserData && slectObj">
+      <view class="price-item">
+        <view class="price-title">保费总金额</view>
+        <view class="price-text">¥{{ (insureuserData.length * slectObj.insurePrice).toFixed(2) }}</view>
+      </view>
+    </view>
+    <view class="i-submit-btn" @click="submitInfo">提交信息</view>
+  </view>
+</template>
+
+<script lang="ts" setup>
+import { ref, onMounted } from 'vue';
+import { onLoad } from '@dcloudio/uni-app';
+import { RouterUtils, idCardHide, TipsUtils, DateUtils } from '@/utils/util';
+import ZzxIcon from '@/components/zzx-icon/zzx-icon.vue';
+const priceDataList = ref<any[]>([]);
+onLoad((option) => {
+  priceDataList.value = JSON.parse(option.priceDataList || '[]')
+  console.log(priceDataList.value);
+
+})
+onMounted(() => {
+  get_userData()
+})
+const insureuserData = ref()
+const get_userData = () => {
+  uni.$on('insureUserData', function (data) {
+    insureuserData.value = data
+  })
+}
+
+const deleteUser = async (e) => {
+	let res = await TipsUtils.tips_alert('确定删除该用户吗?', true)
+	if (res.confirm) {
+		insureuserData.value = insureuserData.value.filter(user => user.id !== e.id)
+	}
+}
+
+
+const selectedDay = ref<number | null>(null)
+const slectObj = ref()
+const selectDay = (e: object, idx: number) => {
+  slectObj.value = e
+  selectedDay.value = idx
+}
+
+const selectDate = ref('选择日期')
+const bindDateChange = (e: any) => {
+  selectDate.value = e.detail.value
+}
+
+const submitData = ref<any[]>([])
+const submitInfo = () => {
+  if (!insureuserData.value) return TipsUtils.tips_toast('请添加被保人信息')
+  if (selectDate.value == '选择日期') return TipsUtils.tips_toast('请选择日期')
+  if (!slectObj.value) return TipsUtils.tips_toast('请选择保险天数')
+  submitData.value.push({
+    userData: insureuserData.value,
+    slectObj: slectObj.value,
+    startDate: selectDate.value,
+    endDate: DateUtils.addDays(selectDate.value, slectObj.value.day),
+    totalPrice: (insureuserData.value.length * slectObj.value.price).toFixed(2)
+  })
+  uni.$emit('insureData', submitData.value)
+  RouterUtils.back()
+}
+</script>
+
+<style scoped lang="less">
+.i-userinfo-card {
+  background: #FFFFFF;
+  border-radius: 32rpx;
+  padding: 20rpx;
+  margin-top: 20rpx;
+
+  .i-userinfo-card-header {
+    display: flex;
+    align-items: center;
+    gap: 20rpx;
+
+    &>image {
+      width: 40rpx;
+      margin-bottom: 10rpx;
+    }
+
+    .i-text {
+      font-weight: bold;
+      font-size: 28rpx;
+      color: #222222;
+    }
+  }
+
+  .r-user-list {
+    margin-top: 20rpx;
+    display: flex;
+    align-items: center;
+    gap: 20rpx;
+    border-top: 1rpx solid #F0F0F0;
+    height: 140rpx;
+
+    .minus-user {
+      width: 30rpx;
+      height: 30rpx;
+      border-radius: 50%;
+      background: #FB5B5B;
+      text-align: center;
+      line-height: 20rpx;
+      font-weight: 600;
+      color: #fff;
+      font-size: 40rpx;
+    }
+
+    .r-list {
+      .name {
+        font-weight: bold;
+        font-size: 28rpx;
+        color: #222222;
+      }
+
+      .id-num {
+        font-size: 28rpx;
+        color: #222222;
+      }
+    }
+  }
+
+  .g-adduser-btn {
+    display: flex;
+    height: 88rpx;
+    align-items: center;
+    justify-content: center;
+    gap: 20rpx;
+    border-top: 1rpx solid #F0F0F0;
+
+    .add-icon {
+      width: 30rpx;
+      height: 30rpx;
+      border-radius: 50%;
+      background: #FDD143;
+      font-size: 30rpx;
+      font-weight: 600;
+      color: #fff;
+      text-align: center;
+      line-height: 20rpx;
+    }
+
+    .add-text {
+      font-size: 28rpx;
+      color: #FDD143;
+    }
+  }
+}
+
+.i-time-card {
+  .i-time-tips {
+    margin-top: 16rpx;
+    font-size: 24rpx;
+    color: #AAAAAA;
+  }
+
+  .i-time-list {
+    .i-time-item {
+      margin-top: 20rpx;
+      font-size: 28rpx;
+      color: #222222;
+      display: flex;
+      align-items: center;
+      gap: 10rpx;
+
+      .uni-input {
+        color: #FDD143;
+      }
+    }
+  }
+
+  .i-day-list {
+    display: flex;
+    align-items: center;
+    flex-wrap: wrap;
+    gap: 20rpx;
+
+    .item-day {
+      width: 144rpx;
+      height: 72rpx;
+      background: #F6F6F6;
+      border-radius: 16rpx;
+      font-size: 28rpx;
+      color: #AAAAAA;
+      text-align: center;
+      line-height: 72rpx;
+      // cursor: pointer;
+    }
+
+    .item-day.selected {
+      background: #C8FF0C;
+      color: #222222;
+    }
+  }
+}
+
+.i-detail-card {
+  background: #FFFFFF;
+  border-radius: 32rpx;
+  padding: 20rpx;
+  margin-top: 20rpx;
+
+  .detail-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 60rpx;
+
+    .item-title {
+      font-size: 28rpx;
+      color: #AAAAAA;
+    }
+
+    .item-text {
+      font-size: 28rpx;
+      color: #222222;
+    }
+  }
+}
+
+.i-price-card {
+  background: #FFFFFF;
+  border-radius: 32rpx;
+  padding: 20rpx;
+  margin-top: 20rpx;
+
+  .price-item {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+    .price-title {
+      font-size: 28rpx;
+      color: #AAAAAA;
+    }
+
+    .price-text {
+      font-weight: bold;
+      font-size: 28rpx;
+      color: #FB5B5B;
+    }
+  }
+}
+
+.i-submit-btn {
+  width: 686rpx;
+  height: 100rpx;
+  background: #C8FF0C;
+  border-radius: 60rpx;
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #222222;
+  text-align: center;
+  line-height: 100rpx;
+  margin: 0 auto;
+  margin-top: 40rpx;
+}
+</style>

+ 15 - 0
src/pages/index/signWebview/index.vue

@@ -0,0 +1,15 @@
+<template>
+<web-view :src="url" />
+</template>
+
+<script lang="ts" setup>
+import { onLoad } from '@dcloudio/uni-app';
+import { ref } from 'vue';
+const url =ref()
+onLoad((options) => {
+  url.value= options.url || '';
+})
+</script>
+
+<style scoped lang="less">
+</style>

文件差异内容过多而无法显示
+ 589 - 346
src/pages/index/toBeUsed/index.vue


+ 9 - 2
src/pages/index/userList/index.vue

@@ -25,6 +25,7 @@
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
+		<view style="height: 160rpx;"></view>
 		<view class="u-select-btn" @click="confirmSelect">
 		<view class="u-select-btn" @click="confirmSelect">
 			<button hover-class="hover-btn">确认选择:{{selTotal}}人</button>
 			<button hover-class="hover-btn">确认选择:{{selTotal}}人</button>
 		</view>
 		</view>
@@ -38,14 +39,16 @@
 	import { onLoad, onReachBottom } from '@dcloudio/uni-app';
 	import { onLoad, onReachBottom } from '@dcloudio/uni-app';
 	import { RouterUtils, idCardHide } from '@/utils/util';
 	import { RouterUtils, idCardHide } from '@/utils/util';
 	const cache = useCacheStore()
 	const cache = useCacheStore()
-	const select_insurance = ref(false);
 	const userList = ref()
 	const userList = ref()
 	const selTotal = ref(0)
 	const selTotal = ref(0)
 	const pageNo = ref(1)
 	const pageNo = ref(1)
 	const userinfo = computed(() => {
 	const userinfo = computed(() => {
 		return cache.get('USER_INFO')
 		return cache.get('USER_INFO')
 	})
 	})
+	const selectType=ref()
 	onLoad((options) => {
 	onLoad((options) => {
+		selectType.value=options.type
+		console.log('options', options);
 		if (options.name) {
 		if (options.name) {
 			uni.setNavigationBarTitle({
 			uni.setNavigationBarTitle({
 				title: options.name
 				title: options.name
@@ -90,7 +93,11 @@
 		RouterUtils.to_page('/pages/index/attestation/index');
 		RouterUtils.to_page('/pages/index/attestation/index');
 	}
 	}
 	const confirmSelect=()=>{
 	const confirmSelect=()=>{
+		if(selectType.value=='insure'){
+			uni.$emit('insureUserData',selArr.value)
+		}else{
 		uni.$emit('userData',selArr.value)
 		uni.$emit('userData',selArr.value)
+		}
 		uni.navigateBack()
 		uni.navigateBack()
 	}
 	}
 </script>
 </script>
@@ -174,7 +181,7 @@
 
 
 	.u-select-btn {
 	.u-select-btn {
 		position: fixed;
 		position: fixed;
-		bottom: 160rpx;
+		bottom: 60rpx;
 		width: 95%;
 		width: 95%;
 
 
 		&>button {
 		&>button {

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

@@ -42,7 +42,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<zs-loading v-else></zs-loading>
 		<zs-loading v-else></zs-loading>
-		<zs-empty v-if="dataList.length<1&&!searchLoading"></zs-empty>
+		<zs-empty v-if="dataList&&dataList.length<1&&!searchLoading"></zs-empty>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -50,7 +50,6 @@
 	import { ref, onMounted, computed } from 'vue'
 	import { ref, onMounted, computed } from 'vue'
 	import { onLoad,onReachBottom } from '@dcloudio/uni-app'
 	import { onLoad,onReachBottom } from '@dcloudio/uni-app'
 	import { http } from '@/utils/http'
 	import { http } from '@/utils/http'
-	import {RouterUtils} from '@/utils/util'
 	import { useCacheStore } from '@/stores/cache'
 	import { useCacheStore } from '@/stores/cache'
 	import zsEmpty from '@/components/zs-empty/index.vue'
 	import zsEmpty from '@/components/zs-empty/index.vue'
 	import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
 	import zsLoading from '@/components/zzx-loading/zzx-loading.vue'

二进制
src/static/insure-icon1.png


二进制
src/static/insure-icon2.png


二进制
src/static/insure-icon3.png


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

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

+ 31 - 15
src/utils/util/index.ts

@@ -7,7 +7,7 @@ export class TipsUtils {
 	*轻提示
 	*轻提示
 	* @param text - 提示内容
 	* @param text - 提示内容
 	*/
 	*/
-	static tips_toast(text : string) {
+	static tips_toast(text: string) {
 		uni.showToast({
 		uni.showToast({
 			icon: "none",
 			icon: "none",
 			title: text,
 			title: text,
@@ -19,7 +19,7 @@ export class TipsUtils {
 	 * @param text - 提示内容
 	 * @param text - 提示内容
 	 * @param showCancel - 是否显示取消按钮
 	 * @param showCancel - 是否显示取消按钮
 	 */
 	 */
-	static tips_alert(text : string, showCancel : boolean) {
+	static tips_alert(text: string, showCancel: boolean) {
 		return new Promise((resolve, reject) => {
 		return new Promise((resolve, reject) => {
 			uni.showModal({
 			uni.showModal({
 				title: '提示',
 				title: '提示',
@@ -47,7 +47,7 @@ export class ValidateUtils {
 	 * @param phone - 手机号字符串
 	 * @param phone - 手机号字符串
 	 * @returns 是否有效
 	 * @returns 是否有效
 	 */
 	 */
-	static validatePhone(phone : string) : boolean {
+	static validatePhone(phone: string): boolean {
 		return /^1[3-9]\d{9}$/.test(phone);
 		return /^1[3-9]\d{9}$/.test(phone);
 	}
 	}
 
 
@@ -56,7 +56,7 @@ export class ValidateUtils {
 	 * @param email - 邮箱字符串
 	 * @param email - 邮箱字符串
 	 * @returns 是否有效
 	 * @returns 是否有效
 	 */
 	 */
-	static validateEmail(email : string) : boolean {
+	static validateEmail(email: string): boolean {
 		return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
 		return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
 	}
 	}
 
 
@@ -65,7 +65,7 @@ export class ValidateUtils {
 	 * @param idCard - 身份证号字符串
 	 * @param idCard - 身份证号字符串
 	 * @returns 是否有效
 	 * @returns 是否有效
 	 */
 	 */
-	static validateIdCard(idCard : string) : boolean {
+	static validateIdCard(idCard: string): boolean {
 		return /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(idCard);
 		return /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(idCard);
 	}
 	}
 }
 }
@@ -85,7 +85,7 @@ export class RouterUtils {
 	* 跳转到指定页面
 	* 跳转到指定页面
 	* @param path - 页面路径
 	* @param path - 页面路径
 	*/
 	*/
-	static to_page(path : string) {
+	static to_page(path: string) {
 		if (!uni.getStorageSync('TOKEN')) return TipsUtils.tips_alert('请先登录~', false)
 		if (!uni.getStorageSync('TOKEN')) return TipsUtils.tips_alert('请先登录~', false)
 		uni.navigateTo({
 		uni.navigateTo({
 			url: path
 			url: path
@@ -103,10 +103,10 @@ export class DateUtils {
 	 * @param format - 格式字符串,默认:'YYYY-MM-DD HH:mm:ss'
 	 * @param format - 格式字符串,默认:'YYYY-MM-DD HH:mm:ss'
 	 * @returns 格式化后的日期字符串
 	 * @returns 格式化后的日期字符串
 	 */
 	 */
-	static formatDate = (date : Date | number, format : string = 'YYYY-MM-DD HH:mm:ss') : string => {
-		let d : Date = typeof date === 'number' ? new Date(date) : date;
-		const padZero = (num : number) : string => num.toString().padStart(2, '0');
-		const replacements : Record<string, string> = {
+	static formatDate = (date: Date | number, format: string = 'YYYY-MM-DD HH:mm:ss'): string => {
+		let d: Date = typeof date === 'number' ? new Date(date) : date;
+		const padZero = (num: number): string => num.toString().padStart(2, '0');
+		const replacements: Record<string, string> = {
 			'YYYY': d.getFullYear().toString(),
 			'YYYY': d.getFullYear().toString(),
 			'MM': padZero(d.getMonth() + 1),
 			'MM': padZero(d.getMonth() + 1),
 			'DD': padZero(d.getDate()),
 			'DD': padZero(d.getDate()),
@@ -123,19 +123,35 @@ export class DateUtils {
 	 * @param dateString - 日期字符串
 	 * @param dateString - 日期字符串
 	 * @returns MM-DD 格式的日期字符串
 	 * @returns MM-DD 格式的日期字符串
 	 */
 	 */
-	static formatDateToMMDD(dateString:any) {
+	static formatDateToMMDD(dateString: any) {
 		const date = new Date(dateString);
 		const date = new Date(dateString);
 		const month = (date.getMonth() + 1).toString().padStart(2, '0');
 		const month = (date.getMonth() + 1).toString().padStart(2, '0');
 		const day = date.getDate().toString().padStart(2, '0');
 		const day = date.getDate().toString().padStart(2, '0');
 		return `${month}-${day}`;
 		return `${month}-${day}`;
 	}
 	}
+
+	/**
+	 * 
+	 * @param dateString - 日期字符串
+	 * @param days - 要添加的天数
+	 * @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}`;
+}
+
 }
 }
 
 
 /**
 /**
  * 生成随机颜色
  * 生成随机颜色
  * @returns 十六进制颜色字符串
  * @returns 十六进制颜色字符串
  */
  */
-export const randomColor = () : string => {
+export const randomColor = (): string => {
 	return `#${Math.floor(Math.random() * 0xffffff).toString(16).padStart(6, '0')}`;
 	return `#${Math.floor(Math.random() * 0xffffff).toString(16).padStart(6, '0')}`;
 };
 };
 
 
@@ -143,7 +159,7 @@ export const randomColor = () : string => {
  * 预览图片
  * 预览图片
  * @param url - 图片地址
  * @param url - 图片地址
  */
  */
-export const _previewImage = (url : any) => {
+export const _previewImage = (url: any) => {
 	uni.previewImage({
 	uni.previewImage({
 		urls: url,
 		urls: url,
 		longPressActions: {
 		longPressActions: {
@@ -166,7 +182,7 @@ export const _previewImage = (url : any) => {
  * @param card - 身份证号字符串
  * @param card - 身份证号字符串
  * @returns 脱敏后的身份证号字符串
  * @returns 脱敏后的身份证号字符串
  */
  */
-export const idCardHide = (card : any) => {
+export const idCardHide = (card: any) => {
 	const reg = /^(.{2})(?:\d+)(.{2})$/;
 	const reg = /^(.{2})(?:\d+)(.{2})$/;
 	const maskedIdCard = card.replace(reg, '$1***********$2');
 	const maskedIdCard = card.replace(reg, '$1***********$2');
 	return maskedIdCard;
 	return maskedIdCard;
@@ -177,7 +193,7 @@ export const idCardHide = (card : any) => {
  * @param phone - 手机号字符串
  * @param phone - 手机号字符串
  * @returns 脱敏后的手机号字符串
  * @returns 脱敏后的手机号字符串
  */
  */
-export const phoneHide = (phone : any) => {
+export const phoneHide = (phone: any) => {
 	const reg = /^(\d{3})\d{4}(\d{4})$/;
 	const reg = /^(\d{3})\d{4}(\d{4})$/;
 	const maskedPhone = phone.replace(reg, '$1****$2');
 	const maskedPhone = phone.replace(reg, '$1****$2');
 	return maskedPhone;
 	return maskedPhone;

部分文件因为文件数量过多而无法显示