vodComment.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <template name="vodComment">
  2. <view>
  3. <view class="topbanner">
  4. <dever-video
  5. :src="item.video"
  6. :pic="item.pic"
  7. :control="true"
  8. :index="0"
  9. :vid="item.id"
  10. :load.sync="load"
  11. ref="video"
  12. >
  13. </dever-video>
  14. </view>
  15. <view class='msgs-tabs'>
  16. <view class='tit'>{{item.name}}</view>
  17. <view class='num'>全部评论(100)</view>
  18. </view>
  19. <view class="living">
  20. <scroll-view class="message" bindscrolltolower="loadmore" scroll-y>
  21. <view class="item" v-for="(v, k) in comments" :key="k">
  22. <view class="user">
  23. <image :src="v.avatar"></image>
  24. </view>
  25. <view class="info clearfix">
  26. <view class="username text-ellipsis">
  27. <text>{{v.username}}</text>
  28. </view>
  29. <view class="txt">
  30. <text>{{v.content}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. </scroll-view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import deverVideo from '@/lib/dever/components/video.nvue';
  40. export default {
  41. name: "vodComment",
  42. props: {
  43. control : {
  44. type : Object,
  45. value : null
  46. },
  47. item : {
  48. type : Object,
  49. value : null
  50. },
  51. index : {
  52. type : Number,
  53. value : null
  54. },
  55. },
  56. data() {
  57. return {
  58. load : false,
  59. comments: [
  60. {
  61. id : 1,
  62. avatar : 'https://pic.rmb.bdstatic.com/b9279adf974b78d27201a0b34970c2a9.jpeg',
  63. username : 'rabin',
  64. content : 'dfdfdfdf',
  65. },
  66. {
  67. id : 2,
  68. avatar : 'https://pic.rmb.bdstatic.com/b9279adf974b78d27201a0b34970c2a9.jpeg',
  69. username : 'test',
  70. content : '哈哈哈哈或',
  71. }
  72. ],
  73. loading: false
  74. }
  75. },
  76. mounted() {
  77. this.control[this.index] = this;
  78. },
  79. methods:{
  80. start : function() {
  81. this.$refs.video.start();
  82. },
  83. stop : function() {
  84. this.$refs.video.stop(true);
  85. },
  86. },
  87. components:{
  88. deverVideo
  89. }
  90. }
  91. </script>
  92. <style>
  93. .topbanner{
  94. position: relative;
  95. width: 750rpx;
  96. height: 422rpx;
  97. display: block;
  98. }
  99. .msgs-tabs{
  100. line-height: 88rpx;
  101. display: flex;
  102. height: 88rpx;
  103. justify-content: space-between;
  104. box-sizing: border-box;
  105. padding: 0 30rpx;
  106. border-bottom: 1rpx solid #ccc;
  107. }
  108. .msgs-tabs .tit{
  109. font-size: 30rpx;
  110. color: #000;
  111. display: flex;
  112. align-items: center;
  113. overflow: hidden;
  114. }
  115. .msgs-tabs .tit:before{
  116. content: '';
  117. display: inline-block;
  118. width: 6rpx;
  119. height: 30rpx;
  120. margin-right: 10rpx;
  121. background-color: #000;
  122. }
  123. .msgs-tabs .num{
  124. font-size: 22rpx;
  125. color: #999;
  126. overflow: hidden;
  127. }
  128. .living{
  129. margin-bottom:50rpx;
  130. }
  131. .living-tabs{
  132. display: flex;
  133. justify-content: center;
  134. margin-bottom: 36rpx;
  135. }
  136. .living-tabs>view{
  137. font-size: 30rpx;
  138. line-height: 52rpx;
  139. margin: 0 26rpx;
  140. }
  141. .living-tabs>view.cur{
  142. border-bottom: 6rpx solid #000;
  143. }
  144. .living .send{
  145. border-bottom: solid 2rpx #f0f0f0;
  146. padding:0 30rpx 40rpx;
  147. }
  148. .living .send input{
  149. float:left;
  150. box-sizing: border-box;
  151. width:540rpx;
  152. height:60rpx;
  153. border:solid 2rpx #999999;
  154. border-radius: 10rpx;
  155. padding:0 10rpx;
  156. line-height: 60rpx;
  157. font-size: 30rpx;
  158. }
  159. .living .send .button{
  160. float:right;
  161. box-sizing: border-box;
  162. padding:0;
  163. width:130rpx;
  164. min-width: 0;
  165. height:60rpx;
  166. line-height: 60rpx;
  167. }
  168. .living .message{
  169. height:320rpx;
  170. padding:15rpx 0 110rpx;
  171. border-bottom: solid 2rpx #f0f0f0;
  172. }
  173. .living .message .item{
  174. padding:20rpx 35rpx 0;
  175. display: flex;
  176. }
  177. .living .message .user{
  178. float:left;
  179. }
  180. .living .message .user image{
  181. display: block;
  182. width:51rpx;
  183. height:51rpx;
  184. border-radius: 50%;
  185. }
  186. .living .message .info{
  187. position: relative;
  188. margin-left:70rpx;
  189. overflow: visible;
  190. }
  191. .living .message .username{
  192. font-size: 28rpx;
  193. margin-bottom: 13rpx;
  194. }
  195. .living .message .txt{
  196. position: relative;
  197. float:left;
  198. background: #eeeeee;
  199. max-width:400rpx;
  200. border-radius: 15rpx;
  201. padding: 9rpx 18rpx;
  202. font-size: 26rpx;
  203. line-height: 1.8;
  204. color: #666666;
  205. overflow: visible;
  206. }
  207. .living .message .txt:before{
  208. display: block;
  209. position: absolute;
  210. top:0;
  211. left:-14rpx;
  212. width:0;
  213. height:0;
  214. border: solid 14rpx transparent;
  215. border-top: solid 12rpx #eee;
  216. content:'';
  217. }
  218. .living{
  219. margin-bottom: 0;
  220. }
  221. .living .message{
  222. padding:0;
  223. border-bottom: 0;
  224. }
  225. .living .message{
  226. position: absolute;
  227. bottom: 120rpx;
  228. top: 544rpx;
  229. left: 0;
  230. width: 100%;
  231. height: auto;
  232. }
  233. .console{
  234. position: fixed;
  235. bottom:0;
  236. left:0;
  237. width:750rpx;
  238. height:98rpx;
  239. padding-top:20rpx;
  240. z-index: 5;
  241. }
  242. .console .comment{
  243. position: absolute;
  244. top:10rpx;
  245. left:85rpx;
  246. background:url(http://www.huoxingkandiqiu.com/files/img/ico-comment.png) no-repeat;
  247. background-size: 98rpx 98rpx;
  248. width:98rpx;
  249. height:98rpx;
  250. }
  251. .console .thumbup{
  252. position: absolute;
  253. top:10rpx;
  254. right:85rpx;
  255. }
  256. .console .num{
  257. background: #fff;
  258. position: absolute;
  259. top:40rpx;
  260. right:0;
  261. width:100rpx;
  262. height: 40rpx;
  263. line-height: 40rpx;
  264. color: #000;
  265. font-size: 24rpx;
  266. text-align: center;
  267. }
  268. .console .unlike{
  269. background:url(http://www.huoxingkandiqiu.com/files/img/ico-unlike.png) no-repeat;
  270. background-size: 98rpx 98rpx;
  271. width:98rpx;
  272. height:98rpx;
  273. }
  274. .console .like{
  275. background:url(http://www.huoxingkandiqiu.com/files/img/ico-like.png) no-repeat;
  276. background-size: 98rpx 98rpx;
  277. width:98rpx;
  278. height:98rpx;
  279. }
  280. .mask .layer{
  281. padding:40rpx 30rpx;
  282. }
  283. .mask textarea{
  284. margin-bottom: 25rpx;
  285. box-sizing: border-box;
  286. padding:10rpx;
  287. border:solid 2rpx #999999;
  288. border-radius: 10rpx;
  289. width:500rpx;
  290. font-size: 24rpx;
  291. }
  292. .mask .button{
  293. width:300rpx;
  294. }
  295. .share{
  296. position: fixed;
  297. bottom:20rpx;
  298. left:225rpx;
  299. }
  300. .console .edit{
  301. background:url(http://www.huoxingkandiqiu.com/files/img/edit.png) no-repeat;
  302. background-size: 80rpx 80rpx;
  303. width:80rpx;
  304. height:80rpx;
  305. position: absolute;
  306. left: 135rpx;
  307. bottom: 30rpx;
  308. }
  309. .console .edit.left30{
  310. left: 30rpx;
  311. }
  312. </style>