Commit 0dd8fefe64ec73461ba0dd1235fe8f7708c1e4aa
1 parent
6f89ccda
整理代码
Showing
7 changed files
with
97 additions
and
103 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| ... | ... | @@ -35,19 +35,6 @@ public class VideosController { |
| 35 | 35 | @Autowired |
| 36 | 36 | UsersServiceImpl usersService; |
| 37 | 37 | |
| 38 | - @RequestMapping("/index") | |
| 39 | - public String index(HttpSession session, Model model) { | |
| 40 | - SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 41 | - ShyUsers shyUsers = new ShyUsers(); | |
| 42 | - shyUsers.setUser_id(sessionUser.getUserId()); | |
| 43 | - shyUsers = usersService.select(shyUsers); | |
| 44 | - JSONObject user = new JSONObject(); | |
| 45 | - user.put("name", shyUsers.getUsername()); | |
| 46 | - user.put("company", shyUsers.getCompany_brief()); | |
| 47 | - user.put("spid", shyUsers.getSp_id()); | |
| 48 | - model.addAttribute("user", user); | |
| 49 | - return "page/video.html"; | |
| 50 | - } | |
| 51 | 38 | |
| 52 | 39 | /** |
| 53 | 40 | * 审核信息返回接口 | ... | ... |
src/main/resources/templates/common/foot.html
| ... | ... | @@ -6,10 +6,6 @@ |
| 6 | 6 | </head> |
| 7 | 7 | <body> |
| 8 | 8 | <footer class="main-footer" style="font-size:18px;" th:fragment="foot"> |
| 9 | - <!--<div class="pull-right hidden-xs"> | |
| 10 | - <b>Version</b> 1.2 | |
| 11 | - <span><a href="http://shenhe.cnlive.com/scan_update_logs">查看更新日志</a></span> | |
| 12 | - </div>--> | |
| 13 | 9 | <strong>© 2017-2018 <a href="http://www.cnlive.com/"> 视讯中国 CNLive</a></strong> |
| 14 | 10 | 版权所有. |
| 15 | 11 | </footer> | ... | ... |
src/main/resources/templates/common/frame.html
| ... | ... | @@ -12,9 +12,6 @@ |
| 12 | 12 | <!-- Header Navbar: style can be found in header.less --> |
| 13 | 13 | <nav class="navbar navbar-static-top" role="navigation"> |
| 14 | 14 | <!-- Sidebar toggle button--> |
| 15 | - <!--<a href="http://shenhe.cnlive.com/videos#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> | |
| 16 | - <span class="sr-only">Toggle navigation</span> | |
| 17 | - </a>--> | |
| 18 | 15 | <div class="navbar-custom-menu"> |
| 19 | 16 | <ul class="nav navbar-nav"> |
| 20 | 17 | <li class="dropdown messages-menu" style="margin: 0 auto"> |
| ... | ... | @@ -24,7 +21,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. |
| 24 | 21 | </li> |
| 25 | 22 | <!-- User Account: style can be found in dropdown.less --> |
| 26 | 23 | <li class="dropdown user user-menu"> |
| 27 | - <a href="http://shenhe.cnlive.com/videos#" class="dropdown-toggle" data-toggle="dropdown"> | |
| 24 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"> | |
| 28 | 25 | <img th:src="@{${session.sessionUser.logo}}" class="user-image" alt="User Image"> |
| 29 | 26 | <span class="hidden-xs" th:text="${session.sessionUser.userName}"> |
| 30 | 27 | </span> |
| ... | ... | @@ -40,9 +37,6 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. |
| 40 | 37 | </li> |
| 41 | 38 | <!-- Menu Footer--> |
| 42 | 39 | <li class="user-footer"> |
| 43 | - <!--<div class="pull-left"> | |
| 44 | - <a href="http://shenhe.cnlive.com/users/info" class="btn btn-default btn-flat">个人资料</a> | |
| 45 | - </div>--> | |
| 46 | 40 | <div class="pull-right"> |
| 47 | 41 | <a href="/users/logout" class="btn btn-default btn-flat">注销</a> |
| 48 | 42 | </div> |
| ... | ... | @@ -62,7 +56,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. |
| 62 | 56 | <ul class="sidebar-menu"> |
| 63 | 57 | <li class="header">菜单导航</li> |
| 64 | 58 | <li class="treeview active"> |
| 65 | - <a href="http://shenhe.cnlive.com/videos#"> | |
| 59 | + <a href="#"> | |
| 66 | 60 | <span class="menu-item-top">审核云</span> |
| 67 | 61 | </a> |
| 68 | 62 | <ul class="treeview-menu"> |
| ... | ... | @@ -71,7 +65,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. |
| 71 | 65 | </ul> |
| 72 | 66 | </li> |
| 73 | 67 | <li class="treeview" th:if="${session.sessionUser.spid==0 or session.sessionUser.master}"> |
| 74 | - <a href="http://shenhe.cnlive.com/videos#"> | |
| 68 | + <a href="#"> | |
| 75 | 69 | <span class="menu-item-top">系统管理</span> |
| 76 | 70 | </a> |
| 77 | 71 | <ul class="treeview-menu"> | ... | ... |
src/main/resources/templates/page/comment.html
src/main/resources/templates/page/commentDetail.html
src/main/resources/templates/page/video.html
src/main/resources/templates/page/videoDetail.html
| ... | ... | @@ -24,24 +24,27 @@ |
| 24 | 24 | <div class="col-xs-12"> |
| 25 | 25 | <div class="box box-info"> |
| 26 | 26 | <div class="box-body form-horizontal"> |
| 27 | - <div class="col-sm-12" > | |
| 27 | + <div class="col-sm-12"> | |
| 28 | 28 | <div class="form-group" style="margin-bottom: 6px;"> |
| 29 | 29 | <div style=" margin-left: -5%;"> |
| 30 | - <label for="activity_id" class="control-label col-sm-2" >点播活动id:</label> | |
| 31 | - <div class="col-sm-2" > | |
| 32 | - <h5 id="activity_id" th:text="${video.video_id}">82_7d92ef8192364d4891820426329801bd</h5> | |
| 30 | + <label for="activity_id" class="control-label col-sm-2">点播活动id:</label> | |
| 31 | + <div class="col-sm-2"> | |
| 32 | + <h5 id="activity_id" th:text="${video.video_id}"> | |
| 33 | + 82_7d92ef8192364d4891820426329801bd</h5> | |
| 33 | 34 | </div> |
| 34 | 35 | </div> |
| 35 | 36 | <div style="margin-left: -14%;"> |
| 36 | - <label for="spid" class="control-label col-sm-2" >spId简称:</label> | |
| 37 | - <div class="col-sm-2" > | |
| 37 | + <label for="spid" class="control-label col-sm-2">spId简称:</label> | |
| 38 | + <div class="col-sm-2"> | |
| 38 | 39 | <h5 th:text="${video.spid}">视讯中国</h5> |
| 39 | 40 | </div> |
| 40 | 41 | </div> |
| 41 | 42 | <div> |
| 42 | - <label for="upload_time" class="control-label col-sm-2" style="margin-left: -5%">视频上传时间:</label> | |
| 43 | + <label for="upload_time" class="control-label col-sm-2" | |
| 44 | + style="margin-left: -5%">视频上传时间:</label> | |
| 43 | 45 | <div class="col-sm-2"> |
| 44 | - <h5 th:text="${#dates.format(video.video_upload_time, 'yyyy-MM-dd HH:mm:ss')}">2017-07-12 10:16:50</h5> | |
| 46 | + <h5 th:text="${#dates.format(video.video_upload_time, 'yyyy-MM-dd HH:mm:ss')}"> | |
| 47 | + 2017-07-12 10:16:50</h5> | |
| 45 | 48 | </div> |
| 46 | 49 | </div> |
| 47 | 50 | </div> |
| ... | ... | @@ -52,10 +55,12 @@ |
| 52 | 55 | <div class="col-sm-5"> |
| 53 | 56 | <div class="form-group"> |
| 54 | 57 | <div> |
| 55 | - <label for="video_cover_img" class="control-label col-sm-4" style="margin-left: -3%">封面图:</label> | |
| 58 | + <label for="video_cover_img" class="control-label col-sm-4" | |
| 59 | + style="margin-left: -3%">封面图:</label> | |
| 56 | 60 | </div> |
| 57 | - <div style="height:100px;" th:if="${imgsStat.index<4}" th:each="imgs :${images}"> | |
| 58 | - <div class="col-sm-4 popover-options " style="float:left;" > | |
| 61 | + <div style="height:100px;" th:if="${imgsStat.index<4}" | |
| 62 | + th:each="imgs :${images}"> | |
| 63 | + <div class="col-sm-4 popover-options " style="float:left;"> | |
| 59 | 64 | <a href="#"> |
| 60 | 65 | <img img th:src="@{${imgs.value}}" width="120px" alt="封面图"> |
| 61 | 66 | </a> |
| ... | ... | @@ -65,44 +70,49 @@ |
| 65 | 70 | <div class="form-group" style="margin-bottom: 6px;"> |
| 66 | 71 | <label for="video_title" class="control-label col-sm-4">点播标题:</label> |
| 67 | 72 | <div class="col-sm-8"> |
| 68 | - <h5 style="font-size:1.5em; font-weight: bold;" th:text="${video.video_title}" >标题</h5> | |
| 73 | + <h5 style="font-size:1.5em; font-weight: bold;" | |
| 74 | + th:text="${video.video_title}">标题</h5> | |
| 69 | 75 | </div> |
| 70 | 76 | </div> |
| 71 | 77 | <div class="form-group intro" style="margin-bottom: 6px;"> |
| 72 | 78 | <label for="video_intro" class="control-label col-sm-4">点播简介:</label> |
| 73 | 79 | <div class="col-sm-8"> |
| 74 | - <h5 style="font-size:1.5em; font-weight: bold; width:100%" th:text="${video.video_desc}">简介</h5> | |
| 80 | + <h5 style="font-size:1.5em; font-weight: bold; width:100%" | |
| 81 | + th:text="${video.video_desc}">简介</h5> | |
| 75 | 82 | </div> |
| 76 | 83 | </div> |
| 77 | 84 | <div class="form-group"> |
| 78 | 85 | <label for="video_tag" class="control-label col-sm-4">点播标签:</label> |
| 79 | 86 | <div class="col-sm-8"> |
| 80 | - <h5 style="font-size:1.5em; font-weight: bold;" id="video_tag" th:text="${video.video_tags}">点播标签</h5> | |
| 87 | + <h5 style="font-size:1.5em; font-weight: bold;" id="video_tag" | |
| 88 | + th:text="${video.video_tags}">点播标签</h5> | |
| 81 | 89 | </div> |
| 82 | 90 | </div> |
| 83 | 91 | <div class="form-group"> |
| 84 | 92 | <label for="video_keyword" class="control-label col-sm-4">点播关键字:</label> |
| 85 | 93 | <div class="col-sm-8"> |
| 86 | - <h5 style="font-size:1.5em; font-weight: bold;" th:text="${video.video_keyword}">关键字</h5> | |
| 94 | + <h5 style="font-size:1.5em; font-weight: bold;" | |
| 95 | + th:text="${video.video_keyword}">关键字</h5> | |
| 87 | 96 | </div> |
| 88 | 97 | </div> |
| 89 | 98 | <hr> |
| 90 | 99 | <div class="form-group"> |
| 91 | 100 | <div class="col-sm-12"> |
| 92 | 101 | <div class="modal-body" id="videoBox" style="height:450px"> |
| 93 | - <script type="text/javascript" src="//resweb.cnliveimg.com/sites/common/cnlive_video.min.js" ></script> | |
| 94 | - <script th:inline="javascript" > | |
| 95 | - var videoUrl =[[${video.video_url}]]; | |
| 96 | - var cover =[[${video.video_poster}]]; | |
| 102 | + <script type="text/javascript" | |
| 103 | + src="//resweb.cnliveimg.com/sites/common/cnlive_video.min.js"></script> | |
| 104 | + <script th:inline="javascript"> | |
| 105 | + var videoUrl = [[${video.video_url}]]; | |
| 106 | + var cover = [[${video.video_poster}]]; | |
| 97 | 107 | cnliveVideo.init({ |
| 98 | - "eleId":"videoBox", | |
| 99 | - "width":800,//指定放入指定ID元素内 | |
| 100 | - "height":450, | |
| 101 | - "model":3, | |
| 102 | - "autoplay":1, | |
| 103 | - "currRate":3, | |
| 104 | - "cover":cover, | |
| 105 | - "videoUrl_3":videoUrl | |
| 108 | + "eleId": "videoBox", | |
| 109 | + "width": 800,//指定放入指定ID元素内 | |
| 110 | + "height": 450, | |
| 111 | + "model": 3, | |
| 112 | + "autoplay": 1, | |
| 113 | + "currRate": 3, | |
| 114 | + "cover": cover, | |
| 115 | + "videoUrl_3": videoUrl | |
| 106 | 116 | }); |
| 107 | 117 | </script> |
| 108 | 118 | |
| ... | ... | @@ -122,11 +132,11 @@ |
| 122 | 132 | </div> |
| 123 | 133 | |
| 124 | 134 | <!--<div class="form-group ">--> |
| 125 | - <!--<label for="state" class="control-label col-sm-3">审核日志:</label>--> | |
| 126 | - <!--<div class="col-sm-9 ">--> | |
| 127 | - <!--<h5 id="state">1:系统审核;2017-07-12 11:54:01;点播审核可信,系统自动审核--> | |
| 128 | - <!--<br></h5>--> | |
| 129 | - <!--</div>--> | |
| 135 | + <!--<label for="state" class="control-label col-sm-3">审核日志:</label>--> | |
| 136 | + <!--<div class="col-sm-9 ">--> | |
| 137 | + <!--<h5 id="state">1:系统审核;2017-07-12 11:54:01;点播审核可信,系统自动审核--> | |
| 138 | + <!--<br></h5>--> | |
| 139 | + <!--</div>--> | |
| 130 | 140 | <!--</div>--> |
| 131 | 141 | |
| 132 | 142 | |
| ... | ... | @@ -139,27 +149,28 @@ |
| 139 | 149 | |
| 140 | 150 | |
| 141 | 151 | <!--<div class="form-group file">--> |
| 142 | - <!--<label class="control-label col-sm-3" for="attr_tags">常用审核意见:</label>--> | |
| 152 | + <!--<label class="control-label col-sm-3" for="attr_tags">常用审核意见:</label>--> | |
| 143 | 153 | |
| 144 | - <!--<div class="col-sm-9">--> | |
| 145 | - <!--<select class="form-control select2 select2-hidden-accessible" onchange="change()" multiple="" data-placeholder="选择常用审核意见,可多选" name="attr_tags[]" id="attr_tags" style="width: 100%;" tabindex="-1" aria-hidden="true">--> | |
| 146 | - <!--<option value="其他" >其他</option>--> | |
| 147 | - <!--<option value="不符">不符</option>--> | |
| 148 | - <!--<option value="规范">规范</option>--> | |
| 149 | - <!--<option value="建议">建议</option>--> | |
| 150 | - <!--<option value="错字">错字</option>--> | |
| 151 | - <!--<option value="要求">要求</option>--> | |
| 152 | - <!--<option value="图片">图片</option>--> | |
| 153 | - <!--<option value="敏感">敏感</option>--> | |
| 154 | - <!--<option value="视频">视频</option>--> | |
| 155 | - <!--<option value="提交">提交</option>--> | |
| 156 | - <!--</select>--> | |
| 157 | - <!--</div>--> | |
| 154 | + <!--<div class="col-sm-9">--> | |
| 155 | + <!--<select class="form-control select2 select2-hidden-accessible" onchange="change()" multiple="" data-placeholder="选择常用审核意见,可多选" name="attr_tags[]" id="attr_tags" style="width: 100%;" tabindex="-1" aria-hidden="true">--> | |
| 156 | + <!--<option value="其他" >其他</option>--> | |
| 157 | + <!--<option value="不符">不符</option>--> | |
| 158 | + <!--<option value="规范">规范</option>--> | |
| 159 | + <!--<option value="建议">建议</option>--> | |
| 160 | + <!--<option value="错字">错字</option>--> | |
| 161 | + <!--<option value="要求">要求</option>--> | |
| 162 | + <!--<option value="图片">图片</option>--> | |
| 163 | + <!--<option value="敏感">敏感</option>--> | |
| 164 | + <!--<option value="视频">视频</option>--> | |
| 165 | + <!--<option value="提交">提交</option>--> | |
| 166 | + <!--</select>--> | |
| 167 | + <!--</div>--> | |
| 158 | 168 | <!--</div>--> |
| 159 | 169 | <div class="form-group"> |
| 160 | 170 | <label for="msg" class="control-label col-sm-3">审核备注</label> |
| 161 | 171 | <div class="col-sm-9"> |
| 162 | - <textarea name="msg" id="msg" cols="5" rows="5" class="form-control" th:text="${video.msg}"></textarea> | |
| 172 | + <textarea name="msg" id="msg" cols="5" rows="5" class="form-control" | |
| 173 | + th:text="${video.msg}"></textarea> | |
| 163 | 174 | </div> |
| 164 | 175 | </div> |
| 165 | 176 | </div> |
| ... | ... | @@ -193,9 +204,13 @@ |
| 193 | 204 | </div> |
| 194 | 205 | <div class="modal-body" id="msg2"></div> |
| 195 | 206 | <div class="modal-footer"> |
| 196 | - <button type="button" class="btn btn-default " data-dismiss="modal" id="action_note_no">取消</button> | |
| 197 | - <button type="button" class="btn btn-primary" id="action_note_yes">确认</button> | |
| 198 | - <input type="hidden" name="action_note_type" id="action_note_type" value=""> | |
| 207 | + <button type="button" class="btn btn-default " data-dismiss="modal" | |
| 208 | + id="action_note_no">取消 | |
| 209 | + </button> | |
| 210 | + <button type="button" class="btn btn-primary" id="action_note_yes">确认 | |
| 211 | + </button> | |
| 212 | + <input type="hidden" name="action_note_type" id="action_note_type" | |
| 213 | + value=""> | |
| 199 | 214 | <input type="hidden" name="action_note_id" id="action_note_id" value=""> |
| 200 | 215 | </div> |
| 201 | 216 | </div> |
| ... | ... | @@ -229,7 +244,7 @@ |
| 229 | 244 | //弹出框确认 |
| 230 | 245 | $("#action_note_yes").click(function () { |
| 231 | 246 | var id = [[${video.id}]]; |
| 232 | - var activity_id =[[${video.video_id}]]; | |
| 247 | + var activity_id = [[${video.video_id}]]; | |
| 233 | 248 | var state = 4; |
| 234 | 249 | var row_id = $("#video_id").val(); |
| 235 | 250 | var attr_tags = $('#attr_tags').val();//获取标签属性信息 |
| ... | ... | @@ -246,14 +261,19 @@ |
| 246 | 261 | $("#action_note").hide();//隐藏弹出框 |
| 247 | 262 | var action_note_type = $("#action_note_type").val(); |
| 248 | 263 | if (action_note_type == 'reject') { |
| 249 | - $.post("/videos/shenheVideo",{ | |
| 250 | - id:id, activity_id:activity_id, state: state, attr_tags: msg,msg:msg,callback:callback | |
| 264 | + $.post("/videos/shenheVideo", { | |
| 265 | + id: id, | |
| 266 | + activity_id: activity_id, | |
| 267 | + state: state, | |
| 268 | + attr_tags: msg, | |
| 269 | + msg: msg, | |
| 270 | + callback: callback | |
| 251 | 271 | }, |
| 252 | 272 | function (data) { |
| 253 | - if (data.errorCode==0){ | |
| 273 | + if (data.errorCode == 0) { | |
| 254 | 274 | alert(data.errorMessage); |
| 255 | 275 | location.href = location.href; |
| 256 | - } else{ | |
| 276 | + } else { | |
| 257 | 277 | alert(data.errorMessage); |
| 258 | 278 | } |
| 259 | 279 | }) |
| ... | ... | @@ -264,24 +284,29 @@ |
| 264 | 284 | $("#pass").click(function () { |
| 265 | 285 | var id = [[${video.id}]]; |
| 266 | 286 | var state = 3; |
| 267 | - var activity_id =[[${video.video_id}]]; | |
| 287 | + var activity_id = [[${video.video_id}]]; | |
| 268 | 288 | var attr_tags = $('#attr_tags').val();//获取标签属性信息 |
| 269 | 289 | var msg = $('#msg').val(); //获取审核msg |
| 270 | 290 | var callback = [[${video.callback}]]; |
| 271 | 291 | if (typeof(activity_id) == "undefined") { |
| 272 | 292 | return false; |
| 273 | 293 | } |
| 274 | - $.post("/videos/shenheVideo",{ | |
| 275 | - id:id, activity_id:activity_id, state: state, attr_tags: msg,msg:msg,callback:callback | |
| 294 | + $.post("/videos/shenheVideo", { | |
| 295 | + id: id, | |
| 296 | + activity_id: activity_id, | |
| 297 | + state: state, | |
| 298 | + attr_tags: msg, | |
| 299 | + msg: msg, | |
| 300 | + callback: callback | |
| 276 | 301 | }, |
| 277 | 302 | function (data) { |
| 278 | - if (data.errorCode==0){ | |
| 279 | - alert(data.errorMessage); | |
| 280 | - location.href = location.href; | |
| 281 | - } else{ | |
| 282 | - alert(data.errorMessage); | |
| 283 | - } | |
| 284 | - }) | |
| 303 | + if (data.errorCode == 0) { | |
| 304 | + alert(data.errorMessage); | |
| 305 | + location.href = location.href; | |
| 306 | + } else { | |
| 307 | + alert(data.errorMessage); | |
| 308 | + } | |
| 309 | + }) | |
| 285 | 310 | }); |
| 286 | 311 | |
| 287 | 312 | /*返回列表 */ |
| ... | ... | @@ -309,7 +334,7 @@ |
| 309 | 334 | </div> |
| 310 | 335 | </section> |
| 311 | 336 | </div> |
| 312 | - <footer th:replace="../templates/common/foot::foot" ></footer> | |
| 337 | + <footer th:replace="../templates/common/foot::foot"></footer> | |
| 313 | 338 | <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div> |
| 314 | 339 | </div> |
| 315 | 340 | <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> |
| ... | ... | @@ -322,10 +347,5 @@ |
| 322 | 347 | <!-- AdminLTE for demo purposes --> |
| 323 | 348 | <script src="../../static/js/sidebar.js"></script> |
| 324 | 349 | |
| 325 | - | |
| 326 | - | |
| 327 | - | |
| 328 | - | |
| 329 | - | |
| 330 | - | |
| 331 | -<div class="round_shade_box" id="zoom"> <div class="round_shade_top"> <span class="round_shade_topleft"> </span> <span class="round_shade_topright"> </span> </div> <div class="round_shade_centerleft"> <div class="round_shade_centerright"> <div class="round_shade_center" id="zoom_content"> </div> </div> </div> <div class="round_shade_bottom"> <span class="round_shade_bottomleft"> </span> <span class="round_shade_bottomright"> </span> </div> <a href="http://shenhe.cnlive.com/videos/detail/2795?state=0#close" class="round_box_close" id="zoom_close">关闭</a> </div></body></html> | |
| 332 | 350 | \ No newline at end of file |
| 351 | +</body> | |
| 352 | +</html> | |
| 333 | 353 | \ No newline at end of file | ... | ... |