Commit c8d3407e5d5b1f72c060cf92a110ee4d41786461

Authored by 徐近程
1 parent 6e47149d

update

src/main/java/com/cnlive/shenhe/controller/AudioController.java
1 1 package com.cnlive.shenhe.controller;
2 2  
  3 +import com.alibaba.fastjson.JSON;
3 4 import com.alibaba.fastjson.JSONObject;
4 5 import com.cnlive.shenhe.bean.ErrorEnum;
5 6 import com.cnlive.shenhe.bean.ResponseBean;
... ... @@ -245,6 +246,8 @@ public class AudioController extends BaseController {
245 246 @GetMapping("/details")
246 247 public Object getDetailsVideo(Model model, Integer id) {
247 248 ShyAudio shyAudio = audioService.getDetailsContent(id);
  249 + Object images = JSON.parse(shyAudio.getAudioCoverUrl());
  250 +
248 251 String yuming = "";
249 252 Integer plat = shyAudio.getBucketType();
250 253 if (plat == CommonConst.QINIU_PLAT) {
... ... @@ -253,6 +256,7 @@ public class AudioController extends BaseController {
253 256 yuming = ks_domain + "/";
254 257 }
255 258 shyAudio.setAttr_tags(CommonUtils.isEmpty(shyAudio.getAttr_tags()) ? "" : shyAudio.getAttr_tags());
  259 + model.addAttribute("images", images);
256 260 model.addAttribute("audio", shyAudio);
257 261 model.addAttribute("yuming", yuming);
258 262 return "page/audioDetail.html";
... ...
src/main/resources/templates/page/audioDetail.html
... ... @@ -51,12 +51,43 @@
51 51 <div id="tabContents" class="tab-content">
52 52 <div id="tabHome" class="tab-pane fade in active padding-t-15">
53 53 <div class="col-sm-5">
54   - <div class="form-group" style="margin-bottom: 6px;">
55   - <label for="audioCoverUrl" class="control-label col-sm-4">封面图:</label>
56   - <div class="col-sm-8">
57   - <a href="#">
58   - <img th:src="@{${audio.audioCoverUrl}}" height="50%" width="50%" alt="封面图">
59   - </a>
  54 + <div class="form-group">
  55 + <div>
  56 + <label for="video_cover_img" class="control-label col-sm-4"
  57 + style="margin-left: -3%">封面图:</label>
  58 + </div>
  59 + <div style="height:110px; margin-left: 17%;">
  60 + <div class="col-sm-4 popover-options " th:style="${imgsStat.index==0}? 'float:left;margin-right: 43px;margin-left: -18px;':''" th:if="${imgsStat.index<2}"
  61 + th:each="imgs :${images}">
  62 + <a href="#">
  63 + <img th:src="@{${imgs.value}}" height="100px" alt="封面图">
  64 + </a>
  65 + <b th:text="${imgs.key}"></b>
  66 + </div>
  67 + </div>
  68 + <div style="height: 110px;margin-top: 15px;">
  69 + <label for="" class="control-label col-sm-4"
  70 + style="width: 26.3%;"></label>
  71 + <div class="col-sm-4 popover-options " th:style="${imgsStat.index==2}?'float:left;margin-right: 15px;':'float:left;'"
  72 + th:if="${imgsStat.index>=2&&imgsStat.index<4}"
  73 + th:each="imgs :${images}">
  74 + <a href="#">
  75 + <img th:src="@{${imgs.value}}" height="100px" alt="封面图">
  76 + </a>
  77 + <b th:text="${imgs.key}"></b>
  78 + </div>
  79 + </div>
  80 + <div style="height: 110px;margin-top: 15px;">
  81 + <label for="" class="control-label col-sm-4"
  82 + style="width: 26.3%;"></label>
  83 + <div class="col-sm-4 popover-options" th:style="${imgsStat.index==4}?'float:left;margin-right: 15px;':'float:left;'"
  84 + th:if="${imgsStat.index>=4}"
  85 + th:each="imgs :${images}">
  86 + <a href="#">
  87 + <img th:src="@{${imgs.value}}" height="100px" alt="封面图">
  88 + </a>
  89 + <b th:text="${imgs.key}"></b>
  90 + </div>
60 91 </div>
61 92 </div>
62 93 <div class="form-group" style="margin-bottom: 6px;">
... ...