Commit c8d3407e5d5b1f72c060cf92a110ee4d41786461
1 parent
6e47149d
update
Showing
2 changed files
with
41 additions
and
6 deletions
src/main/java/com/cnlive/shenhe/controller/AudioController.java
| 1 | package com.cnlive.shenhe.controller; | 1 | package com.cnlive.shenhe.controller; |
| 2 | 2 | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 3 | import com.alibaba.fastjson.JSONObject; | 4 | import com.alibaba.fastjson.JSONObject; |
| 4 | import com.cnlive.shenhe.bean.ErrorEnum; | 5 | import com.cnlive.shenhe.bean.ErrorEnum; |
| 5 | import com.cnlive.shenhe.bean.ResponseBean; | 6 | import com.cnlive.shenhe.bean.ResponseBean; |
| @@ -245,6 +246,8 @@ public class AudioController extends BaseController { | @@ -245,6 +246,8 @@ public class AudioController extends BaseController { | ||
| 245 | @GetMapping("/details") | 246 | @GetMapping("/details") |
| 246 | public Object getDetailsVideo(Model model, Integer id) { | 247 | public Object getDetailsVideo(Model model, Integer id) { |
| 247 | ShyAudio shyAudio = audioService.getDetailsContent(id); | 248 | ShyAudio shyAudio = audioService.getDetailsContent(id); |
| 249 | + Object images = JSON.parse(shyAudio.getAudioCoverUrl()); | ||
| 250 | + | ||
| 248 | String yuming = ""; | 251 | String yuming = ""; |
| 249 | Integer plat = shyAudio.getBucketType(); | 252 | Integer plat = shyAudio.getBucketType(); |
| 250 | if (plat == CommonConst.QINIU_PLAT) { | 253 | if (plat == CommonConst.QINIU_PLAT) { |
| @@ -253,6 +256,7 @@ public class AudioController extends BaseController { | @@ -253,6 +256,7 @@ public class AudioController extends BaseController { | ||
| 253 | yuming = ks_domain + "/"; | 256 | yuming = ks_domain + "/"; |
| 254 | } | 257 | } |
| 255 | shyAudio.setAttr_tags(CommonUtils.isEmpty(shyAudio.getAttr_tags()) ? "" : shyAudio.getAttr_tags()); | 258 | shyAudio.setAttr_tags(CommonUtils.isEmpty(shyAudio.getAttr_tags()) ? "" : shyAudio.getAttr_tags()); |
| 259 | + model.addAttribute("images", images); | ||
| 256 | model.addAttribute("audio", shyAudio); | 260 | model.addAttribute("audio", shyAudio); |
| 257 | model.addAttribute("yuming", yuming); | 261 | model.addAttribute("yuming", yuming); |
| 258 | return "page/audioDetail.html"; | 262 | return "page/audioDetail.html"; |
src/main/resources/templates/page/audioDetail.html
| @@ -51,12 +51,43 @@ | @@ -51,12 +51,43 @@ | ||
| 51 | <div id="tabContents" class="tab-content"> | 51 | <div id="tabContents" class="tab-content"> |
| 52 | <div id="tabHome" class="tab-pane fade in active padding-t-15"> | 52 | <div id="tabHome" class="tab-pane fade in active padding-t-15"> |
| 53 | <div class="col-sm-5"> | 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 | </div> | 91 | </div> |
| 61 | </div> | 92 | </div> |
| 62 | <div class="form-group" style="margin-bottom: 6px;"> | 93 | <div class="form-group" style="margin-bottom: 6px;"> |