百色农校

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

@@ -0,0 +1,35 @@
<script setup lang="ts">
import type {CmsAd} from "~/api/cms/cmsAd/model";
import {getCmsAd} from "~/api/cms/cmsAd";
const ad421 = ref<CmsAd>();
const isMobile = useIsMobile();
// 请求数据
const reload = async () => {
getCmsAd(421).then(res => {
if (isMobile.value) {
res.height = '67';
}
ad421.value = res;
});
}
onMounted(() => {
reload();
});
</script>
<template>
<div v-if="ad421" v-for="(item,index) in ad421.imageList" :key="index">
<nuxt-link :to="ad421.style" class="flex justify-center items-center relative my-4">
<el-image class="absolute" :src="item.url" :style="`width: ${ad421.width ? ad421.width + 'px' : 'auto'}; height: ${ad421.height ? ad421.height + 'px' : 'auto'};`" />
</nuxt-link>
</div>
</template>
<style scoped lang="scss">
</style>