Files
UNION_NSI/target/classes/views/mobile/trainEducation/index.html
T
2026-09-08 19:49:21 +08:00

124 lines
3.4 KiB
HTML

<!--#
layout("/mobile/platform.html"){
#-->
<style>
#app {
background: #fff;
}
.newest-video {
padding: 0 20px;
}
.list-card {
padding: 0 16px;
}
.list-item {
max-width: calc(100% - 100px);
}
.list-item > div {
height: 30px;
line-height: 30px;
}
</style>
<div id="app" v-cloak>
<van-nav-bar
title="培训教育"
left-arrow
placeholder
fixed
@click-left="history.back()"
></van-nav-bar>
<van-swiper>
<van-swiper-item>
<van-image
fit="contain"
:src="topImg" alt="">
</van-image>
</van-swiper-item>
</van-swiper>
<van-grid :column-num="3" :border="false">
<van-grid-item v-for="item in videoTypeList"
:url="'/mobile/trainEducation/AlbumList?id=' + item.id"
:key="item.id"
:icon="FILE_DOMAIN+'/fileStreamPreview?id='+item.icon"
:text="item.typeName"></van-grid-item>
</van-grid>
<div style="height: 5px;background-color: #f6f7f9"></div>
<div class="newest-video">
<h4>最新视频</h4>
</div>
<div v-for="o in tableData" class="list-card" @click="goVideoPage(o)">
<div style="display: flex;padding-bottom: 10px" class="van-hairline--bottom">
<van-image
style="margin-right: 10px"
width="90"
height="90"
:src="FILE_DOMAIN+'/fileStreamPreview?id='+o.cover"
></van-image>
<div class="list-item">
<div style="font-size: 14px">{{o.title}}</div>
<div class="van-ellipsis" style="color: darkgray;font-size: 13px">
{{removeHTMLTag(o.description)}}
</div>
<div>
<van-tag plain type="primary">{{o.videoCount}}个视频</van-tag>
</div>
</div>
</div>
</div>
</div>
<script>
<!--#include("/platform/trainEdu/include/include.js"){}#-->
var vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
videoTypeList: [],
topImg: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fbpic.588ku.com%2Fback_pic%2F05%2F55%2F78%2F725b1593ced0c43.jpg&refer=http%3A%2F%2Fbpic.588ku.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642838257&t=cce87815db1b5e740bce9dc9357c7eaa'
}
},
methods: {
goVideoPage(item) {
window.location.href = '/mobile/trainEducation/videoPage?id=' + item.id
},
async getNewVideo() {
this.tableData = []
const {data} = await $.get('/mobile/trainEducation/getNewestVideo')
this.tableData.push(data)
}
},
async created() {
const videoTypeList = await getVideoType()
if (videoTypeList.length > 0) {
videoTypeList.map(v => {
if (v.files) {
v.icon = JSON.parse(v.files)[0].id
}
})
}
this.videoTypeList = videoTypeList
await this.getNewVideo()
}
})
</script>
<!--#
}
#-->