<template>
	<view style="padding: 0 32rpx">
		<u-class title="专业分流">
			<view class="content">
				<view v-for="(item,index) in appList" :key="index" class="app-item" @click="onClick(item)">
					<image class="icon" :src="item.icon" />
					<view class="label">
						{{item.label}}
					</view>
				</view>
			</view>
		</u-class>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				appList: [{
						label: '分流名额',
						icon: '/static/index/diversion_quota_icon.png',
						url: '/pages/apps/shunt-places/shunt-places'
					},
					{
						label: '本人成绩',
						icon: '/static/index/my_grades_icon.png',
						url: '/pages/apps/my-grades/my-grades'
					},
					{
						label: '特别申请',
						icon: '/static/index/special_icon.png',
						url: '/pages/apps/special-application/special-application'
					},
					{
						label: '专业分流',
						icon: '/static/index/diversion_icon.png',
						url: '/pages/apps/change-major/change-major'
					},
					{
						label: '进度查询',
						icon: '/static/index/progress_query_icon.png',
						url: '/pages/apps/progress-query/progress-query'
					},
					// {
					// 	label: 'test',
					// 	icon: '/static/index/progress_query_icon.png',
					// 	url: '/pages/apps/test/test'
					// }
				]
			}
		},
		methods: {
			onClick(item) {
				console.log(item);
				item.url && uni.navigateTo({
					url: item.url
				})
			},

		}
	}
</script>

<style lang="scss" scoped>
	.content {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		flex-direction: row;

		.app-item {
			display: flex;
			align-items: center;
			flex-direction: column;
			font-size: 29rpx;
			background: white;

			font-weight: 400;
			color: #333333;
			cursor: pointer;
			padding: 16rpx 0;
			&:hover {
				opacity: 0.8;
			}

			.icon {
				width: 142rpx;
				height: 142rpx;
			}
		}
	}
</style>
