|
@@ -0,0 +1,335 @@
|
|
|
|
+<template name="vodComment">
|
|
|
|
+ <view>
|
|
|
|
+ <view class="topbanner">
|
|
|
|
+ <video
|
|
|
|
+ :src="item.video"
|
|
|
|
+ preload
|
|
|
|
+ :show-play-btn="true"
|
|
|
|
+ :show-center-play-btn="false"
|
|
|
|
+ :controls="true"
|
|
|
|
+ :loop="true"
|
|
|
|
+ :id="id()"
|
|
|
|
+ objectFit="fill"
|
|
|
|
+ :enable-progress-gesture="false"
|
|
|
|
+ @click="start"
|
|
|
|
+ ref="video_url"
|
|
|
|
+ play-btn-position="center"
|
|
|
|
+ class="video"
|
|
|
|
+ :poster="item.pic">
|
|
|
|
+ </video>
|
|
|
|
+
|
|
|
|
+ <cover-image
|
|
|
|
+ class="ico-video-play" v-if="show_play"
|
|
|
|
+ @tap="start"></cover-image>
|
|
|
|
+
|
|
|
|
+ </view>
|
|
|
|
+ <view class="living-tabs">
|
|
|
|
+ <view class="cur">{{item.name}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="living">
|
|
|
|
+ <scroll-view class="message" bindscrolltolower="loadmore" scroll-y>
|
|
|
|
+ <view class="item" v-for="(v, k) in comments">
|
|
|
|
+ <view class="user">
|
|
|
|
+ <image :src="v.avatar"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="info clearfix">
|
|
|
|
+ <view class="username text-ellipsis">
|
|
|
|
+ <text>{{v.username}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="txt">
|
|
|
|
+ <text>{{v.content}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </scroll-view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+export default {
|
|
|
|
+ name: "vodComment",
|
|
|
|
+ props: {
|
|
|
|
+ config : {
|
|
|
|
+ type : Object,
|
|
|
|
+ value : null
|
|
|
|
+ },
|
|
|
|
+ item : {
|
|
|
|
+ type : Object,
|
|
|
|
+ value : null
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ show_play: true,
|
|
|
|
+ videoCtx : false,
|
|
|
|
+ comments: [
|
|
|
|
+ {
|
|
|
|
+ id : 1,
|
|
|
|
+ avatar : 'https://yt3.ggpht.com/a/AATXAJxSSAfjWzxQAkDei2MeIPc6WqlO2FG-gOSpZQ=s48-c-k-c0xffffffff-no-rj-mo',
|
|
|
|
+ username : 'rabin',
|
|
|
|
+ content : 'dfdfdfdf',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id : 2,
|
|
|
|
+ avatar : 'https://pic.rmb.bdstatic.com/b9279adf974b78d27201a0b34970c2a9.jpeg',
|
|
|
|
+ username : 'test',
|
|
|
|
+ content : '哈哈哈哈或',
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ loading: false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods:{
|
|
|
|
+ id : function() {
|
|
|
|
+ var video_id = this.item.id;
|
|
|
|
+ return 'video_comment_' + video_id;
|
|
|
|
+ },
|
|
|
|
+ start : function() {
|
|
|
|
+ this.config.stop[this.config.page] = this;
|
|
|
|
+ var id = this.id();
|
|
|
|
+ if (!this.videoCtx) {
|
|
|
|
+ this.videoCtx = uni.createVideoContext(id, this);
|
|
|
|
+ }
|
|
|
|
+ if (this.show_play) {
|
|
|
|
+ this.videoCtx.play();
|
|
|
|
+ this.show_play = false;
|
|
|
|
+ } else {
|
|
|
|
+ this.videoCtx.pause();
|
|
|
|
+ this.show_play = true;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ stop : function() {
|
|
|
|
+ var id = this.id();
|
|
|
|
+ if (!this.videoCtx) {
|
|
|
|
+ this.videoCtx = uni.createVideoContext(id, this);
|
|
|
|
+ }
|
|
|
|
+ this.videoCtx.pause();
|
|
|
|
+ this.show_play = true;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style>
|
|
|
|
+.topbanner{
|
|
|
|
+ position: relative;
|
|
|
|
+}
|
|
|
|
+.topbanner image,.topbanner video,.topbanner live-player{
|
|
|
|
+ width: 750rpx;
|
|
|
|
+ height: 422rpx;
|
|
|
|
+ display: block;
|
|
|
|
+}
|
|
|
|
+.topbanner .media-cover,.topbanner video,.topbanner live-player{
|
|
|
|
+ height: 422rpx;
|
|
|
|
+}
|
|
|
|
+.living{
|
|
|
|
+ margin-bottom:50rpx;
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+.living-tabs{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-bottom: 36rpx;
|
|
|
|
+ float: left;
|
|
|
|
+}
|
|
|
|
+.living-tabs>view{
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ line-height: 52rpx;
|
|
|
|
+ margin: 0 26rpx;
|
|
|
|
+}
|
|
|
|
+.living-tabs>view.cur{
|
|
|
|
+ border-left: 10rpx solid #000;
|
|
|
|
+ padding-left: 20rpx;
|
|
|
|
+ margin-left: 16rpx;
|
|
|
|
+}
|
|
|
|
+.living .send{
|
|
|
|
+ border-bottom: solid 2rpx #f0f0f0;
|
|
|
|
+ padding:0 30rpx 40rpx;
|
|
|
|
+}
|
|
|
|
+.living .send input{
|
|
|
|
+ float:left;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ width:540rpx;
|
|
|
|
+ height:60rpx;
|
|
|
|
+ border:solid 2rpx #999999;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ padding:0 10rpx;
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+}
|
|
|
|
+.living .send .button{
|
|
|
|
+ float:right;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding:0;
|
|
|
|
+ width:130rpx;
|
|
|
|
+ min-width: 0;
|
|
|
|
+ height:60rpx;
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
+}
|
|
|
|
+.living .message{
|
|
|
|
+ height:320rpx;
|
|
|
|
+ padding:15rpx 0 110rpx;
|
|
|
|
+ border-bottom: solid 2rpx #f0f0f0;
|
|
|
|
+ border-top: 2rpx solid #bababa;
|
|
|
|
+ margin-top: -32rpx;
|
|
|
|
+}
|
|
|
|
+.living .message .item{
|
|
|
|
+ padding:20rpx 35rpx 0;
|
|
|
|
+ margin-top: 10rpx;
|
|
|
|
+}
|
|
|
|
+.living .message .user{
|
|
|
|
+ float:left;
|
|
|
|
+}
|
|
|
|
+.living .message .user image{
|
|
|
|
+ display: block;
|
|
|
|
+ width:51rpx;
|
|
|
|
+ height:51rpx;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+}
|
|
|
|
+.living .message .info{
|
|
|
|
+ position: relative;
|
|
|
|
+ margin-left:70rpx;
|
|
|
|
+ overflow: visible;
|
|
|
|
+}
|
|
|
|
+.living .message .username{
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ margin-bottom: 13rpx;
|
|
|
|
+}
|
|
|
|
+.living .message .txt{
|
|
|
|
+ position: relative;
|
|
|
|
+ /*float:left;*/
|
|
|
|
+ background: #eeeeee;
|
|
|
|
+ max-width:400rpx;
|
|
|
|
+ border-radius: 15rpx;
|
|
|
|
+ padding: 9rpx 18rpx;
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
+ line-height: 1.8;
|
|
|
|
+ color: #666666;
|
|
|
|
+ overflow: visible;
|
|
|
|
+}
|
|
|
|
+.living .message .txt:before{
|
|
|
|
+ display: block;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top:0;
|
|
|
|
+ left:-14rpx;
|
|
|
|
+ width:0;
|
|
|
|
+ height:0;
|
|
|
|
+ border: solid 14rpx transparent;
|
|
|
|
+ border-top: solid 12rpx #eee;
|
|
|
|
+ content:'';
|
|
|
|
+}
|
|
|
|
+.living-tabs{
|
|
|
|
+ padding: 20rpx 0 20rpx;
|
|
|
|
+ /* border: 1rpx solid #f0f0f0; */
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+}
|
|
|
|
+.living{
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+}
|
|
|
|
+.living .message{
|
|
|
|
+ padding:0;
|
|
|
|
+ border-bottom: 0;
|
|
|
|
+}
|
|
|
|
+.console{
|
|
|
|
+ z-index: 5;
|
|
|
|
+}
|
|
|
|
+.living .message{
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: 120rpx;
|
|
|
|
+ top: 544rpx;
|
|
|
|
+ left: 0;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: auto;
|
|
|
|
+}
|
|
|
|
+.ico-video-play{
|
|
|
|
+ background: url(@/static/icon/ico-video-play.png) no-repeat;
|
|
|
|
+ background-size: cover;
|
|
|
|
+ width: 100rpx;
|
|
|
|
+ height: 100rpx;
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 50%;
|
|
|
|
+ top: 50%;
|
|
|
|
+ transform: translate3d(-50%,-50%,0);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.console{
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom:0;
|
|
|
|
+ left:0;
|
|
|
|
+ width:750rpx;
|
|
|
|
+ height:98rpx;
|
|
|
|
+ padding-top:20rpx;
|
|
|
|
+}
|
|
|
|
+.console .comment{
|
|
|
|
+ position: absolute;
|
|
|
|
+ top:10rpx;
|
|
|
|
+ left:85rpx;
|
|
|
|
+ background:url(http://www.huoxingkandiqiu.com/files/img/ico-comment.png) no-repeat;
|
|
|
|
+ background-size: 98rpx 98rpx;
|
|
|
|
+ width:98rpx;
|
|
|
|
+ height:98rpx;
|
|
|
|
+}
|
|
|
|
+.console .thumbup{
|
|
|
|
+ position: absolute;
|
|
|
|
+ top:10rpx;
|
|
|
|
+ right:85rpx;
|
|
|
|
+}
|
|
|
|
+.console .num{
|
|
|
|
+ background: #fff;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top:40rpx;
|
|
|
|
+ right:0;
|
|
|
|
+ width:100rpx;
|
|
|
|
+ height: 40rpx;
|
|
|
|
+ line-height: 40rpx;
|
|
|
|
+ color: #000;
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+}
|
|
|
|
+.console .unlike{
|
|
|
|
+ background:url(http://www.huoxingkandiqiu.com/files/img/ico-unlike.png) no-repeat;
|
|
|
|
+ background-size: 98rpx 98rpx;
|
|
|
|
+ width:98rpx;
|
|
|
|
+ height:98rpx;
|
|
|
|
+}
|
|
|
|
+.console .like{
|
|
|
|
+ background:url(http://www.huoxingkandiqiu.com/files/img/ico-like.png) no-repeat;
|
|
|
|
+ background-size: 98rpx 98rpx;
|
|
|
|
+ width:98rpx;
|
|
|
|
+ height:98rpx;
|
|
|
|
+}
|
|
|
|
+.mask .layer{
|
|
|
|
+ padding:40rpx 30rpx;
|
|
|
|
+}
|
|
|
|
+.mask textarea{
|
|
|
|
+ margin-bottom: 25rpx;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding:10rpx;
|
|
|
|
+ border:solid 2rpx #999999;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ width:500rpx;
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+}
|
|
|
|
+.mask .button{
|
|
|
|
+ width:300rpx;
|
|
|
|
+}
|
|
|
|
+.share{
|
|
|
|
+ position: fixed;
|
|
|
|
+ bottom:20rpx;
|
|
|
|
+ left:225rpx;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.console .edit{
|
|
|
|
+ background:url(http://www.huoxingkandiqiu.com/files/img/edit.png) no-repeat;
|
|
|
|
+ background-size: 80rpx 80rpx;
|
|
|
|
+ width:80rpx;
|
|
|
|
+ height:80rpx;
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 135rpx;
|
|
|
|
+ bottom: 30rpx;
|
|
|
|
+}
|
|
|
|
+.console .edit.left30{
|
|
|
|
+ left: 30rpx;
|
|
|
|
+}
|
|
|
|
+</style>
|