|  | @@ -34,13 +34,13 @@
 | 
											
												
													
														|  |  		<view class="d-timedown-card">
 |  |  		<view class="d-timedown-card">
 | 
											
												
													
														|  |  			<view class="d-title">距离报名结束</view>
 |  |  			<view class="d-title">距离报名结束</view>
 | 
											
												
													
														|  |  			<view class="timedown">
 |  |  			<view class="timedown">
 | 
											
												
													
														|  | -				<view class="time">{{ days||'--' }}</view>
 |  | 
 | 
											
												
													
														|  | 
 |  | +				<view class="time">{{ days || '--' }}</view>
 | 
											
												
													
														|  |  				<view class="unit">天</view>
 |  |  				<view class="unit">天</view>
 | 
											
												
													
														|  | -				<view class="time">{{ hours||'--' }}</view>
 |  | 
 | 
											
												
													
														|  | 
 |  | +				<view class="time">{{ hours || '--' }}</view>
 | 
											
												
													
														|  |  				<view class="unit">:</view>
 |  |  				<view class="unit">:</view>
 | 
											
												
													
														|  | -				<view class="time">{{ minutes||'--' }}</view>
 |  | 
 | 
											
												
													
														|  | 
 |  | +				<view class="time">{{ minutes || '--' }}</view>
 | 
											
												
													
														|  |  				<view class="unit">:</view>
 |  |  				<view class="unit">:</view>
 | 
											
												
													
														|  | -				<view class="time">{{ seconds||'--' }}</view>
 |  | 
 | 
											
												
													
														|  | 
 |  | +				<view class="time">{{ seconds || '--' }}</view>
 | 
											
												
													
														|  |  			</view>
 |  |  			</view>
 | 
											
												
													
														|  |  			<view class="timedown-tips">
 |  |  			<view class="timedown-tips">
 | 
											
												
													
														|  |  				<view class="tips-icon">!</view>
 |  |  				<view class="tips-icon">!</view>
 | 
											
										
											
												
													
														|  | @@ -146,7 +146,8 @@
 | 
											
												
													
														|  |  	</view>
 |  |  	</view>
 | 
											
												
													
														|  |  	<view style="height: 170rpx;"></view>
 |  |  	<view style="height: 170rpx;"></view>
 | 
											
												
													
														|  |  	<view class="d-footer">
 |  |  	<view class="d-footer">
 | 
											
												
													
														|  | -		<button hover-class="hover-style" :style="{backgroundColor:eventsInfoObj.isEntry==1?'#AAA':''}" @click="footerEnlists">马上报名</button>
 |  | 
 | 
											
												
													
														|  | 
 |  | +		<button hover-class="hover-style" :style="{ backgroundColor: eventsInfoObj.isEntry == 1 ? '#AAA' : '' }"
 | 
											
												
													
														|  | 
 |  | +			@click="footerEnlists">马上报名</button>
 | 
											
												
													
														|  |  	</view>
 |  |  	</view>
 | 
											
												
													
														|  |  </template>
 |  |  </template>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -155,7 +156,7 @@ import { ref, onMounted, computed, onUnmounted, getCurrentInstance, nextTick } f
 | 
											
												
													
														|  |  import { http } from '@/utils/http';
 |  |  import { http } from '@/utils/http';
 | 
											
												
													
														|  |  import { useCacheStore } from '@/stores/cache';
 |  |  import { useCacheStore } from '@/stores/cache';
 | 
											
												
													
														|  |  import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
 |  |  import zzxNavbar from '@/components/zzx-navbar/zzx-navbar.vue';
 | 
											
												
													
														|  | -import { RouterUtils,TipsUtils } from '@/utils/util';
 |  | 
 | 
											
												
													
														|  | 
 |  | +import { RouterUtils, TipsUtils } from '@/utils/util';
 | 
											
												
													
														|  |  import { onLoad, onPageScroll } from '@dcloudio/uni-app';
 |  |  import { onLoad, onPageScroll } from '@dcloudio/uni-app';
 | 
											
												
													
														|  |  const statusBarHeight = ref(0);
 |  |  const statusBarHeight = ref(0);
 | 
											
												
													
														|  |  const cache = useCacheStore()
 |  |  const cache = useCacheStore()
 | 
											
										
											
												
													
														|  | @@ -172,6 +173,7 @@ const selectList = ref(['赛程安排', '图文说明']);
 | 
											
												
													
														|  |  const instance = getCurrentInstance();
 |  |  const instance = getCurrentInstance();
 | 
											
												
													
														|  |  onLoad((option) => {
 |  |  onLoad((option) => {
 | 
											
												
													
														|  |  	formData.value.id = option.id;
 |  |  	formData.value.id = option.id;
 | 
											
												
													
														|  | 
 |  | +	get_location()
 | 
											
												
													
														|  |  })
 |  |  })
 | 
											
												
													
														|  |  onMounted(() => {
 |  |  onMounted(() => {
 | 
											
												
													
														|  |  	get_eventsInfo()
 |  |  	get_eventsInfo()
 | 
											
										
											
												
													
														|  | @@ -339,9 +341,46 @@ const open_phone = () => {
 | 
											
												
													
														|  |  	});
 |  |  	});
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -const footerEnlists=()=>{
 |  | 
 | 
											
												
													
														|  | -	if (eventsInfoObj.value.isEntry==1) return TipsUtils.tips_toast('报名已结束');
 |  | 
 | 
											
												
													
														|  | -RouterUtils.to_page(`/pages/index/eventsRegister/index?id=${eventsInfoObj.value.id}`)
 |  | 
 | 
											
												
													
														|  | 
 |  | +const footerEnlists = () => {
 | 
											
												
													
														|  | 
 |  | +	if (eventsInfoObj.value.isEntry == 1) return TipsUtils.tips_toast('报名已结束');
 | 
											
												
													
														|  | 
 |  | +	RouterUtils.to_page(`/pages/index/eventsRegister/index?id=${eventsInfoObj.value.id}`)
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +const get_location = () => {
 | 
											
												
													
														|  | 
 |  | +	uni.authorize({
 | 
											
												
													
														|  | 
 |  | +		scope: 'scope.userLocation',
 | 
											
												
													
														|  | 
 |  | +		success() {
 | 
											
												
													
														|  | 
 |  | +			uni.getLocation({
 | 
											
												
													
														|  | 
 |  | +				type: 'gcj02',
 | 
											
												
													
														|  | 
 |  | +				success: function (res) {
 | 
											
												
													
														|  | 
 |  | +					uni.hideLoading()
 | 
											
												
													
														|  | 
 |  | +					// cache.set('LON', res.longitude)
 | 
											
												
													
														|  | 
 |  | +					// cache.set('LAT', res.latitude)
 | 
											
												
													
														|  | 
 |  | +				},
 | 
											
												
													
														|  | 
 |  | +				fail: function (err) {
 | 
											
												
													
														|  | 
 |  | +					if (err.errMsg === 'getFuzzyLocation:fail system permission denied') {
 | 
											
												
													
														|  | 
 |  | +						TipsUtils.tips_alert('系统定位未开启,请开启定位以便提供更好服务', false)
 | 
											
												
													
														|  | 
 |  | +					} else if (err.errMsg === 'getFuzzyLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF' ||
 | 
											
												
													
														|  | 
 |  | +						err.errMsg === 'getFuzzyLocation:fail system permission denied' ||
 | 
											
												
													
														|  | 
 |  | +						err.errMsg === 'getFuzzyLocation:fail:system permission denied' || err.errMsg === 'getFuzzyLocation:fail auth deny') {
 | 
											
												
													
														|  | 
 |  | +						showAuthGuide()
 | 
											
												
													
														|  | 
 |  | +					}
 | 
											
												
													
														|  | 
 |  | +					console.log(err, '错误信息')
 | 
											
												
													
														|  | 
 |  | +				}
 | 
											
												
													
														|  | 
 |  | +			});
 | 
											
												
													
														|  | 
 |  | +		},
 | 
											
												
													
														|  | 
 |  | +		fail: (err) => {
 | 
											
												
													
														|  | 
 |  | +			showAuthGuide()
 | 
											
												
													
														|  | 
 |  | +		}
 | 
											
												
													
														|  | 
 |  | +	});
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +// 引导操作
 | 
											
												
													
														|  | 
 |  | +const showAuthGuide = async () => {
 | 
											
												
													
														|  | 
 |  | +	let res: any = await TipsUtils.tips_alert('授权定位以提供更好服务', true)
 | 
											
												
													
														|  | 
 |  | +	if (res.confirm) {
 | 
											
												
													
														|  | 
 |  | +		uni.openSetting()
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 | 
											
												
													
														|  |  
 |  |  
 |