Browse Source

人脸核身校验逻辑处理

学习?学个屁 1 month ago
parent
commit
1c79afe112

+ 7 - 0
src/pages.json

@@ -329,6 +329,13 @@
 			"style": {
 				"navigationBarTitleText": "赛事安排"
 			}
+		},
+		{
+			"path": "pages/index/payError/index",
+			"style": {
+				"navigationBarTitleText": "支付失败",
+				"navigationStyle": "custom"
+			}
 		}
 	],
 	"tabBar": {

+ 20 - 18
src/pages/index/attestation/index.vue

@@ -150,24 +150,26 @@ const getFaceRecognition = () => {
 				console.log('收到核身完成的res:', res);
 				console.log('核身的token是:', token);
 				console.log('是否完成核身:', verifyDone);
-				if (verifyDone) {
-					formData.value.realNameStatus = 1;
-					verifyToken.value = token;
-					http.post('/my/familyMembers/addFamilyMembers', { ...formData.value }, { loading: true }).then((res) => {
-						TipsUtils.tips_toast(res.message)
-						formData.value.fullName = ''
-						formData.value.identityCard = ''
-						formData.value.phone = ''
-						formData.value.idCardFrontImg = ''
-						formData.value.idCardBackImg = ''
-						formData.value.realNameImg = ''
-						frontImg.value = ''
-						flipSideImg.value = ''
-						uni.navigateBack()
-					})
-				} else {
-					TipsUtils.tips_toast('人脸核身失败')
-				}
+				http.get('/user/getEidResult', { data: { eidToken: verifyToken.value } }).then((res) => {
+					if (res.result.ErrCode == '0') {
+						formData.value.realNameStatus = 1;
+						verifyToken.value = token;
+						http.post('/my/familyMembers/addFamilyMembers', { ...formData.value }, { loading: true }).then((res) => {
+							TipsUtils.tips_toast(res.message)
+							formData.value.fullName = ''
+							formData.value.identityCard = ''
+							formData.value.phone = ''
+							formData.value.idCardFrontImg = ''
+							formData.value.idCardBackImg = ''
+							formData.value.realNameImg = ''
+							frontImg.value = ''
+							flipSideImg.value = ''
+							uni.navigateBack()
+						})
+					} else {
+						TipsUtils.tips_toast(res.result.LiveMsg||'核身失败,请重新核身')
+					}
+				})
 			},
 		});
 	})

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

@@ -62,7 +62,7 @@
 				<view class="cell-title">{{ eventsInfoObj.name }}</view>
 				<view class="cell-time">
 					<zzx-icon name="e-icon1" size="16"></zzx-icon>
-					<view style="margin-bottom:10rpx;">比赛时间:{{ eventsInfoObj.startTime }}———{{ eventsInfoObj.endTime }}
+					<view style="margin-bottom:10rpx;">比赛时间:{{ eventsInfoObj.startTime }}{{ eventsInfoObj.endTime }}
 					</view>
 				</view>
 				<view class="cell-item">

+ 2 - 0
src/pages/index/eventsRegister/index.vue

