百色农校

This commit is contained in:
2025-04-17 16:22:32 +08:00
parent fe348ae97b
commit 7078da29f2
35 changed files with 516 additions and 114 deletions

View File

@@ -1,31 +1,30 @@
<template>
<div>
<div class="w-full bg-white mb-3 hidden-sm-and-down" v-if="ad">
<div style="margin-top: 210px;" class="w-full bg-white mb-3 hidden-sm-and-down" v-if="ad">
<el-carousel :height="`${ad?.height || '500'}px`">
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
<div class="item relative flex justify-center items-center">
<el-image :src="item.url" fit="cover" class="w-full" :style="`height: ${ad?.height}px;`" />
<el-image :src="item.url" fit="fill" class="w-full" :style="`height: ${ad?.height}px;`" />
<!-- fit: '' | 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'-->
</div>
{{ad.height}}==
</el-carousel-item>
</el-carousel>
</div>
<!-- 移动端 -->
<div class="sm:hidden w-full bg-white mt-[48px] mb-3 hidden-sm-and-up" v-if="ad">
<el-carousel indicator-position="none" height="150">
<div class="sm:hidden w-full bg-white mt-[38px] mb-3 hidden-sm-and-up" v-if="ad">
<el-carousel indicator-position="none" height="200">
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
<el-image :src="item.url" />
</el-carousel-item>
</el-carousel>
</div>
</div>
</template>
<script setup lang="ts">
import type {CompanyParam} from "~/api/system/company/model";
import type {CmsAd} from "~/api/cms/cmsAd/model";
import {pageCmsAd} from "~/api/cms/cmsAd";
import {getCmsAd, pageCmsAd} from "~/api/cms/cmsAd";
const props = withDefaults(
defineProps<{
@@ -47,6 +46,9 @@ const emit = defineEmits<{
const ad = ref<CmsAd>();
const ad421 = ref<CmsAd>();
const ad422 = ref<CmsAd>();
// 搜索表单
const where = reactive<CompanyParam>({
keywords: ''
@@ -63,6 +65,12 @@ const reload = async () => {
ad.value = res.list[0];
}
})
getCmsAd(421).then(res => {
ad421.value = res;
});
getCmsAd(422).then(res => {
ad422.value = res;
});
}
watch(