Commit a98301b9bec0316e64416fe1a25ca2583972bed4

Authored by 周伟鹏
1 parent 51949d81

页面优化

src/main/resources/templates/page/video.html
... ... @@ -118,9 +118,9 @@
118 118 <td style="text-align: center; width: 6%;" th:text="${video.auditor}">审核员</td>
119 119 <td style="text-align: center; width: 3%;" th:text="${video.video_priority=='1'?'是':'否'}">是</td>
120 120 <td style="text-align: center; width: 3%;">
121   - <span class="btn btn-sm btn-warning" th:if="${video.state==0}">待审核</span>
122   - <span class="btn btn-sm btn-warning" th:if="${video.state==1}">审核通过</span>
123   - <span class="btn btn-sm btn-warning" th:if="${video.state==2}">审核拒绝</span>
  121 + <span class="btn btn-sm btn-warning" th:if="${video.state==0}">待审</span>
  122 + <span class="btn btn-sm btn-success" th:if="${video.state==1}">通过</span>
  123 + <span class="btn btn-sm btn-danger" th:if="${video.state==2}">拒绝</span>
124 124 </td>
125 125 <td style="text-align: center; width: 10%;" th:text="${#dates.format(video.video_upload_time, 'yyyy-MM-dd HH:mm:ss')}">2018-03-07 16:56:20</td>
126 126 <td style="text-align: center; width: 17%;">
... ... @@ -142,13 +142,13 @@
142 142 <li class="page-pre"><a th:href="@{'/videos/page'}">‹‹</a></li>
143 143 <li class="page-pre" th:if="${!videoPage.isFirstPage}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum-1}+'\');'">‹</a></li>
144 144  
145   - <li class="page-number" th:if="${videoPage.pageNum-3>1}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum-3}+'\');'" th:text="${videoPage.pageNum-3}">2</a></li>
146   - <li class="page-number" th:if="${videoPage.pageNum-2>1}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum-2}+'\');'" th:text="${videoPage.pageNum-2}">2</a></li>
147   - <li class="page-number" th:if="${videoPage.pageNum-1>1}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum-1}+'\');'" th:text="${videoPage.pageNum-1}">2</a></li>
  145 + <li class="page-number" th:if="${videoPage.pageNum-3>=1}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum-3}+'\');'" th:text="${videoPage.pageNum-3}">2</a></li>
  146 + <li class="page-number" th:if="${videoPage.pageNum-2>=1}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum-2}+'\');'" th:text="${videoPage.pageNum-2}">2</a></li>
  147 + <li class="page-number" th:if="${videoPage.pageNum-1>=1}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum-1}+'\');'" th:text="${videoPage.pageNum-1}">2</a></li>
148 148 <li class="page-number active"><a href="javaScript:void(0);" th:text="${videoPage.pageNum}">2</a></li>
149   - <li class="page-number" th:if="${videoPage.pageNum+1<videoPage.pages}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum+1}+'\');'" th:text="${videoPage.pageNum+1}">2</a></li>
150   - <li class="page-number" th:if="${videoPage.pageNum+2<videoPage.pages}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum+2}+'\');'" th:text="${videoPage.pageNum+2}">2</a></li>
151   - <li class="page-number" th:if="${videoPage.pageNum+3<videoPage.pages}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum+3}+'\');'" th:text="${videoPage.pageNum+3}">2</a></li>
  149 + <li class="page-number" th:if="${videoPage.pageNum+1<=videoPage.pages}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum+1}+'\');'" th:text="${videoPage.pageNum+1}">2</a></li>
  150 + <li class="page-number" th:if="${videoPage.pageNum+2<=videoPage.pages}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum+2}+'\');'" th:text="${videoPage.pageNum+2}">2</a></li>
  151 + <li class="page-number" th:if="${videoPage.pageNum+3<=videoPage.pages}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum+3}+'\');'" th:text="${videoPage.pageNum+3}">2</a></li>
152 152  
153 153 <li class="page-next" th:if="${!videoPage.isLastPage}"><a th:onclick="'javascript:fanye(\''+${videoPage.pageNum+1}+'\');'">›</a></li>
154 154 <li class="page-next"><a th:onclick="'javascript:fanye(\''+${videoPage.pages}+'\');'">››</a></li>
... ...
src/main/resources/templates/page/videoDetail.html
... ... @@ -291,7 +291,7 @@
291 291 function (data) {
292 292 if (data.errorCode == 0) {
293 293 alert(data.errorMessage);
294   - location.href = location.href;
  294 + self.location=document.referrer;
295 295 } else {
296 296 alert(data.errorMessage);
297 297 }
... ... @@ -321,7 +321,7 @@
321 321 function (data) {
322 322 if (data.errorCode == 0) {
323 323 alert(data.errorMessage);
324   - location.href = location.href;
  324 + self.location=document.referrer;
325 325 } else {
326 326 alert(data.errorMessage);
327 327 }
... ... @@ -332,7 +332,7 @@
332 332  
333 333 $("#back").click(function () {
334 334 // window.location.href = '/videos/page';
335   - window.history.go(-1);
  335 + self.location=document.referrer;
336 336 });
337 337  
338 338 </script>
... ...