You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
961 B
37 lines
961 B
<template>
|
|
<view class="min-height bg-white">
|
|
<view class="card flex flex-col justify-start items-start p-20 border-bottom" v-for="(item, index) in adList" :key="index">
|
|
<view class="text-24 my-20 flex justify-between items-center">
|
|
<text>{{ item.name }}</text>
|
|
<text class="text-gray">{{ dayjs(item.createTime).format('YYYY-MM-DD') }}</text>
|
|
</view>
|
|
<video :src="item.imageList[0].url" v-if="item.type === 3" :poster="item.cover"
|
|
style="width: 100%; height: 400rpx" show-play-btn show-fullscreen-btn/>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {adListReq} from "@/api/common";
|
|
import dayjs from "dayjs";
|
|
|
|
export default {
|
|
name: "adList",
|
|
data() {
|
|
return {
|
|
adList: [],
|
|
|
|
}
|
|
},
|
|
methods: {
|
|
dayjs,
|
|
async getAdList() {
|
|
const {data} = await adListReq()
|
|
this.adList = data.filter(item => item.type === 3)
|
|
},
|
|
},
|
|
onLoad(){
|
|
this.getAdList()
|
|
}
|
|
}
|
|
</script>
|