123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <view class="video1 u-flex u-row-between u-flex-wrap">
- <view class="video-item" v-for="(item,index) in list" :key="index" @click="playmp4(item)">
- <view class="image-box">
- <image :src="item.logo" class="image" mode="aspectFill"></image>
- <image src="../../static/images/video.png" class="play" mode=""></image>
- <!-- <text class="text">03.25</text> -->
- </view>
- <view class="video-name u-line-1">
- {{item.title}}
- </view>
- <view class="time">
- {{item.create_at}}
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- page: 1,
- list: []
- }
- },
- onLoad(option) {
- this.id = option.id
- this.getdata()
- },
- onReachBottom() {
- if(this.list.length % 20 == 0){
- this.page++
- this.getdata()
- }
- },
- methods: {
- playmp4(item){
- uni.navigateTo({
- url:"/pages/video/info?mp4=" + encodeURIComponent(item.video)
- })
- },
- getdata() {
- this.$u.post('/api/Property/video_list', {
- id: this.id,
- page: this.page,
- page_num: 20
- }).then(res => {
- this.list = this.list.concat(res.data)
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .video1 {
- padding: 24rpx;
- .video-item {
- width: 340rpx;
- margin-bottom: 18rpx;
- .video-name {
- font-size: 20rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
- margin: 14rpx 0;
- }
- .time {
- font-size: 20rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #333333;
- }
- .image-box {
- width: 340rpx;
- height: 272rpx;
- position: relative;
- .play {
- width: 64rpx;
- height: 64rpx;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .image {
- width: 340rpx;
- height: 272rpx;
- border-radius: 10rpx;
- }
- .text {
- position: absolute;
- z-index: 10;
- right: 10rpx;
- bottom: 10rpx;
- font-size: 20rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- }
- }
- }
- }
- </style>
|