113 lines
2.4 KiB
Vue
113 lines
2.4 KiB
Vue
<template>
|
|
<view class="fullHeight">
|
|
<scroll-view scroll-y="true" class="pageContent">
|
|
<headers :showBack="true">
|
|
<view class="headerName">
|
|
视频播放列表
|
|
</view>
|
|
</headers>
|
|
<view class="videoBox" v-if="videoList.length>0">
|
|
<view class="videoItem" v-for="(item,index) in videoList" :key="index" @click="playVideoFn(item)">
|
|
<image v-if="item.coverUrl" class="videoPoster" :src="item.coverUrl" mode="aspectFill"></image>
|
|
<view v-else class="videoPoster">
|
|
<image src="/static/no_poster.png" class="no_poster"></image>
|
|
</view>
|
|
<view class="videoName">
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="placeholderBox" v-else>
|
|
<image src="/static/noData.png" class="noDataImg"></image>
|
|
<view class="text">
|
|
暂无数据
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
<footers v-if="pageType=='company'" :activeTab="'videoManage'"></footers>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import footers from "../../components/footers/footers.vue"
|
|
import headers from "../../components/headers/headers.vue"
|
|
export default {
|
|
components:{footers},
|
|
data() {
|
|
return {
|
|
videoList:[],
|
|
pageType:'company'
|
|
};
|
|
},
|
|
onLoad(options) {
|
|
if(options.pageType){
|
|
this.pageType=options.pageType
|
|
}
|
|
this.loadData(options.sn)
|
|
},
|
|
methods:{
|
|
playVideoFn(item){
|
|
// console.log(item)
|
|
uni.setStorageSync('videoInfo',item)
|
|
// if(item.liveRadioUrl){
|
|
uni.navigateTo({
|
|
// url:'./playVideo?url='+item.liveRadioUrl,
|
|
url:'playVideo'
|
|
})
|
|
// }
|
|
|
|
},
|
|
//获取项目视频
|
|
loadData(sn) {
|
|
var that = this
|
|
this.sendRequest({
|
|
url: "xmgl/company/getComapnyStatisticsList",
|
|
data: {sn: sn,videoType:1},
|
|
method: "POST",
|
|
success(res){
|
|
console.log('找封面',res)
|
|
that.videoList = res.result.videoList
|
|
}
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.videoBox{
|
|
padding: 20px 10px 10px;
|
|
overflow: hidden;
|
|
}
|
|
.videoItem{
|
|
float: left;
|
|
background-color: white;
|
|
width: calc(50% - 5px);
|
|
margin-bottom: 10px;
|
|
&:nth-child(2n-1){
|
|
margin-right: 10px;
|
|
}
|
|
.videoPoster{
|
|
height: 90px;
|
|
width: 100%;
|
|
background-color: #282828;
|
|
text-align: center;
|
|
.no_poster{
|
|
width: 55px;
|
|
height: 50px;
|
|
margin-top: 20px;
|
|
}
|
|
}
|
|
.videoName{
|
|
font-size: 14px;
|
|
color: $uni-text-color;
|
|
padding: 3px 0 8px;
|
|
width: 100%;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
text-align: center;
|
|
}
|
|
}
|
|
</style>
|