|
@@ -19,7 +19,7 @@
|
|
|
<img class="w-78px] h-[16px] absolute bottom-0 left-0 z-0" src="@/assets/png-xiantiao1.png" alt="" />
|
|
<img class="w-78px] h-[16px] absolute bottom-0 left-0 z-0" src="@/assets/png-xiantiao1.png" alt="" />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="news-list">
|
|
<div class="news-list">
|
|
|
- <video-small v-for="i in 10" :key="i"></video-small>
|
|
|
|
|
|
|
+ <video-small v-for="(item, index) in seriesList" :key="index" :info="item"></video-small>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -27,27 +27,18 @@
|
|
|
<div class="hot-title">{{ $t('home.hot') }}</div>
|
|
<div class="hot-title">{{ $t('home.hot') }}</div>
|
|
|
<img src="@/assets/hotImg.png" alt="" class="hot-img" />
|
|
<img src="@/assets/hotImg.png" alt="" class="hot-img" />
|
|
|
<div class="hot-list">
|
|
<div class="hot-list">
|
|
|
- <video-line v-for="i in 3" :key="i"></video-line>
|
|
|
|
|
|
|
+ <video-line v-for="(item, index) in hotList" :key="index" :info="item"></video-line>
|
|
|
</div>
|
|
</div>
|
|
|
<img src="@/assets/pbg-bg.png" alt="" class="hot-bg" />
|
|
<img src="@/assets/pbg-bg.png" alt="" class="hot-bg" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="py-6 px-[18px]">
|
|
|
|
|
- <div class="news-title text-white text-lg AlimamaShuHeiTi relative">
|
|
|
|
|
- <span class="z-[1] relative">戰神</span>
|
|
|
|
|
- <img class="w-[44px] h-[16px] absolute bottom-0 left-0 z-0" src="@/assets/png-xiantiao1.png" alt="" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="news-list">
|
|
|
|
|
- <video-small v-for="i in 10" :key="i"></video-small>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="py-6 px-[18px]">
|
|
|
|
|
|
|
+ <div class="py-6 px-[18px]" v-for="(item, index) in categories" :key="index">
|
|
|
<div class="news-title text-white text-lg AlimamaShuHeiTi relative">
|
|
<div class="news-title text-white text-lg AlimamaShuHeiTi relative">
|
|
|
- <span class="z-[1] relative">甜寵</span>
|
|
|
|
|
|
|
+ <span class="z-[1] relative">{{ item.name }}</span>
|
|
|
<img class="w-[44px] h-[16px] absolute bottom-0 left-0 z-0" src="@/assets/png-xiantiao1.png" alt="" />
|
|
<img class="w-[44px] h-[16px] absolute bottom-0 left-0 z-0" src="@/assets/png-xiantiao1.png" alt="" />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="news-list">
|
|
<div class="news-list">
|
|
|
- <video-small v-for="i in 10" :key="i"></video-small>
|
|
|
|
|
|
|
+ <video-small v-for="(data, dataIndex) in item.datas" :key="dataIndex" :info="data"></video-small>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="py-6 px-[18px]">
|
|
<div class="py-6 px-[18px]">
|
|
@@ -56,7 +47,7 @@
|
|
|
<img class="w-[78px] h-[16px] absolute bottom-0 left-0 z-0" src="@/assets/png-xiantiao1.png" alt="" />
|
|
<img class="w-[78px] h-[16px] absolute bottom-0 left-0 z-0" src="@/assets/png-xiantiao1.png" alt="" />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="perfect-list">
|
|
<div class="perfect-list">
|
|
|
- <video-small v-for="i in 10" :key="i"></video-small>
|
|
|
|
|
|
|
+ <video-small v-for="(item, index) in seriesList" :key="index" :info="item"></video-small>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -65,6 +56,34 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import VideoSmall from '../components/VideoSmall.vue'
|
|
import VideoSmall from '../components/VideoSmall.vue'
|
|
|
import VideoLine from '../components/VideoLine.vue'
|
|
import VideoLine from '../components/VideoLine.vue'
|
|
|
|
|
+import { http } from '@/plugins/http'
|
|
|
|
|
+import { ref } from 'vue'
|
|
|
|
|
+
|
|
|
|
|
+const seriesList = ref([])
|
|
|
|
|
+const hotList = ref([])
|
|
|
|
|
+http.get('/api/series').then(res => {
|
|
|
|
|
+ seriesList.value = res.data
|
|
|
|
|
+ hotList.value = res.data.slice(0, 3)
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+async function getSeries(data = {}) {
|
|
|
|
|
+ return http.get('/api/series', data).then(res => {
|
|
|
|
|
+ return Promise.resolve(res.data)
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const categories = ref([])
|
|
|
|
|
+http.get('/api/categories').then(res => {
|
|
|
|
|
+ res.data.forEach(async item => {
|
|
|
|
|
+ let data = await getSeries({
|
|
|
|
|
+ categories: item.id
|
|
|
|
|
+ })
|
|
|
|
|
+ categories.value.push({
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ datas: data
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
@@ -105,11 +124,11 @@ import VideoLine from '../components/VideoLine.vue'
|
|
|
.hot-title {
|
|
.hot-title {
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
- color: #aeffaf;
|
|
|
|
|
|
|
+ color: #00ffe4;
|
|
|
line-height: 18px;
|
|
line-height: 18px;
|
|
|
- background: linear-gradient(133deg, #c1ff8f 0%, #00ffe4 100%);
|
|
|
|
|
- -webkit-background-clip: text;
|
|
|
|
|
- -webkit-text-fill-color: transparent;
|
|
|
|
|
|
|
+ // background: linear-gradient(133deg, #c1ff8f 0%, #00ffe4 100%);
|
|
|
|
|
+ // -webkit-background-clip: text;
|
|
|
|
|
+ // -webkit-text-fill-color: transparent;
|
|
|
position: relative;
|
|
position: relative;
|
|
|
z-index: 1;
|
|
z-index: 1;
|
|
|
padding: 16px 14px;
|
|
padding: 16px 14px;
|