学习?学个屁 7 시간 전
부모
커밋
bdc6a92724

+ 1 - 1
src/components/sunui-upimg/sunui-upimg.vue

@@ -36,7 +36,7 @@ export default {
 		// 服务器url
 		url: {
 			type: String,
-			default: 'http://192.168.1.34:8080/jeecg-boot/sys/common/upload'
+			default: 'http://192.168.0.11:8080/jeecg-boot/sys/common/upload'
 		},
 		// 上传样式宽高
 		upload_img_wh: {

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

@@ -45,7 +45,7 @@
 			</view>
 		</view>
 		<view class="c-line"></view>
-		<view class="c-rules">限制:每人限购张</view>
+		<view class="c-rules">限制:每人限购{{courseDetailInfo?.limitNum}}张</view>
 	</view>
 	<view class="content">
 		<uv-sticky offset-top="70">

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

@@ -85,7 +85,7 @@
 					<view class="" v-if="charteredList">
 						开场前{{ charteredList.earlyRefundTime }}分钟随时退
 					</view>
-					<view class="v-left" @click="RouterUtils.to_page(`/pages/index/vr/index?vrImg=${detailInfo.vr}`)">
+					<view class="v-left" @click="checkedVr">
 						<zzx-icon name="venue-icon2" size="14"></zzx-icon>
 						<view style="margin-bottom: 10rpx;">VR实景</view>
 					</view>
@@ -273,7 +273,7 @@
 
 <script lang="ts" setup>
 import { ref, onMounted, getCurrentInstance, nextTick } from 'vue';
-import { RouterUtils, DateUtils, _previewImage } from '@/utils/util';
+import { RouterUtils, DateUtils, _previewImage, TipsUtils } from '@/utils/util';
 import { http } from '@/utils/http'
 import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
 import { onLoad, onPageScroll, onReachBottom } from '@dcloudio/uni-app';
@@ -326,6 +326,15 @@ const open_popup = async (e, i) => {
 	console.log(openPopup.value, 'openPopup');
 }
 
+// vr
+const checkedVr = () => {
+	if (detailInfo.value.vr) {
+		RouterUtils.to_page(`/pages/index/vr/index?vrImg=${detailInfo.value.vr}`)
+	} else {
+		TipsUtils.tips_toast('场馆暂未上传VR图片')
+	}
+}
+
 // 获取所有模块的位置信息
 const getSectionsTop = () => {
 	const ids = ['detail', 'notice', 'schedule', 'appraise'];

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

@@ -87,7 +87,8 @@
 						<view class="r-userinfo-item">
 							<view class="r-item-title">被保人</view>
 							<view class="r-item-info">{{ insureUser.userData.length }}人(<text
-									v-for="(user,index) in insureUser.userData" :key="user.id">{{ user.fullName }}{{ index < insureUser.userData.length - 1 ? ',' : '' }}</text>)
+									v-for="(user, index) in insureUser.userData" :key="user.id">{{ user.fullName }}{{
+										index < insureUser.userData.length - 1 ? ',' : '' }}</text>)
 							</view>
 						</view>
 						<view class="r-userinfo-item">
@@ -133,11 +134,12 @@
 				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">有效期</view>
 				<view class="use-text">购买后{{ previewCourseInfo?.indate }}天有效</view>
 				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">除外日期</view>
-				<view class="use-text">每<text v-for="item in previewCourseInfo?.downTime">{{ '周' + item + ''
+				<view class="use-text">每<text v-for="item in previewCourseInfo?.downTime">{{ '周' + item + ' '
 				}}</text>不可用
 				</view>
 				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">预约信息</view>
-				<view class="use-text">{{previewCourseInfo?.advanceTime==0?'免预约': '请你提前'+previewCourseInfo?.advanceTime+'小时预约' }}</view>
+				<view class="use-text">{{ previewCourseInfo?.advanceTime == 0 ? '免预约' :
+					'请你提前' + previewCourseInfo?.advanceTime + '小时预约' }}</view>
 				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">适用人数</view>
 				<view class="use-text">每张券最多{{ previewCourseInfo?.usableCount }}人使用</view>
 				<view class="use-title" style="font-size: 24rpx;margin-top: 14rpx;">温馨提示</view>
@@ -429,12 +431,15 @@ let orderFormData = ref({
 		familyMembersIds: '',
 	}
 })
+
+const orderCode = ref(null)
+const orderId = ref(null)
 const submitOrderImpl = () => {
 	orderFormData.value.amount = countTotal.value
 	if (!placeId.value) {
-		if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
-		if (userData.value.length < countTotal.value) return TipsUtils.tips_toast(`请至少选择${countTotal.value}人`)
-		if (userData.value.length > countTotal.value) return TipsUtils.tips_toast(`最多选择${countTotal.value}人`)
+		// if (!userData.value) return TipsUtils.tips_toast('请添加用户信息')
+		// if (userData.value.length < countTotal.value) return TipsUtils.tips_toast(`请至少选择${countTotal.value}人`)
+		// if (userData.value.length > countTotal.value) return TipsUtils.tips_toast(`最多选择${countTotal.value}人`)
 		orderFormData.value.orderType = 5
 		orderFormData.value.type = 2
 	} else {
@@ -453,18 +458,38 @@ const submitOrderImpl = () => {
 		success(res) {
 			TipsUtils.tips_toast('订阅成功')
 			http.post('/order/createOrder', data, { loading: true }).then((res) => {
-				getOrderQuery(res.result.orderCode, res.result.orderId)
+				orderCode.value = res.result.orderCode
+				orderId.value = res.result.orderId
+				paymentOrder(res.result.params)
 			})
 		},
 		fail(err) {
 			console.log(err, '订阅消息失败')
 			http.post('/order/createOrder', data, { loading: true }).then((res) => {
-				getOrderQuery(res.result.orderCode, res.result.orderId)
+				orderCode.value = res.result.orderCode
+				orderId.value = res.result.orderId
+				paymentOrder(res.result.params)
 			})
 		}
 	})
 }
 
+const paymentOrder = (payInfo: object) => {
+	console.log(payInfo, '支付参数');
+	uni.requestPayment({
+		provider: 'wxpay',
+		...payInfo,
+		success: function (res) {
+			console.log('支付成功', res);
+			getOrderQuery(orderCode.value, orderId.value)
+		},
+		fail: function (err) {
+			console.log('支付失败', err);
+			// TipsUtils.tips_toast('支付失败,请稍后重试');
+		}
+	});
+}
+
 const submitOrder = debounce(submitOrderImpl, 500)
 
 // code编码 "100001支付成功";"100002查询失败"; "100003查询中 "; "100004支付失败"

+ 25 - 7
src/pages/index/index.vue

@@ -142,10 +142,12 @@
 									<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>
 								</view>
-								<view class="tag" v-for="(tag, index) in item.list">{{ tag }}</view>
+								<view class="tags-container">
+									<view class="tag" v-for="(tag, index) in item.list" :key="index">{{ tag }}</view>
+								</view>
 							</view>
 							<view class="ascription textHidden">{{ item.orgName }}</view>
-							<view class="sign textHidden">{{ item.teachingPhilosophy }}</view>
+							<view class="sign textHidden">教育理念:{{ item.teachingPhilosophy||'暂无'}}</view>
 						</view>
 						<view class="type-icon">
 							<image src="/src/static/hot-icon2.png" mode=""></image>
@@ -165,7 +167,7 @@
 							<view style="color: #AB7BFF;">授课人数 {{ item.teachingCount }}</view>
 						</view>
 					</view>
-					<view class="i-skill">{{ item.excelMsg }}</view>
+					<view class="i-skill">擅长:{{ item.excelMsg }}</view>
 					<view class="i-course" v-for="(course, index) in item.courseList" :key="course.id">
 						<view class="course-name">
 							<view class="price">¥{{ (course.sellingPrice).toFixed(2) || '0.00' }}</view>
@@ -787,7 +789,7 @@ const searchInfoBtn = () => {
 			display: flex;
 			align-items: center;
 			justify-content: space-around;
-
+			gap: 20rpx;
 			.header {
 				width: 150rpx;
 				height: 150rpx;
@@ -842,9 +844,25 @@ const searchInfoBtn = () => {
 						}
 					}
 
-					.tag {
-						font-size: 24rpx;
-						color: #AAAAAA;
+					.tags-container {
+						display: flex;
+						width: 200rpx;
+						white-space: nowrap;
+						text-overflow: ellipsis;
+						overflow: auto;
+						.tag {
+							font-size: 24rpx;
+							color: #AAAAAA;
+							flex-shrink: 0;
+							margin-right: 10rpx; 
+
+							&:last-child {
+								margin-right: 0;
+							}
+						}
+					}
+					.tags-container::-webkit-scrollbar {
+						display: none;
 					}
 				}
 

+ 18 - 11
src/pages/index/instructorDetail/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<zzx-navbar :scrollable="true" :back="true" title="详情"></zzx-navbar>
 	<view class="detail-header" v-if="detailObj">
-		<image class="header-bg":src="detailObj.backgroundImg" mode="aspectFill"></image>
+		<image class="header-bg" :src="detailObj.backgroundImg" mode="aspectFill"></image>
 		<view class="back-icon" :style="{ paddingTop: (statusBarHeight + 10) + 'px' }" @click="RouterUtils.back()">
 			<zzx-icon name="back"></zzx-icon>
 		</view>
@@ -21,7 +21,7 @@
 						<view class="type">{{ detailObj.trainingProgramsName }}</view>
 					</view>
 					<view class="sign" @click="to_certifying">
-						<text class="textHidden">{{ detailObj.headDisplay }}</text>
+						<text class="textHidden" style="margin-bottom: 6rpx;">{{ detailObj.headDisplay }}</text>
 						<zzx-icon name="ashRight" size="12"></zzx-icon>
 					</view>
 				</view>
@@ -30,12 +30,12 @@
 				{{ detailObj.teachingPhilosophy }}
 			</view>
 			<view class="i-skill">
-				{{ detailObj.excelMsg }}
+				擅长:{{ detailObj.excelMsg }}
 			</view>
 			<view class="i-data-card">
 				<view class="item-data">
 					<view class="text">好评率</view>
-					<view class="num">{{ appraiseList.applauseRate||'--' }}%</view>
+					<view class="num">{{ appraiseList.applauseRate || '--' }}%</view>
 				</view>
 				<view class="item-data">
 					<view class="text">订单数</view>
@@ -64,7 +64,8 @@
 						<view class="address">上课地点:{{ item.address }} | {{ item.km }}km</view>
 						<view class="list-price">
 							<view class="left-price" v-if="item.sellingPrice">¥{{ item.sellingPrice.toFixed(2) }}</view>
-							<view class="right-price" v-if="item.originalPrice">¥{{ item.originalPrice.toFixed(2) }}</view>
+							<view class="right-price" v-if="item.originalPrice">¥{{ item.originalPrice.toFixed(2) }}
+							</view>
 						</view>
 						<view class="sale-data">已售{{ item.saleNum }} {{ item.goodRate }}%好评</view>
 						<view class="course-num">
@@ -121,7 +122,7 @@ import { ref, onMounted } from 'vue';
 import { onLoad, onReachBottom } from '@dcloudio/uni-app';
 import { http } from '@/utils/http'
 import { useCacheStore } from '@/stores/cache'
-import { RouterUtils, _previewImage,DateUtils } from '@/utils/util';
+import { RouterUtils, _previewImage, DateUtils } from '@/utils/util';
 import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
 const cache = useCacheStore()
 const statusBarHeight = ref(0);
@@ -166,10 +167,10 @@ const appraiseFormData = ref({
 const appraiseList = ref([])
 const getFindByOrderPage = () => {
 	http.get('/my/evaluate/findByOrderPage', { data: appraiseFormData.value, loading: true }).then((res) => {
-		if(appraiseFormData.value.pageNo == 1){
-		appraiseList.value = res.result
-		}else{
-			appraiseList.value = [...appraiseList.value,...res.result]
+		if (appraiseFormData.value.pageNo == 1) {
+			appraiseList.value = res.result
+		} else {
+			appraiseList.value = [...appraiseList.value, ...res.result]
 		}
 	})
 }
@@ -234,8 +235,14 @@ const getFindByOrderPage = () => {
 				}
 
 				.type {
+					width: 300rpx;
+					overflow: auto;
 					font-size: 28rpx;
 					color: #AAAAAA;
+					white-space: nowrap;
+				}
+				.type::-webkit-scrollbar {
+					display: none;
 				}
 			}
 
@@ -392,7 +399,7 @@ const getFindByOrderPage = () => {
 					display: flex;
 					align-items: center;
 					justify-content: space-between;
-			}
+				}
 
 				.course-num {
 					display: flex;

+ 7 - 5
src/pages/index/toBeUsed/index.vue

@@ -82,9 +82,11 @@
 						<text>{{ orderDetailInfo?.gameScheduleNum }}场</text>
 						<zzx-icon name="ashRight" size="10"></zzx-icon>
 					</view>
-					<view class="shoping-refund" v-if="orderDetailInfo?.refundType">{{ orderDetailInfo?.refundType == 2
-						?
-						'不支持退款' : '随时退·过期退' }}</view>
+					<view class="shoping-refund">
+						<!-- 退款类型;0可退/到期自动退 1限时退 2不可退-->
+						  <text v-if="orderDetailInfo?.refundType == 0|| orderDetailInfo?.refundType == 1">随时退·过期退</text>
+						  <text v-if="orderDetailInfo?.refundType == 2">不支持退款</text>
+					</view>
 					<view class="shoping-price" @click="pricePopup.open()">
 						<view class="price">¥{{ orderDetailInfo?.totalPrice.toFixed(2) }}</view>
 						<view class="text">
@@ -186,14 +188,14 @@
 		<view class="t-address-card">
 			<view class="address">
 				<zzx-icon name="location"></zzx-icon>
-				<view class="">{{ orderDetailInfo?.courseSiteAddress || orderDetailInfo?.schoolAddress }}</view>
+				<view class="">{{ orderDetailInfo?.courseSiteAddress || orderDetailInfo?.schoolAddress||orderDetailInfo?.gameAddress }}</view>
 			</view>
 			<view class="nav-info">
 				<view class="nav" @click="open_map">
 					<zzx-icon name="navigation" size="14"></zzx-icon>
 					<view class="nav-text">导航</view>
 				</view>
-				<view class="phone" @click="open_phone">
+				<view class="phone" @click="open_phone" v-if="orderDetailInfo?.phone">
 					<zzx-icon name="phone" size="14"></zzx-icon>
 					<view class="">电话</view>
 				</view>

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

@@ -23,7 +23,7 @@
 						<text v-if="item.priceType==0&&item.originalPrice"
 							style="font-size: 22rpx;color: #AAAAAA;text-decoration: line-through;">¥{{ item.originalPrice.toFixed(2) }}</text>
 					</view>
-					<view class="c-ratio">已售{{item.saleNum||'0'}} {{item.goodRate}}%好评</view>
+					<view class="c-ratio">已售{{item.saleNum||'0'}} {{item.goodRate||'0'}}%好评</view>
 					<view class="c-class">{{item.coursesNum}}课时 {{item.startTime}}-{{item.endTime}}</view>
 					<view class="c-icon">
 						<image v-if="item.priceType==1" src="/src/static/snapped.png" mode="widthFix"></image>

+ 1 - 1
src/utils/common/upload.ts

@@ -4,7 +4,7 @@ import { useCacheStore } from '@/stores/cache'
 export function uploadImage(tempFilePath: string, onSuccess?: (url: string) => void, onFail?: (err: any) => void) {
     const cache = useCacheStore()
     uni.uploadFile({
-        url: 'http://192.168.1.34:8080/jeecg-boot/sys/common/upload',
+        url: 'http://192.168.0.11:8080/jeecg-boot/sys/common/upload',
         filePath: tempFilePath,
         name: 'file',
         header: {

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

@@ -179,7 +179,7 @@ export class HttpClient {
 
 // 创建实例
 export const http = new HttpClient({
-  // baseURL: 'http://192.168.1.34:8080/jeecg-boot/app',
+  // baseURL: 'http://192.168.0.217:8080/jeecg-boot/app',
   // baseURL: 'http://192.168.1.166:8080/jeecg-boot/app',
   baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
   headers: {