Commit 59025b50b0e0363dd59a6bef444fecb160ac57dc
1 parent
68f8ec39
修改生活圈内容图片视频地址
Showing
2 changed files
with
15 additions
and
12 deletions
src/main/java/com/cnlive/shenhe/controller/ContentController.java
| ... | ... | @@ -150,7 +150,10 @@ public class ContentController { |
| 150 | 150 | } |
| 151 | 151 | //朋友圈内容切割内容图片或者视频地址 |
| 152 | 152 | if(content.getContent_tag().equals("moment")){ |
| 153 | - String [] contentImageUrlList=content.getContent_pc_url().split(","); | |
| 153 | + String[] contentImageUrlList=null; | |
| 154 | + if(content.getContent_pc_url()!=null){ | |
| 155 | + contentImageUrlList=content.getContent_pc_url().split(","); | |
| 156 | + } | |
| 154 | 157 | model.addAttribute("contentImageUrlList", contentImageUrlList); |
| 155 | 158 | } |
| 156 | 159 | model.addAttribute("content", content); | ... | ... |
src/main/resources/templates/page/contentDetail.html
| ... | ... | @@ -85,23 +85,23 @@ |
| 85 | 85 | <h5 th:text="${content.sp_id}+'('+${content.sp_desc}+')'">821403</h5> |
| 86 | 86 | </div> |
| 87 | 87 | </div> |
| 88 | - <div class="form-group" th:if="${content.content_tag==content}"> | |
| 88 | + <div class="form-group"> | |
| 89 | + <label for="activity_id" class="control-label col-sm-2">图文标题:</label> | |
| 90 | + <div class="col-sm-10"> | |
| 91 | + <h5 th:text="${content.title}"> | |
| 92 | + 769:video:comets:604_902dce9848ac482eb433f15c2cb0c401#3025</h5> | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + <div class="form-group" th:if="${content.content_tag=='content'}"> | |
| 89 | 96 | <label for="program_id" class="control-label col-sm-2">pc地址:</label> |
| 90 | 97 | <div class="col-sm-10"> |
| 91 | 98 | <a th:href="@{${content.content_pc_url}}" th:text="${content.content_pc_url}" target="blank"></a> |
| 92 | 99 | </div> |
| 93 | 100 | </div> |
| 94 | - <div class="form-group" th:if="${content.content_tag==moment}"> | |
| 101 | + <div class="form-group" th:if="${content.content_tag=='moment'}"> | |
| 95 | 102 | <label for="program_id" class="control-label col-sm-2">图片/视频地址:</label> |
| 96 | - <div class="col-sm-10" th:each="contentImageUrlList${contentImageUrlList}"> | |
| 97 | - <a th:href="@{${contentImageUrl}}" th:text="${contentImageUrl}+'\n'" target="blank"></a> | |
| 98 | - </div> | |
| 99 | - </div> | |
| 100 | - <div class="form-group"> | |
| 101 | - <label for="activity_id" class="control-label col-sm-2">图文标题:</label> | |
| 102 | - <div class="col-sm-10"> | |
| 103 | - <h5 th:text="${content.title}"> | |
| 104 | - 769:video:comets:604_902dce9848ac482eb433f15c2cb0c401#3025</h5> | |
| 103 | + <div class="col-sm-10" th:each="contentImageUrl:${contentImageUrlList}"> | |
| 104 | + <a th:href="@{${contentImageUrl}}" th:text="${contentImageUrl}" target="blank"></a> | |
| 105 | 105 | </div> |
| 106 | 106 | </div> |
| 107 | 107 | <div class="form-group"> | ... | ... |