shotsDetailsComment.html 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <style>
  2. .right-content{
  3. padding-top:54px!important; padding-left:0!important; width:970px!important;
  4. }
  5. </style>
  6. <div class="content">
  7. <% include ../leftBar.html %>
  8. <!-- right content start -->
  9. <div class="right-content myAlbum-underReview">
  10. <div class="pageInfo">My Shots</div>
  11. <div class="shotsDetails">
  12. <a style="color: #1AA3DA;" href="/broadcast/shots/pass"><< Back to My Shots</a>
  13. <div class="shotsDetailsAddTime">Posted at <span class="localTime" data-time="<%=shotsInfo.add_time%>"></span></div>
  14. <div style="margin-top: 10px;">
  15. <div class="shotsDetailsImg">
  16. <% if(shotsInfo.type == 1) {%>
  17. <img class="showOriginal cursor center height240" data-img="<%=shotsInfo.originImg%>" src="<%=shotsInfo.img%>">
  18. <% }else{%>
  19. <img class="center height240" data-img="<%=shotsInfo.originImg%>" src="<%=shotsInfo.img%>">
  20. <img class="shotsMainShotsVideo video cursor" data-video="<%=shotsInfo.video%>" data-status="<%=shotsInfo.video_file_status%>" src="<%=public_path%>/img/play_video.png">
  21. <% }%>
  22. </div>
  23. </div>
  24. <div class="shotsDetailsContent"><%=shotsInfo.content%></div>
  25. <div id="tabs-container" class="shotsDetailsLikeList" style="margin: 0px;">
  26. <ul class="newtabs-menu ">
  27. <a href="/broadcast/shots/shotsDetailsLike?id=<%=shotsInfo.id%>">
  28. <li class="Pending shotsDetailsLikeListTable">
  29. <span>LIKE </span>
  30. (<span style="margin-left: 0px;" class="pendingNoRead"><%=shotsInfo.like_num%></span>)
  31. </li>
  32. <div class="PendingImg"></div>
  33. </a>
  34. <a href="/broadcast/shots/shotsDetailsComment?id=<%=shotsInfo.id%>">
  35. <li class="Pending current shotsDetailsLikeListTable">
  36. <span>COMMENT </span>
  37. (<span style="margin-left: 0px;" class="pendingNoRead"><%=shotsInfo.comment_num%></span>)
  38. </li>
  39. <div class="PendingImg current"></div>
  40. </a>
  41. </ul>
  42. <div class="shotsDetailsList">
  43. <ul>
  44. <%if(commentList.length > 0){%>
  45. <% var i = 1; for(var data of commentList){%>
  46. <li>
  47. <img src="<%=data.avatar_img%>">
  48. <div class="shotsDetailsCommentList" <%if(shotsInfo.comment_num <= 5 && i==commentList.length){%>style="border-bottom: 0px;"<%}%>>
  49. <div class="shotsDetailsCommentListName"><%=data.nick_name%></div>
  50. <div class="shotsDetailsCommentListcontent"><%=data.content%></div>
  51. <div class="shotsDetailsListLikeTime localTime" data-time="<%=data.add_time%>"></div>
  52. </div>
  53. </li>
  54. <% i++;}%>
  55. <%}else{%>
  56. <div class="shotsNoData">No comments at the moment.</div>
  57. <%}%>
  58. </ul>
  59. <%if(shotsInfo.comment_num > 5){%>
  60. <div id="page" class="pagenation"></div>
  61. <%}%>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <!-- right content end -->
  67. </div>
  68. <script>
  69. $(function(){
  70. //查看视频
  71. $('.video').on('click', function(){
  72. var videoUrl = $(this).attr('data-video');
  73. var status = $(this).attr('data-status');
  74. if(status == 1){
  75. parent.layer.open({
  76. type: 2,
  77. title: '',
  78. closeBtn: 0,
  79. resize: false,
  80. area : ['640px', '519px'],
  81. content: '/broadcast/shotsLayer/playVideo?videoUrl='+videoUrl
  82. });
  83. }else{
  84. parent.layer.open({
  85. type: 2,
  86. title: '',
  87. closeBtn: 0,
  88. resize: false,
  89. area : ['640px', '522px'],
  90. content: '/broadcast/shotsLayer/playError'
  91. });
  92. }
  93. })
  94. //查看图片
  95. var showOriginal = 0;
  96. $('.showOriginal').on('click', function(){
  97. if(showOriginal) {
  98. return false;
  99. }
  100. showOriginal = 1;
  101. var img = $(this).attr('data-img');
  102. var image = new Image();
  103. image.src = img;
  104. image.onload = function(){
  105. var width = image.width;
  106. var height = image.height;
  107. width = width*0.9;
  108. height = height*0.9;
  109. var windowHeigth = $(parent).height();
  110. var windowWidth = $(parent).width();
  111. var imgHeigth = '';
  112. var imgWidth = '';
  113. if(windowHeigth < height){
  114. windowHeigth = parseInt(windowHeigth * 0.6);
  115. windowWidth = parseInt(windowWidth * 0.6);
  116. height = windowHeigth;
  117. width = windowWidth;
  118. imgHeigth = windowHeigth;
  119. imgWidth = windowWidth;
  120. }else{
  121. imgHeigth = height;
  122. imgWidth = width;
  123. }
  124. width = width + 20 + 'px';
  125. height = height + 50 + 'px';
  126. parent.layer.open({
  127. type: 2,
  128. title: '',
  129. closeBtn: 0,
  130. resize: false,
  131. shadeClose: true,
  132. area : [width, height],
  133. content: '/broadcast/shotsLayer/showOriginal?img='+img+'&width='+imgWidth+'&height='+imgHeigth,
  134. end:function(){
  135. showOriginal = 0;
  136. }
  137. });
  138. }
  139. })
  140. localTime();//显示本地时间
  141. //分页
  142. var pages = Math.ceil('<%=shotsInfo.comment_num%>'/'<%=step%>');
  143. if(pages>1) {
  144. page('page', pages);
  145. }
  146. })
  147. </script>