<template>
	<view class="dljt-page-box">
		<MtaNavbar></MtaNavbar>
		<view class="dljt-container-box">
			<view class="dljt-page-title">招生就业</view>
			<view class="dljt-page-content-box">
				<view class="dljt-breadcrumb-box">
					<view class="breadcrumb-text" @click="handleGo()">首页</view>
					<icon class="breadcrumb-jt"></icon>
					<view class="breadcrumb-text">招生就业</view>
					<icon class="breadcrumb-jt"></icon>
					<view class="breadcrumb-active">优秀毕业生</view>
				</view>
				<MtaScrollViewVue :refreshFn="getList" :size="21">
					<template v-slot="{ list }">
						<view class="photo-item-box" v-for="item in list" :key="item.id" @click="handleClick(item)">
							<!-- 图 -->
							<image :src="item.cover"></image>
							<!-- 内容 -->
							<view class="photo-mask-box">
								<view class="mask-title">{{item.title}}</view>
								<view class="mask-data">{{item.nian}}届结业生</view>
							</view>
						</view>
					</template>
				</MtaScrollViewVue>
			</view>
			<!-- 底部导航 -->
			<MtaFooter></MtaFooter>
		</view>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive
	} from "vue";
	import {
		onLoad
	} from "@dcloudio/uni-app"
	import * as httpApi from "@/api/common.js"
	import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
	import {
		formatDateToYearMonthDay,
		getStringByHtml3
	} from "@/utils/common.js"
	import MtaFooter from "@/components/MtaFooter.vue"

	const data = reactive({
		list: '',
		total: '',
		page: 1,
		size: 5
	})

	function handleClick(data) {
		uni.navigateTo({
			url: `/pages/zsjyYouxiubiyeshengInfo/zsjyYouxiubiyeshengInfo?id=${data.id}`
		})
	}

	function getList(data) {
		return httpApi.getCommonZSJYYouxiubiyeshengList(data)
	}

	function handleGo() {
		uni.navigateTo({
			url: '/pages/index/index'
		})
	}

	function pageInit() {
		httpApi.getCommonZSJYYouxiubiyeshengList().then(res => {
			data.list = res.data.data;
			data.total = res.data.total;
		})
	}
</script>

<style>

</style>