From 5f00696dfb25bc90034448ceb634ed1ef256681a Mon Sep 17 00:00:00 2001 From: qiyunfeng-create <1940665526@qq.com> Date: 星期四, 21 八月 2025 21:13:35 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/xiehe_website --- src/views/educationalPublishing/index.vue | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/src/views/educationalPublishing/index.vue b/src/views/educationalPublishing/index.vue new file mode 100644 index 0000000..90b3308 --- /dev/null +++ b/src/views/educationalPublishing/index.vue @@ -0,0 +1,43 @@ +<template> + <div class="homePage"> + <el-carousel :height="screenheight + 'px'"> + <el-carousel-item v-for="(item, index) in banner" :key="index"> + <div class="bannerBox imgBox"> + <img id="autoHeight" class="bannerImg" :src="item.icon" @click="bannerLink(item)" /> + </div> + </el-carousel-item> + </el-carousel> + </div> +</template> + +<script setup> +import { ref, onBeforeMount, inject, reactive, onMounted } from 'vue' +const MG = inject('MG') + +let screenheight = ref(document.documentElement.clientHeight / 2) +const banner = reactive([]) +const getBanner = () => { + MG.resource + .getItem({ + path: 'banner\\homeBanner', + fields: { link: [] }, + paging: { start: 0, size: 9 }, + }) + .then((res) => { + banner.push(...res.datas) + console.log(res.datas) + }) +} +onMounted(() => { + getBanner() +}) +</script> + +<style lang="less" scoped> +.homePage { + min-width: 1220px; + min-height: calc(100vh - 61.8%); + background-color: #fff; + padding-bottom: 100px; +} +</style> -- Gitblit v1.9.1