Commit 0010ca3e0a49d99a9db8f8fc553b1f2d99c84d8a
1 parent
9417cfcd
优化图文页面标签下拉列默认选中数据回填显示
Showing
2 changed files
with
5 additions
and
4 deletions
src/main/java/com/cnlive/shenhe/controller/ContentController.java
| @@ -109,6 +109,7 @@ public class ContentController extends BaseController { | @@ -109,6 +109,7 @@ public class ContentController extends BaseController { | ||
| 109 | } | 109 | } |
| 110 | model.addAttribute("contentPage", contentPage); | 110 | model.addAttribute("contentPage", contentPage); |
| 111 | model.addAttribute("pageSize", contentDTO.getPageSize()); | 111 | model.addAttribute("pageSize", contentDTO.getPageSize()); |
| 112 | + model.addAttribute("ContentTag", contentDTO.getContent_tag()); | ||
| 112 | return "page/content.html"; | 113 | return "page/content.html"; |
| 113 | } | 114 | } |
| 114 | 115 |
src/main/resources/templates/page/content.html
| @@ -113,10 +113,10 @@ | @@ -113,10 +113,10 @@ | ||
| 113 | <div class="col-sm-8" style="padding: 0;"> | 113 | <div class="col-sm-8" style="padding: 0;"> |
| 114 | <select class="form-control" id="content_tag" name="content_tag"> | 114 | <select class="form-control" id="content_tag" name="content_tag"> |
| 115 | <option value="">全部</option> | 115 | <option value="">全部</option> |
| 116 | - <option value="content">图文发布</option> | ||
| 117 | - <option value="moment">朋友圈</option> | ||
| 118 | - <option value="cms_photoalbum">家庭相册</option> | ||
| 119 | - <option value="edu_works">作业作品</option> | 116 | + <option value="content" th:selected="${ContentTag eq 'content'}">图文发布</option> |
| 117 | + <option value="moment" th:selected="${ContentTag eq 'moment'}">朋友圈</option> | ||
| 118 | + <option value="cms_photoalbum" th:selected="${ContentTag eq 'cms_photoalbum'}">家庭相册</option> | ||
| 119 | + <option value="edu_works" th:selected="${ContentTag eq 'edu_works'}">作业作品</option> | ||
| 120 | </select> | 120 | </select> |
| 121 | <!-- <input class="form-control" name="content_tag" type="text" id="content_tag"> --> | 121 | <!-- <input class="form-control" name="content_tag" type="text" id="content_tag"> --> |
| 122 | </div> | 122 | </div> |