Commit 21ea0459c1129f205c40498874a22b448f2ab0cb
1 parent
f63c62a9
点播审核的 全部待领 不显示查看按钮(修改之前的做法,换一种方式)
Showing
2 changed files
with
11 additions
and
2 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| ... | ... | @@ -138,6 +138,16 @@ public class VideosController { |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | + /* 获取参数值给前台 用来判断是否需要把查看显示出来 state recive*/ | |
| 142 | + String state1 = state == null ? "" : state.toString(); | |
| 143 | + String receive1 = ""; | |
| 144 | + if (CommonUtils.isNotNull(receive)) { | |
| 145 | + receive1 = receive ? "true" : "false"; | |
| 146 | + } else { | |
| 147 | + receive1 = ""; | |
| 148 | + } | |
| 149 | + model.addAttribute("state1", state1); | |
| 150 | + model.addAttribute("receive1", receive1); | |
| 141 | 151 | model.addAttribute("videoPage", videoPage); |
| 142 | 152 | return "page/video.html"; |
| 143 | 153 | } | ... | ... |
src/main/resources/templates/page/video.html
| ... | ... | @@ -203,8 +203,7 @@ |
| 203 | 203 | <td style="text-align: center; width: 17%;"> |
| 204 | 204 | <a class="detail" th:href="@{'/videos/details/?id='+${video.id}}"> |
| 205 | 205 | <!--th:if="${ (video.receive==true and session.sessionUser.userId==video.receive_user_id) or (video.state==1 or video.state==2) }"--> |
| 206 | - <button th:if="${param.state[0] eq ''}" class="btn btn-info btn-sm">查看</button> | |
| 207 | - <button th:if="${param.state[0] ne ''}" class="btn btn-info btn-sm" th:style="${param.state[0] eq '0' && param.receive[0] eq 'false'} ? 'display: none ' : ' '">查看</button> | |
| 206 | + <button class="btn btn-info btn-sm" th:style="${state1 eq '0' && receive1 eq 'false'} ? 'display: none ' : ' '">查看</button> | |
| 208 | 207 | </a> |
| 209 | 208 | <span th:if="${video.state==0 and !video.receive}"> </span> |
| 210 | 209 | <a th:href="@{'javascript:applyReceive('+${video.id}+')'}" | ... | ... |