|
@@ -2,7 +2,7 @@
|
|
|
<div class="main">
|
|
|
<div class="left">
|
|
|
<!-- post -->
|
|
|
- {{ posters }}
|
|
|
+
|
|
|
<n-carousel
|
|
|
dot-placement="bottom"
|
|
|
style="width: 100%; height: 100%"
|
|
@@ -14,21 +14,13 @@
|
|
|
style="width: 100%; height: 100%; object-fit: cover"
|
|
|
src="/img/show_banner.png"
|
|
|
/>
|
|
|
- <img
|
|
|
- class="carousel-img"
|
|
|
- style="width: 100%; height: 100%; object-fit: cover"
|
|
|
- src="/img/show_banner.png"
|
|
|
- />
|
|
|
- <img
|
|
|
- class="carousel-img"
|
|
|
- style="width: 100%; height: 100%; object-fit: cover"
|
|
|
- src="/img/show_banner.png"
|
|
|
- />
|
|
|
- <img
|
|
|
- class="carousel-img"
|
|
|
- style="width: 100%; height: 100%; object-fit: cover"
|
|
|
- src="/img/show_banner.png"
|
|
|
- />
|
|
|
+ <template v-for="item in posters">
|
|
|
+ <img
|
|
|
+ class="carousel-img"
|
|
|
+ style="width: 100%; height: 100%; object-fit: cover"
|
|
|
+ :src="domain + item.filePath"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</n-carousel>
|
|
|
</div>
|
|
|
<div class="right">
|
|
@@ -57,17 +49,19 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { computed } from "vue";
|
|
|
-import { useFullscreen } from "@vueuse/core";
|
|
|
+import { computed, onBeforeMount, onMounted, ref } from "vue";
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
import { useInfoStore } from "../store/info";
|
|
|
|
|
|
const { push } = useRouter();
|
|
|
const InfoStore = useInfoStore();
|
|
|
|
|
|
-const posters = computed(() => InfoStore.poster);
|
|
|
-onMounted(() => {
|
|
|
- InfoStore.getPoster();
|
|
|
+const posters = computed(() => InfoStore.poster.data || []);
|
|
|
+const domain = ref(import.meta.env.VITE_DOMAIN_URL);
|
|
|
+
|
|
|
+
|
|
|
+onMounted(async () => {
|
|
|
+ await InfoStore.getPoster();
|
|
|
});
|
|
|
</script>
|
|
|
<style>
|
|
@@ -75,7 +69,7 @@ onMounted(() => {
|
|
|
--main-home-left-background: #e2caa3;
|
|
|
--main-home-right-background: #910000;
|
|
|
--main-right-border: 10px;
|
|
|
- --main-right-bg-img: url("img/h_banner_bg.png");
|
|
|
+ --main-right-bg-img: url("/img/h_banner_bg.png");
|
|
|
--main-right-bg-btn1: url("/img/guide_1.png");
|
|
|
--main-right-bg-btn2: url("/img/guide_2.png");
|
|
|
--main-right-bg-btn3: url("/img/guide_3.png");
|