<template>
	<view class="dljt-page-box">
    <template  v-if="data.show">
      <MtaNavbar></MtaNavbar>
    </template>
		<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('shouye')">首页</view>
					<icon class="breadcrumb-jt"></icon>
					<view class="breadcrumb-text">招生就业</view>
					<icon class="breadcrumb-jt"></icon>
					<view class="breadcrumb-active">往年录取分数</view>
				</view>
				<view class="dljt-detail-box">
					<view class="dljt-editor-box">
						<MtaMpHtml class="dljt-editor-box" :content="data.info.content"></MtaMpHtml>
						<!-- pdf -->
						<MtaPDFVue v-if="data.info.pdfUrl" :pdfUrl="data.info.pdfUrl" @showNav="onShowNav"></MtaPDFVue>
					</view>
				</view>
				
			</view>
		</view>
		<!-- 底部导航 -->
		<MtaFooter></MtaFooter>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive
	} from "vue";
	import {
		onLoad
	} from "@dcloudio/uni-app"
	import * as httpApi from "@/api/common.js"
	import MtaFooter from "@/components/MtaFooter.vue"
	import MtaMpHtml from "@/components/MTAMpHtml/MtaMpHtml.vue"
	import MtaPDFVue from "@/components/MtaPDF.vue";


	const data = reactive({
		info: {},
    show: true
	})

	onLoad(() => {
		pageInit();
	})

  function onShowNav(val) {
    data.show = val;
  }

  function handleError(e) {
    uni.showModal({
      content: e.target.errMsg,
      showCancel: false
    })
  }

	function handleGo(code) {
		if (code == 'shouye') {
			uni.navigateTo({
				url: '/pages/index/index'
			})
		}
	}

	function pageInit() {
		httpApi.getCommonZSJYFengshuxianInfo().then(res => {
			data.info = res.data;
		})
	}
</script>

<style>

</style>