Commit 0b8c6107d170f5deb823606e80977af779db5d42
1 parent
307f4b69
点播详情页抽帧图添加,点播列表页“查看”按钮修改
Showing
3 changed files
with
82 additions
and
51 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| ... | ... | @@ -79,7 +79,7 @@ public class VideosController { |
| 79 | 79 | return new ResponseBean(ErrorEnum.SUCCESS); |
| 80 | 80 | } |
| 81 | 81 | logger.error("领取逻辑不符,不能审核,Video_id:{}", shyVideos.getVideo_id()); |
| 82 | - return new ResponseBean(ErrorEnum.ERROR.getErrorCode(),"领取逻辑不符,不能审核"); | |
| 82 | + return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "领取逻辑不符,不能审核"); | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
| ... | ... | @@ -143,11 +143,11 @@ public class VideosController { |
| 143 | 143 | public Object getDetailsVideo(Model model, Integer id) { |
| 144 | 144 | ShyVideos detailsContent = videosService.getDetailsContent(id); |
| 145 | 145 | Object images = JSON.parse(detailsContent.getVideo_imgs()); |
| 146 | - Object AvsampleImgs = JSON.parse(detailsContent.getAvsample_imgs()); | |
| 146 | + Object avsampleImgs = JSON.parse(detailsContent.getAvsample_imgs()); | |
| 147 | 147 | String url = detailsContent.getVideo_url().replace("http://", ""); |
| 148 | - String yuming ="http://"+ url.substring(0, url.indexOf("/")+1); | |
| 148 | + String yuming = "http://" + url.substring(0, url.indexOf("/") + 1); | |
| 149 | 149 | model.addAttribute("images", images); |
| 150 | - model.addAttribute("AvsampleImgs", AvsampleImgs); | |
| 150 | + model.addAttribute("avsampleImgs", avsampleImgs); | |
| 151 | 151 | model.addAttribute("video", detailsContent); |
| 152 | 152 | model.addAttribute("yuming", yuming); |
| 153 | 153 | ... | ... |
src/main/resources/templates/page/video.html
| ... | ... | @@ -193,15 +193,16 @@ |
| 193 | 193 | <span class="btn btn-sm btn-warning" th:if="${video.state==0}">待审</span> |
| 194 | 194 | <span class="btn btn-sm btn-success" th:if="${video.state==1}">通过</span> |
| 195 | 195 | <span class="btn btn-sm btn-danger" th:if="${video.state==2}">拒绝</span> |
| 196 | - <span class="btn btn-sm btn-danger" th:if="${video.state==3}">自动审核失败</span> | |
| 196 | + <span class="btn btn-sm btn-danger" | |
| 197 | + th:if="${video.state==3}">自动审核失败</span> | |
| 197 | 198 | </td> |
| 198 | 199 | <td style="text-align: center; width: 10%;" |
| 199 | 200 | th:text="${#dates.format(video.video_upload_time, 'yyyy-MM-dd HH:mm:ss')}"> |
| 200 | 201 | 2018-03-07 16:56:20 |
| 201 | 202 | </td> |
| 202 | 203 | <td style="text-align: center; width: 17%;"> |
| 203 | - <a class="detail" th:href="@{'/videos/details/?id='+${video.id}}" | |
| 204 | - th:if="${ (video.receive==true and session.sessionUser.userId==video.receive_user_id) or (video.state==1 or video.state==2) }"> | |
| 204 | + <a class="detail" th:href="@{'/videos/details/?id='+${video.id}}"> | |
| 205 | + <!--th:if="${ (video.receive==true and session.sessionUser.userId==video.receive_user_id) or (video.state==1 or video.state==2) }"--> | |
| 205 | 206 | <button class="btn btn-default btn-sm">查看</button> |
| 206 | 207 | </a> |
| 207 | 208 | <span th:if="${video.state==0 and !video.receive}"> </span> |
| ... | ... | @@ -271,23 +272,23 @@ |
| 271 | 272 | </section> |
| 272 | 273 | </div> |
| 273 | 274 | <script th:inline="javascript"> |
| 274 | - $(function () { | |
| 275 | - //按钮颜色设置 | |
| 276 | - var state = [[${param.state}]]?[[${param.state}]][0]:null; | |
| 277 | - var receive = [[${param.receive}]]?[[${param.receive}]][0]:null; | |
| 278 | - var stateIsNull = $.trim(state)==""; | |
| 279 | - var receiveIsNull = $.trim(receive)==""; | |
| 280 | - if(stateIsNull&&receiveIsNull){ | |
| 281 | - $("#quanbu").addClass("btn-info"); | |
| 282 | - }else if(state=='0'&&receive=='false'){ | |
| 283 | - $("#daishen").addClass("btn-warning"); | |
| 284 | - }else if(state=='0'&&receive=='true'){ | |
| 285 | - $("#Mydaishen").addClass("btn-success"); | |
| 286 | - }else if(!stateIsNull&&state!='0'&&receive=='true'){ | |
| 287 | - $("#yishen").addClass("btn-danger"); | |
| 288 | - } | |
| 275 | + $(function () { | |
| 276 | + //按钮颜色设置 | |
| 277 | + var state = [[${param.state}]] ? [[${param.state}]][0] : null; | |
| 278 | + var receive = [[${param.receive}]] ? [[${param.receive}]][0] : null; | |
| 279 | + var stateIsNull = $.trim(state) == ""; | |
| 280 | + var receiveIsNull = $.trim(receive) == ""; | |
| 281 | + if (stateIsNull && receiveIsNull) { | |
| 282 | + $("#quanbu").addClass("btn-info"); | |
| 283 | + } else if (state == '0' && receive == 'false') { | |
| 284 | + $("#daishen").addClass("btn-warning"); | |
| 285 | + } else if (state == '0' && receive == 'true') { | |
| 286 | + $("#Mydaishen").addClass("btn-success"); | |
| 287 | + } else if (!stateIsNull && state != '0' && receive == 'true') { | |
| 288 | + $("#yishen").addClass("btn-danger"); | |
| 289 | + } | |
| 289 | 290 | |
| 290 | - }) | |
| 291 | + }) | |
| 291 | 292 | |
| 292 | 293 | //翻页函数 |
| 293 | 294 | function fanye(page) { |
| ... | ... | @@ -447,6 +448,7 @@ |
| 447 | 448 | <!--保留之前的样式代码--> |
| 448 | 449 | <script> |
| 449 | 450 | $('#a_down').hide(); |
| 451 | + | |
| 450 | 452 | /*查询样式*/ |
| 451 | 453 | function openOrClose(id_name_str) { |
| 452 | 454 | var id_name = '#' + id_name_str; | ... | ... |
src/main/resources/templates/page/videoDetail.html
| ... | ... | @@ -56,8 +56,9 @@ |
| 56 | 56 | <label for="video_cover_img" class="control-label col-sm-4" |
| 57 | 57 | style="margin-left: -3%">封面图:</label> |
| 58 | 58 | </div> |
| 59 | - <div style="height:110px;" > | |
| 60 | - <div class="col-sm-4 popover-options " style="float:left;" th:if="${imgsStat.index<2}" | |
| 59 | + <div style="height:110px;"> | |
| 60 | + <div class="col-sm-4 popover-options " style="float:left;" | |
| 61 | + th:if="${imgsStat.index<2}" | |
| 61 | 62 | th:each="imgs :${images}"> |
| 62 | 63 | <a href="#"> |
| 63 | 64 | <img th:src="@{${imgs.value}}" height="100px" alt="封面图"> |
| ... | ... | @@ -66,8 +67,10 @@ |
| 66 | 67 | </div> |
| 67 | 68 | </div> |
| 68 | 69 | <div style="height: 110px;margin-top: 15px;"> |
| 69 | - <label for="" class="control-label col-sm-4" style="width: 30.3%;"></label> | |
| 70 | - <div class="col-sm-4 popover-options " style="float:left;" th:if="${imgsStat.index>=2&&imgsStat.index<4}" | |
| 70 | + <label for="" class="control-label col-sm-4" | |
| 71 | + style="width: 30.3%;"></label> | |
| 72 | + <div class="col-sm-4 popover-options " style="float:left;" | |
| 73 | + th:if="${imgsStat.index>=2&&imgsStat.index<4}" | |
| 71 | 74 | th:each="imgs :${images}"> |
| 72 | 75 | <a href="#"> |
| 73 | 76 | <img th:src="@{${imgs.value}}" height="100px" alt="封面图"> |
| ... | ... | @@ -76,8 +79,10 @@ |
| 76 | 79 | </div> |
| 77 | 80 | </div> |
| 78 | 81 | <div style="height: 110px;margin-top: 15px;"> |
| 79 | - <label for="" class="control-label col-sm-4" style="width: 30.3%;"></label> | |
| 80 | - <div class="col-sm-4 popover-options" style="float:left;" th:if="${imgsStat.index>=4}" | |
| 82 | + <label for="" class="control-label col-sm-4" | |
| 83 | + style="width: 30.3%;"></label> | |
| 84 | + <div class="col-sm-4 popover-options" style="float:left;" | |
| 85 | + th:if="${imgsStat.index>=4}" | |
| 81 | 86 | th:each="imgs :${images}"> |
| 82 | 87 | <a href="#"> |
| 83 | 88 | <img th:src="@{${imgs.value}}" height="100px" alt="封面图"> |
| ... | ... | @@ -147,6 +152,7 @@ |
| 147 | 152 | <h5 th:if="${video.state==0}">未审核</h5> |
| 148 | 153 | <h5 th:if="${video.state==1}">已审 通过</h5> |
| 149 | 154 | <h5 th:if="${video.state==2}">拒绝</h5> |
| 155 | + <h5 th:if="${video.state==3}">自动审核失败</h5> | |
| 150 | 156 | </div> |
| 151 | 157 | </div> |
| 152 | 158 | |
| ... | ... | @@ -167,24 +173,27 @@ |
| 167 | 173 | </div> |
| 168 | 174 | |
| 169 | 175 | |
| 170 | - <!--<div class="form-group file">--> | |
| 171 | - <!--<label class="control-label col-sm-3" for="attr_tags">常用审核意见:</label>--> | |
| 176 | + <div class="form-group file"> | |
| 177 | + <label class="control-label col-sm-3" for="attr_tags">常用审核意见:</label> | |
| 172 | 178 | |
| 173 | - <!--<div class="col-sm-9">--> | |
| 174 | - <!--<select class="form-control select2 select2-hidden-accessible" onchange="change()" multiple="" data-placeholder="选择常用审核意见,可多选" name="attr_tags[]" id="attr_tags" style="width: 100%;" tabindex="-1" aria-hidden="true">--> | |
| 175 | - <!--<option value="其他" >其他</option>--> | |
| 176 | - <!--<option value="不符">不符</option>--> | |
| 177 | - <!--<option value="规范">规范</option>--> | |
| 178 | - <!--<option value="建议">建议</option>--> | |
| 179 | - <!--<option value="错字">错字</option>--> | |
| 180 | - <!--<option value="要求">要求</option>--> | |
| 181 | - <!--<option value="图片">图片</option>--> | |
| 182 | - <!--<option value="敏感">敏感</option>--> | |
| 183 | - <!--<option value="视频">视频</option>--> | |
| 184 | - <!--<option value="提交">提交</option>--> | |
| 185 | - <!--</select>--> | |
| 186 | - <!--</div>--> | |
| 187 | - <!--</div>--> | |
| 179 | + <div class="col-sm-9"> | |
| 180 | + <select class="form-control select2 select2-hidden-accessible" | |
| 181 | + onchange="change()" multiple="" data-placeholder="选择常用审核意见,可多选" | |
| 182 | + name="attr_tags[]" id="attr_tags" style="width: 100%;" | |
| 183 | + tabindex="-1" aria-hidden="true"> | |
| 184 | + <option value="其他">其他</option> | |
| 185 | + <option value="不符">不符</option> | |
| 186 | + <option value="规范">规范</option> | |
| 187 | + <option value="建议">建议</option> | |
| 188 | + <option value="错字">错字</option> | |
| 189 | + <option value="要求">要求</option> | |
| 190 | + <option value="图片">图片</option> | |
| 191 | + <option value="敏感">敏感</option> | |
| 192 | + <option value="视频">视频</option> | |
| 193 | + <option value="提交">提交</option> | |
| 194 | + </select> | |
| 195 | + </div> | |
| 196 | + </div> | |
| 188 | 197 | <div class="form-group"> |
| 189 | 198 | <label for="msg" class="control-label col-sm-3">审核备注</label> |
| 190 | 199 | <div class="col-sm-9"> |
| ... | ... | @@ -194,6 +203,27 @@ |
| 194 | 203 | </div> |
| 195 | 204 | </div> |
| 196 | 205 | </div> |
| 206 | + <!--抽真图--> | |
| 207 | + <div class="form-group col-sm-7"> | |
| 208 | + <label class="control-label col-sm-3">抽帧截图 : </label> | |
| 209 | + </div> | |
| 210 | + | |
| 211 | + <div class="form-group col-sm-7" | |
| 212 | + style="overflow:scroll; height:400px; width: 44%;position: relative;right: -14%;margin-top: -4%;"> | |
| 213 | + <div class="col-sm-12" th:each="avImage,avImageStat : ${avsampleImgs}"> | |
| 214 | + <div style="padding:5px;width: 108%;" class="col-sm-8 popover-options" | |
| 215 | + th:if="${avImageStat.index%2==0}"> | |
| 216 | + <a href="javascript:void (0);" | |
| 217 | + style="float: left; width: 48%; margin-right: 1%"><img | |
| 218 | + th:src="${yuming}+ @{${avImage}}" | |
| 219 | + style="height: 100px;width: 100%; " alt="抽帧图"></a> | |
| 220 | + <a href="javascript:void (0);" style="float: left; width: 48%;" | |
| 221 | + th:if="${!avImageStat.last}"><img | |
| 222 | + th:src="${yuming}+ @{${avsampleImgs[avImageStat.index+1]}}" | |
| 223 | + style="height: 100px;width: 100%;" alt="抽帧图"></a> | |
| 224 | + </div> | |
| 225 | + </div> | |
| 226 | + </div> | |
| 197 | 227 | <!--不能删,此处已隐藏,起一个格式作用,使通过,拒绝,返回列表能顶到底部--> |
| 198 | 228 | <div class="form-group"> |
| 199 | 229 | <input type="text" hidden="hidden" id="video_id" value=""> |
| ... | ... | @@ -291,7 +321,7 @@ |
| 291 | 321 | function (data) { |
| 292 | 322 | if (data.errorCode == 0) { |
| 293 | 323 | alert(data.errorMessage); |
| 294 | - self.location=document.referrer; | |
| 324 | + self.location = document.referrer; | |
| 295 | 325 | } else { |
| 296 | 326 | alert(data.errorMessage); |
| 297 | 327 | } |
| ... | ... | @@ -310,8 +340,7 @@ |
| 310 | 340 | if (typeof(activity_id) == "undefined") { |
| 311 | 341 | return false; |
| 312 | 342 | } |
| 313 | - if(confirm("您确认通过此条点播吗?")) | |
| 314 | - { | |
| 343 | + if (confirm("您确认通过此条点播吗?")) { | |
| 315 | 344 | $.post("/videos/shenheVideo", { |
| 316 | 345 | id: id, |
| 317 | 346 | activity_id: activity_id, |
| ... | ... | @@ -323,7 +352,7 @@ |
| 323 | 352 | function (data) { |
| 324 | 353 | if (data.errorCode == 0) { |
| 325 | 354 | alert(data.errorMessage); |
| 326 | - self.location=document.referrer; | |
| 355 | + self.location = document.referrer; | |
| 327 | 356 | } else { |
| 328 | 357 | alert(data.errorMessage); |
| 329 | 358 | } |
| ... | ... | @@ -335,7 +364,7 @@ |
| 335 | 364 | |
| 336 | 365 | $("#back").click(function () { |
| 337 | 366 | // window.location.href = '/videos/page'; |
| 338 | - self.location=document.referrer; | |
| 367 | + self.location = document.referrer; | |
| 339 | 368 | }); |
| 340 | 369 | |
| 341 | 370 | </script> | ... | ... |