@@ -495,6 +495,8 @@ const paymentOrder = (payInfo: object) => {
 	// 		if (err.errMsg == 'requestPayment:fail cancel') {
 	// 			RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${orderId.value}&orderType=${orderFormData.value.orderType}`)
 	// 			return
+	// 		}else{
+	// 			RouterUtils.to_page(`/pages/index/payError/index?errMsg=${err.errMsg}`)
 	// 		}
 	// 		// TipsUtils.tips_toast('支付失败,请稍后重试');
 	// 	}

+ 2 - 0
src/pages/index/gymDetail/components/popup.vue

@@ -309,6 +309,8 @@ const paymentOrder = (payInfo: object) => {
 	// 		if (err.errMsg == 'requestPayment:fail cancel') {
 	// 			RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${orderId.value}&orderType=${orderFormData.value.orderType}`)
 	// 			return
+	// 		}else{
+	// 			RouterUtils.to_page(`/pages/index/payError/index?errMsg=${err.errMsg}`)
 	// 		}
 	// 		// TipsUtils.tips_toast('支付失败,请稍后重试');
 	// 	}

+ 2 - 0
src/pages/index/gymPay/index.vue

@@ -511,6 +511,8 @@ const paymentOrder = (payInfo: object) => {
 	// 		if (err.errMsg == 'requestPayment:fail cancel') {
 	// 			RouterUtils.to_page(`/pages/index/toBeUsed/index?orderId=${orderId.value}&orderType=${orderFormData.value.orderType}`)
 	// 			return
+	// 		}else{
+	// 			RouterUtils.to_page(`/pages/index/payError/index?errMsg=${err.errMsg}`)
 	// 		}
 	// 		// TipsUtils.tips_toast('支付失败,请稍后重试');
 	// 	}

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

@@ -119,7 +119,7 @@
 					</view>
 					<image src="/src/static/hot-icon1.png" mode="widthFix"></image>
 				</view>
-				<view class="i-more" @click="gotoPage('/pages/index/allInstructor/index')">
+				<view class="i-more" @click="RouterUtils.to_page('/pages/index/allInstructor/index')">
 					<view class="">全部教练</view>
 					<zzx-icon name="ashRight" size="10"></zzx-icon>
 				</view>
@@ -128,7 +128,7 @@
 				<view class="i-card-list"
 					:style="{ background: index % 2 === 0 ? 'linear-gradient(179deg, #FFD5FB 0%, #FFFFFF 40%)' : 'linear-gradient( 179deg, #F2FFBE 0%, #FFFFFF 40%)' }"
 					v-for="(item, index) in instructorList" :key="item.id">
-					<view class="i-info" @click="gotoPage(`/pages/index/instructorDetail/index?id=${item.id}`)">
+					<view class="i-info" @click="RouterUtils.to_page(`/pages/index/instructorDetail/index?id=${item.id}`)">
 						<view class="header" :style="{ background: index % 2 === 0 ? '#FFB8F9' : '#C8FF0C' }">
 							<image class="head-img" :src="item.avatar" mode=""></image>
 							<image class="head-tag" src="/src/static/badge.png" mode=""></image>
@@ -177,7 +177,7 @@
 						</view>
 						<view class="num">已售{{ course.count || '0' }}</view>
 					</view>
-					<view class="more" @click="gotoPage(`/pages/index/instructorDetail/index?id=${item.id}`)">更多课程
+					<view class="more" @click="RouterUtils.to_page(`/pages/index/instructorDetail/index?id=${item.id}`)">更多课程
 					</view>
 				</view>
 			</view>
@@ -197,7 +197,7 @@ import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
 import { ref, onMounted, computed} from 'vue'
 import { onLoad, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app';
 import zsEmpty from '@/components/zs-empty/index.vue'
-import { TipsUtils } from '@/utils/util';
+import { TipsUtils,RouterUtils } from '@/utils/util';
 import { http } from '@/utils/http'
 import { useCacheStore } from '@/stores/cache'
 const cache = useCacheStore()
@@ -246,7 +246,7 @@ const swierChange = (e) => {
 }
 
 const gotoPage = (path: string) => {
-	if (!token.value) return TipsUtils.tips_alert('请先登录~', false)
+	// if (!token.value) return TipsUtils.tips_alert('请先登录~', false)
 	uni.navigateTo({
 		url: path
 	})

+ 71 - 0
src/pages/index/payError/index.vue

@@ -0,0 +1,71 @@
+<template>
+    <zzx-navbar :scrollable="false" :back="true" bgColor="linear-gradient( 180deg, #E8FF9B 0%, #F6F6F6 100%)"
+        title="支付失败"></zzx-navbar>
+    <view style="height:170rpx;"></view>
+    <view class="content">
+        <view class="error-box">
+            <view class="error-img">
+                <image :src="errorImg" mode="widthFix" />
+            </view>
+            <view class="error-title">支付失败</view>
+            <view class="error-content">失败原因:{{ errMsg }}</view>
+            <view class="error-btn" @click="closePage">关闭页面</view>
+        </view>
+    </view>
+</template>
+
+<script setup>
+import { ref } from 'vue';
+import { onLoad } from '@dcloudio/uni-app';
+const errorImg = ref('https://national-motion.oss-cn-beijing.aliyuncs.com/opt/upFiles/a0nxN6SmYZ6m0d9bf48c2accb97a9ad2e7ccfcd466d2_1758593768812.png');
+import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
+const errMsg = ref('');
+onLoad((options)=>{
+console.log(options);
+errMsg.value = options.errMsg || '支付失败';
+})
+
+const closePage=()=>{
+    uni.switchTab({
+        url: '/pages/index/index'
+    })
+}
+</script>
+
+<style lang="less" scoped>
+.error-box {
+    text-align: center;
+
+    .error-img {
+        &>image {
+            width: 148rpx;
+        }
+    }
+
+    .error-title {
+        margin-top: 32rpx;
+        font-weight: bold;
+        font-size: 32rpx;
+        color: #222222;
+    }
+
+    .error-content {
+        margin-top: 20rpx;
+        font-size: 24rpx;
+        color: #AAAAAA;
+    }
+
+    .error-btn {
+        margin-top: 60rpx;
+        width: 710rpx;
+        height: 100rpx;
+        background: #C8FF0C;
+        border-radius: 50rpx;
+        font-weight: bold;
+        font-size: 32rpx;
+        color: #222222;
+        line-height: 100rpx;
+        text-align: center;
+    }
+}
+</style>

+ 198 - 192
src/pages/index/venue/index.vue

@@ -1,14 +1,15 @@
 <template>
 	<view class="venue-navbar">
-		<view class="navbar-list" v-for="(item,index) in navbarList" :key="index" @click="select_nav(item,index)">
-			<view class="list-text">{{item.text}}</view>
-			<image :src="sel_index==index?'/static/notsel-icon.png':'/static/select-icon.png'" mode=""></image>
+		<view class="navbar-list" v-for="(item, index) in navbarList" :key="index" @click="select_nav(item, index)">
+			<view class="list-text">{{ item.text }}</view>
+			<image :src="sel_index == index ? '/static/notsel-icon.png' : '/static/select-icon.png'" mode=""></image>
 		</view>
 	</view>
 	<view style="height: 70rpx;"></view>
 	<view class="content">
 		<view class="select-btn">
-			<view :class="sel_btn===index?'distance':'score'" v-for="(item,index) in selectList" :key="index" @click="select_btn(item,index)">{{item.text}}</view>
+			<view :class="sel_btn === index ? 'distance' : 'score'" v-for="(item, index) in selectList" :key="index"
+				@click="select_btn(item, index)">{{ item.text }}</view>
 		</view>
 		<view v-if="!searchLoading">
 			<view class="venue-card" v-for="item in dataList" @click="gotoDetail(item)" :key="item.id">
@@ -16,171 +17,173 @@
 					<image :src="item.cover.split(',')[0]" mode=""></image>
 					<view class="e-badge">
 						<image src="/src/static/events-icon1.png" mode="widthFix"></image>
-						<view class="text">{{item.ticketWhether?'今日有票':'暂无余票'}}</view>
+						<view class="text">{{ item.ticketWhether ? '今日有票' : '暂无余票' }}</view>
 					</view>
 				</view>
 				<view class="venues-info">
-					<view class="venues-name">{{item.name}}</view>
+					<view class="venues-name">{{ item.name }}</view>
 					<view class="venues-comments">
 						<view class="star">
 							<zzx-icon name="star" size="12"></zzx-icon>
-							<text style="margin-bottom: 4rpx;">{{item.goodRate.toFixed(1)||0}}</text>
+							<text style="margin-bottom: 4rpx;">{{ item.goodRate.toFixed(1) || 0 }}</text>
 						</view>
 						<view class="comment">
-							{{item.comments||0}}条评论
+							{{ item.comments || 0 }}条评论
 						</view>
 					</view>
 					<view class="venues-address">
-						{{item.address||'暂无地址'}} | {{item.km.toFixed(2)}}km
+						{{ item.address || '暂无地址' }} | {{ item.km.toFixed(2) }}km
 					</view>
 					<view class="venues-type">
-						<view class="type-tags" v-for="(tags,index) in item.category" :key="index">
-							{{tags}}
+						<view class="type-tags" v-for="(tags, index) in item.category" :key="index">
+							{{ tags }}
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
 		<zs-loading v-else></zs-loading>
-		<zs-empty v-if="dataList&&dataList.length<1&&!searchLoading"></zs-empty>
+		<zs-empty v-if="dataList && dataList.length < 1 && !searchLoading"></zs-empty>
 	</view>
 </template>
 
 <script lang="ts" setup>
-	import { ref, onMounted, computed } from 'vue'
-	import { onLoad,onReachBottom } from '@dcloudio/uni-app'
-	import { http } from '@/utils/http'
-	import { useCacheStore } from '@/stores/cache'
-	import zsEmpty from '@/components/zs-empty/index.vue'
-	import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
-	const cache = useCacheStore()
-	const navbarList = ref([{
-		text: '全部',
-		tagsVal:'0-1',
-		value:0
-	}, {
-		text: '学校',
-		tagsVal:'1-1',
-		value:1
-	}, {
-		text: '体育馆',
-		tagsVal:'2-1',
-		value:2
-	}]);
-	const selectList=ref()
-	const sel_index = ref(0);
-	const sel_btn=ref(0);
-	onMounted(()=>{
-		get_dictType(0)
-		get_placeList('0-1')
-	})
-	onReachBottom(()=>{
-		current.value++
-		get_placeList(tagsVal.value||'0-1')
-	})
-	const select_btn=(e,i)=>{
-		searchLoading.value=true
-		sel_btn.value=i
-		get_placeList(e.value)
-	}
-	const select_nav = (e,i) => {
-		searchLoading.value=true
-		sel_index.value = i
-		sel_btn.value=0
-		tagsVal.value=e.tagsVal
-		current.value=1
-		get_dictType(e.value || 0)
-		get_placeList(e.tagsVal)
-	}
-	
-	const gotoDetail=(item)=>{
-		if(item.type==0){
-			uni.navigateTo({
-				url:`/pages/index/detail/index?id=${item.id}`
-			})
-		}else{
-			uni.navigateTo({
-				url:`/pages/index/gymDetail/index?id=${item.id}`
-			})
-		}
-	}
-	
-	// 查询分类
-	const get_dictType = (type : number) => {
-		http.get('/common/getDictItems', { data: { dictCode: 'venue_type' } }).then(res => {
-			let arr = []
-			res.result.forEach((item) => {
-				let value = parseInt(item.value.split('-')[0])
-				item.text=item.text.split('-')[1]
-				if (type == value){
-					return arr.push(item)
-				}
-			})
-			selectList.value=arr
-		})
+import { ref, onMounted, computed } from 'vue'
+import { onLoad, onReachBottom } from '@dcloudio/uni-app'
+import { http } from '@/utils/http'
+import { useCacheStore } from '@/stores/cache'
+import zsEmpty from '@/components/zs-empty/index.vue'
+import zsLoading from '@/components/zzx-loading/zzx-loading.vue'
+import { TipsUtils, RouterUtils } from '@/utils/util';
+const cache = useCacheStore()
+const token = computed(() => cache.token)
+const navbarList = ref([{
+	text: '全部',
+	tagsVal: '0-1',
+	value: 0
+}, {
+	text: '学校',
+	tagsVal: '1-1',
+	value: 1
+}, {
+	text: '体育馆',
+	tagsVal: '2-1',
+	value: 2
+}]);
+const selectList = ref()
+const sel_index = ref(0);
+const sel_btn = ref(0);
+onMounted(() => {
+	get_dictType(0)
+	get_placeList('0-1')
+})
+onReachBottom(() => {
+	current.value++
+	get_placeList(tagsVal.value || '0-1')
+})
+const select_btn = (e, i) => {
+	searchLoading.value = true
+	sel_btn.value = i
+	get_placeList(e.value)
+}
+const select_nav = (e, i) => {
+	searchLoading.value = true
+	sel_index.value = i
+	sel_btn.value = 0
+	tagsVal.value = e.tagsVal
+	current.value = 1
+	get_dictType(e.value || 0)
+	get_placeList(e.tagsVal)
+}
+
+const gotoDetail = async (item) => {
+	if (item.type == 0) {
+		RouterUtils.to_page(`/pages/index/detail/index?id=${item.id}`)
+	} else {
+		RouterUtils.to_page(`/pages/index/gymDetail/index?id=${item.id}`)
 	}
-	const dataList=ref()
-	const current=ref(1)
-	const searchLoading=ref(true)
-	const tagsVal=ref()
-	const get_placeList=(tagsVal)=>{
-		http.post('/home/getPlaceList',{size: 10, current:current.value, venueType:String(tagsVal), longitude: cache.get('LON')||0, latitude: cache.get('LAT')||0}).then((res)=>{
-			searchLoading.value=false
-			if(current.value==1){
-				dataList.value=res.result.records
-			}else{
-				dataList.value=[...dataList.value,...res.result.records]
+}
+
+// 查询分类
+const get_dictType = (type: number) => {
+	http.get('/common/getDictItems', { data: { dictCode: 'venue_type' } }).then(res => {
+		let arr = []
+		res.result.forEach((item) => {
+			let value = parseInt(item.value.split('-')[0])
+			item.text = item.text.split('-')[1]
+			if (type == value) {
+				return arr.push(item)
 			}
 		})
-	}
+		selectList.value = arr
+	})
+}
+const dataList = ref()
+const current = ref(1)
+const searchLoading = ref(true)
+const tagsVal = ref()
+const get_placeList = (tagsVal) => {
+	http.post('/home/getPlaceList', { size: 10, current: current.value, venueType: String(tagsVal), longitude: cache.get('LON') || 0, latitude: cache.get('LAT') || 0 }).then((res) => {
+		searchLoading.value = false
+		if (current.value == 1) {
+			dataList.value = res.result.records
+		} else {
+			dataList.value = [...dataList.value, ...res.result.records]
+		}
+	})
+}
 </script>
 
 <style lang="less" scoped>
-	.venue-navbar {
-		box-sizing: border-box;
-		padding: 0rpx 20rpx;
-		padding-bottom: 30rpx;
-		background-color: #FFFFFF;
+.venue-navbar {
+	box-sizing: border-box;
+	padding: 0rpx 20rpx;
+	padding-bottom: 30rpx;
+	background-color: #FFFFFF;
+	display: flex;
+	align-items: center;
+	justify-content: space-around;
+	position: fixed;
+	width: 100%;
+	top: 0;
+	z-index: 1000;
+
+	.navbar-list {
 		display: flex;
 		align-items: center;
-		justify-content: space-around;
-		position: fixed;
-		width: 100%;
-		top: 0;
-		z-index: 1000;
-		.navbar-list {
-			display: flex;
-			align-items: center;
-			gap: 10rpx;
+		gap: 10rpx;
 
-			.list-text {
-				font-weight: bold;
-				font-size: 28rpx;
-				color: #222222;
-			}
+		.list-text {
+			font-weight: bold;
+			font-size: 28rpx;
+			color: #222222;
+		}
 
-			&>image {
-				width: 30rpx;
-				height: 30rpx;
-			}
+		&>image {
+			width: 30rpx;
+			height: 30rpx;
 		}
 	}
-.select-btn{
+}
+
+.select-btn {
 	display: flex;
 	align-items: center;
 	gap: 20rpx;
 	margin-top: 20rpx;
-	.distance{
+
+	.distance {
 		width: 92rpx;
 		height: 48rpx;
 		background: #222222;
 		border-radius: 8rpx;
 		font-size: 28rpx;
 		color: #C8FF0C;
-		line-height:48rpx;
+		line-height: 48rpx;
 		text-align: center;
 	}
-	.score{
+
+	.score {
 		width: 92rpx;
 		height: 48rpx;
 		background: #FFFFFF;
@@ -188,96 +191,99 @@
 		font-size: 28rpx;
 		color: #AAAAAA;
 		height: 48rpx;
-		line-height:48rpx;
+		line-height: 48rpx;
 		text-align: center;
 	}
 }
-	.venue-card {
-		margin-top: 20rpx;
-		background: #FFFFFF;
-		border-radius: 32rpx;
-		padding: 20rpx;
-		display: flex;
-		align-items: center;
-		gap: 20rpx;
 
-		.venues-image {
-			position: relative;
+.venue-card {
+	margin-top: 20rpx;
+	background: #FFFFFF;
+	border-radius: 32rpx;
+	padding: 20rpx;
+	display: flex;
+	align-items: center;
+	gap: 20rpx;
+
+	.venues-image {
+		position: relative;
+
+		&>image {
+			width: 200rpx;
+			height: 200rpx;
+			border-radius: 32rpx;
+		}
+
+		.e-badge {
+			position: absolute;
+			top: -4rpx;
+			left: -20rpx;
 
 			&>image {
-				width: 200rpx;
-				height: 200rpx;
-				border-radius: 32rpx;
+				width: 114rpx;
 			}
 
-				.e-badge {
-					position: absolute;
-					top: -4rpx;
-					left: -20rpx;
-					&>image {
-						width: 114rpx;
-					}
+			.text {
+				position: absolute;
+				top: 14rpx;
+				left: 20rpx;
+				font-size: 20rpx;
+				color: #222222;
+			}
+		}
+	}
 
-					.text {
-						position: absolute;
-						top: 14rpx;
-						left: 20rpx;
-						font-size: 20rpx;
-						color: #222222;
-					}
-				}
+	.venues-info {
+		.venues-name {
+			font-weight: 800;
+			font-size: 32rpx;
+			color: #222222;
 		}
 
-		.venues-info {
-			.venues-name {
-				font-weight: 800;
-				font-size: 32rpx;
-				color: #222222;
-			}
+		.venues-comments {
+			margin-top: 16rpx;
+			display: flex;
+			align-items: center;
+			gap: 10px;
 
-			.venues-comments {
-				margin-top: 16rpx;
+			.star {
 				display: flex;
 				align-items: center;
-				gap: 10px;
-
-				.star {
-					display: flex;
-					align-items: center;
-					gap: 8rpx;
-					font-size: 24rpx;
-					color: rgb(253, 209, 67);
-				}
-
-				.comment {
-					font-size: 24rpx;
-					color: #AAAAAA;
-				}
+				gap: 8rpx;
+				font-size: 24rpx;
+				color: rgb(253, 209, 67);
 			}
 
-			.venues-address {
-				margin-top: 16rpx;
+			.comment {
 				font-size: 24rpx;
-				color: #222222;
+				color: #AAAAAA;
 			}
+		}
 
-			.venues-type {
-				display: flex;
-				align-items: center;
-				gap: 10rpx;
-				margin-top: 16rpx;
-				flex-wrap: wrap;
-				.type-tags {
-					width: 92rpx;
-					height: 36rpx;
-					background: #F5F5F5;
-					border-radius: 8rpx;
-					font-size: 22rpx;
-					color: #AAAAAA;
-					text-align: center;
-					line-height: 36rpx;
-				}
+		.venues-address {
+			margin-top: 16rpx;
+			font-size: 24rpx;
+			color: #222222;
+		}
+
+		.venues-type {
+			display: flex;
+			align-items: center;
+			gap: 10rpx;
+			margin-top: 16rpx;
+			flex-wrap: wrap;
+
+			.type-tags {
+				width: 92rpx;
+				height: 36rpx;
+				background: #F5F5F5;
+				border-radius: 8rpx;
+				font-size: 22rpx;
+				color: #AAAAAA;
+				text-align: center;
+				line-height: 36rpx;
 			}
 		}
 	}
+}
 </style>

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

@@ -178,9 +178,9 @@ export class HttpClient {
 
 // 创建实例
 export const http = new HttpClient({
-  // baseURL: 'http://192.168.0.217: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',
+  // baseURL: 'http://192.168.0.11:8080/jeecg-boot/app',
   // baseURL: 'https://api.qlapp.cn/jeecgboot/app', //生产
   headers: {
     'Content-Type': 'application/json'

+ 22 - 1
src/utils/util/index.ts

@@ -86,7 +86,28 @@ export class RouterUtils {
 	* @param path - 页面路径
 	*/
 	static to_page(path: string) {
-		if (!uni.getStorageSync('TOKEN')) {
+		// 定义不需要token验证的页面白名单
+		const noTokenRequiredPages = [
+			'/pages/index/index',
+			'/pages/index/venue/index',
+			// '/pages/index/detail/index',
+			// '/pages/index/gymDetail/index',
+			// '/pages/index/courseDetail/index',
+			'/pages/index/training/index',
+			'/pages/index/events/index',
+			'/pages/index/eventsDetail/index',
+			'/pages/index/allInstructor/index',
+			// '/pages/index/instructorDetail/index',
+			'/pages/index/search/index',
+			'/pages/index/searchPage/index',
+			'/pages/index/vr/index',
+			'/pages/index/mapPage/index',
+			'/pages/mine/index'
+		];
+		// 检查当前路径是否在白名单中
+		const isNoTokenRequired = noTokenRequiredPages.some(page => path.startsWith(page));
+		// 如果不在白名单中且没有token,则进行登录验证
+		if (!isNoTokenRequired && !uni.getStorageSync('TOKEN')) {
 			TipsUtils.tips_alert('请先登录~', true).then((res) => {
 				console.log(res, 'res');
 				if (res.confirm) {