index.vue 3.06 KB
<template>
	<view class="page">
		<swiper>
			<swiper-item>1</swiper-item>
			<swiper-item>2</swiper-item>
			<swiper-item>3</swiper-item>
		</swiper>
		<view class="girdBox">
			<view @click="goPath('/training/trainList')">
				<image />新闻资讯
			</view>
			<view @click="goPath('/match/index')">
				<image />赛事报名
			</view>
			
			<view @click="goPath('/training/trainList')">
				<image />培训报名
			</view>
			<view @click="goPath()">
				<image />团体会员
			</view>
			<view @click="goPath()">
				<image />地方协会
			</view>
			<view @click="goPath()">
				<image />考点查询
			</view>
			<view @click="goPath()">
				<image />会员系统
			</view>
			<view @click="goPath('/myCenter/index')">
				<image />我的
			</view>
			
		</view>
	</view>
</template>

<script setup>
	import * as api from '@/common/api.js';
	import * as loginServer from '@/common/login.js';
	import config from '@/config.js'
	import {
		onLoad,
		onShow,
		onReady,
		onPullDownRefresh
	} from '@dcloudio/uni-app';
	import {
		ref,
		getCurrentInstance
	} from 'vue';


	const {
		proxy
	} = getCurrentInstance()
	const app = getApp();
	const svId = ref(null);

	const messageList = ref([])
	onShow(() => {
		if (app.globalData.isLogin) {
			init()
		} else {
			app.firstLoadCallback = () => {
				init()
			};
		}
	})
	onLoad(option => {

	});


	function goPath(path) {
		if(path)
		uni.navigateTo({
			url: path
		});
	}

	

	function init() {
		uni.showLoading({
			title: '加载中'
		});
		uni.hideLoading();

	}



	function goItem(item) {
		if (item.path) {
			let path = item.path
			uni.navigateTo({
				url: item.path
			});
		
		} else {
			uni.showToast({
				title: `暂未开放`,
				icon: 'none'
			});
		}
	}
</script>
<style scope lang="scss">
	.page{width: 100vw;overflow: hidden;}
	.loginOutIcon {
		position: relative;
		left: 60rpx;
		// top: 180rpx;

		image {
			width: 50rpx;
			height: 50rpx;
		}
	}

	.welcome {
		padding:30rpx 55rpx;
		line-height: 55rpx;
		font-size: 36rpx;
	}

	.flexbox {
		display: flex;
		justify-content: space-around;
		text-align: center;

		image {
			width: 90rpx;
			height: 90rpx;
			display: block;
			margin: auto;
		}
	}

	.image {
		width: 25px;
		height: 25px;
	}

	.grid-item-box {
		flex: 1;
		// position: relative;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 15px 0;
	}

	.grid-item-box-row {
		flex: 1;
		// position: relative;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding: 15px 0;
	}

	.grid-dot {
		position: absolute;
		top: 5px;
		right: 15px;
	}

	:deep(.uni-section) {
		background-color: transparent;
	}

	:deep(.uni-section .uni-section-header__content) {
		font-size: 44rpx;
		font-weight: bold;
		color: #29343C;
	}
	:deep(.uni-section .uni-section-header){
		padding: 0 30rpx;
	}
	
</style>