Commit 88ce356468cdefba71722f0846877d345913893c
Merge branch 'master' of http://bj.gitlab.cnlive.com/liujicheng/cnlive_live_web into v532
# Conflicts: # target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties
Showing
11 changed files
with
56 additions
and
75 deletions
src/main/java/com/cnlive/mz/live/action/LiveAction.java
| ... | ... | @@ -124,8 +124,8 @@ public class LiveAction { |
| 124 | 124 | if (live_url.isEmpty()) { |
| 125 | 125 | return null; |
| 126 | 126 | } else { |
| 127 | - int index = live_url.lastIndexOf("live"); | |
| 128 | - String streamName = live_url.substring(index + 6); | |
| 127 | + int index = live_url.lastIndexOf("/"); | |
| 128 | + String streamName = live_url.substring(index + 1); | |
| 129 | 129 | System.out.println("streamName===" + streamName); |
| 130 | 130 | String accesskey = BaseUtil.getAccessKey(); |
| 131 | 131 | accesskey = java.net.URLEncoder.encode(accesskey, "utf-8"); |
| ... | ... | @@ -138,12 +138,12 @@ public class LiveAction { |
| 138 | 138 | // 断流。 |
| 139 | 139 | try { |
| 140 | 140 | addBlackList(signature, accesskey, expire, streamName); |
| 141 | - delBlackList(delsignature, accesskey, expire, streamName); | |
| 141 | + //delBlackList(delsignature, accesskey, expire, streamName); | |
| 142 | 142 | } catch (UnsupportedEncodingException e) { |
| 143 | 143 | e.printStackTrace(); |
| 144 | 144 | } |
| 145 | 145 | // 直播通知 |
| 146 | - // tLiveService.notify(video_uuid, "-1"); | |
| 146 | + //tLiveService.notify(video_uuid, -1); | |
| 147 | 147 | boolean flag = tCheckService.closeLive(id); |
| 148 | 148 | return new Result(flag); |
| 149 | 149 | } |
| ... | ... | @@ -175,7 +175,6 @@ public class LiveAction { |
| 175 | 175 | public String addBlackList(String signature, String accesskey, String expire, String streamName) throws UnsupportedEncodingException { |
| 176 | 176 | String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey + "&expire=" + expire |
| 177 | 177 | + "&app=live&method=add&name=" + streamName; |
| 178 | - System.out.println(url); | |
| 179 | 178 | String jsonArrStr = HttpReq.getRequestWidthResult(url); |
| 180 | 179 | int status = HttpReq.getRequest(url); |
| 181 | 180 | System.out.println(status + "......and......" + jsonArrStr); |
| ... | ... | @@ -195,7 +194,6 @@ public class LiveAction { |
| 195 | 194 | public Object delBlackList(String signature, String accesskey, String expire, String streamName) throws UnsupportedEncodingException { |
| 196 | 195 | String url = "http://cnlive.dashboard.ks-cdn.com/blacklist?signature=" + signature + "&accesskey=" + accesskey + "&expire=" + expire |
| 197 | 196 | + "&app=live&method=del&name=" + streamName; |
| 198 | - System.out.println("..url.." + url); | |
| 199 | 197 | String jsonArrStr = HttpReq.getRequestWidthResult(url); |
| 200 | 198 | System.out.println("..jsonArrStr.." + jsonArrStr); |
| 201 | 199 | return jsonArrStr; |
| ... | ... | @@ -209,15 +207,23 @@ public class LiveAction { |
| 209 | 207 | return new View("live/all_live_management.jsp").data("tLive", tLive); |
| 210 | 208 | } |
| 211 | 209 | |
| 212 | - @Request.Post("/live/search/{page_number}") | |
| 210 | + @Request.Get("/live/search/{page_number}") | |
| 213 | 211 | public View search(int page_number, Params params) { |
| 214 | 212 | int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); |
| 215 | 213 | System.out.println(user_id); |
| 216 | 214 | System.out.println("...parmas..." + params); |
| 217 | 215 | String t_user_id = params.getString("search_user_id"); |
| 218 | 216 | String title = params.getString("search_title"); |
| 217 | + | |
| 218 | + try { | |
| 219 | + title = new String(title.trim().getBytes("ISO-8859-1"), "utf-8"); | |
| 220 | + System.out.println("...title.."+title); | |
| 221 | + } catch (UnsupportedEncodingException e) { | |
| 222 | + e.printStackTrace(); | |
| 223 | + } | |
| 224 | + | |
| 219 | 225 | Pager<TLive> tLive = tLiveService.getTLiveAllPager(page_number, Constants.PAGE_SIZE, t_user_id, title); |
| 220 | - System.out.println(tLive); | |
| 226 | + System.out.println("tLive====="+tLive); | |
| 221 | 227 | return new View("live/all_live_management.jsp").data("tLive", tLive); |
| 222 | 228 | } |
| 223 | 229 | ... | ... |
src/main/java/com/cnlive/mz/live/action/VideoAction.java
| ... | ... | @@ -242,7 +242,7 @@ public class VideoAction { |
| 242 | 242 | @Request.Post("/video/unline") |
| 243 | 243 | public Result underLine(Params params) { |
| 244 | 244 | int id = params.getInt("id"); |
| 245 | - tVideoService.underLine(id); | |
| 246 | - return null; | |
| 245 | + boolean flag = tVideoService.underLine(id); | |
| 246 | + return new Result(flag); | |
| 247 | 247 | } |
| 248 | 248 | } | ... | ... |
src/main/webapp/pages/common/left.jsp
| ... | ... | @@ -57,7 +57,7 @@ |
| 57 | 57 | <a href="${BASE}/channel/list/1"><i class="fa fa-circle-o text-green"></i>频道管理</a> |
| 58 | 58 | </li> |
| 59 | 59 | </c:if> |
| 60 | - <c:if test="${sessionScope.roleId=='2'}"> | |
| 60 | + <c:if test="true"> | |
| 61 | 61 | <li class="header">UGC直播审查</li> |
| 62 | 62 | <li> |
| 63 | 63 | <a href="${BASE}/user/list/1"><i class="fa fa-circle-o text-yellow"></i>主播管理</a> | ... | ... |
src/main/webapp/pages/live/all_live_management.jsp
| ... | ... | @@ -32,11 +32,11 @@ |
| 32 | 32 | <div class="row"> |
| 33 | 33 | <div class="col-xs-12"> |
| 34 | 34 | <div class="box box-warning"> |
| 35 | - <div class="box-header with-border"> | |
| 35 | + <div class="box-header with-border"> | |
| 36 | 36 | <h3 class="box-title"></h3> |
| 37 | 37 | <div class="box-tools"> |
| 38 | 38 | <div class="input-group"> |
| 39 | - <form role = "form"> | |
| 39 | + <form role="form" action="../../live/search/1" method="get"> | |
| 40 | 40 | <div class="input-group"> |
| 41 | 41 | <input type="text" name="search_user_id" id="search_user_id" |
| 42 | 42 | class="form-control input-sm" style="width: 150px;" |
| ... | ... | @@ -44,10 +44,9 @@ |
| 44 | 44 | name="search_title" id="search_title" |
| 45 | 45 | class="form-control input-sm" style="width: 150px;" |
| 46 | 46 | placeholder="活动名称" /> |
| 47 | - <button id="t_activity_search_btn" onclick="search()" | |
| 48 | - class="btn btn-sm btn-default"> | |
| 47 | + <button type="submit" class="btn btn-sm btn-default"> | |
| 49 | 48 | <i class="fa fa-search"></i>搜索 |
| 50 | - </button> | |
| 49 | + </button> | |
| 51 | 50 | </div> |
| 52 | 51 | </form> |
| 53 | 52 | </div> |
| ... | ... | @@ -74,8 +73,7 @@ |
| 74 | 73 | <td><fmt:formatDate value="${item.start_time}" |
| 75 | 74 | pattern="yyyy-MM-dd HH:mm" /></td> |
| 76 | 75 | <td>${item.end_time}</td> |
| 77 | - <td><c:if | |
| 78 | - test="${item.t_status_id==0}"> | |
| 76 | + <td><c:if test="${item.t_status_id==0}"> | |
| 79 | 77 | <span class="badge bg-green">未开始</span> |
| 80 | 78 | </c:if> <c:if test="${item.t_status_id==2}"> |
| 81 | 79 | <span class="badge bg-green">正常结束</span> |
| ... | ... | @@ -86,6 +84,10 @@ |
| 86 | 84 | </c:if></td> |
| 87 | 85 | |
| 88 | 86 | <td> |
| 87 | + <%-- <button type="button" class="btn btn-xs btn-success" id="down" onclick="t_live_close('${item.id}','${item.uuid}');"> | |
| 88 | + <i class="icon-upload"></i>下线 | |
| 89 | + </button> --%> | |
| 90 | + | |
| 89 | 91 | <button class="btn btn-danger btn-sm" |
| 90 | 92 | onclick="t_live_close('${item.id}','${item.uuid}');"> |
| 91 | 93 | <i class="fa fa-close"></i> |
| ... | ... | @@ -104,18 +106,10 @@ |
| 104 | 106 | </div> |
| 105 | 107 | </div> |
| 106 | 108 | </div> |
| 107 | - </section> | |
| 109 | + </section> | |
| 108 | 110 | </div> |
| 109 | 111 | <%@ include file="/pages/common/bottom.jsp"%> |
| 110 | 112 | </div> |
| 111 | 113 | <%@ include file="/pages/common/js.jsp"%> |
| 112 | 114 | </body> |
| 113 | -<script type="text/javascript"> | |
| 114 | - function search(){ | |
| 115 | - var search_user_id = $("#search_user_id").val(); | |
| 116 | - var search_title = $("#search_title").val(); | |
| 117 | - window.location.href ="../search/1?search_user_id="+search_user_id+"&search_title="+search_title ; | |
| 118 | - alert(window.location.href); | |
| 119 | - } | |
| 120 | -</script> | |
| 121 | 115 | </html> | ... | ... |
src/main/webapp/static/assets/ck/ckplayer/ckplayer.js
| ... | ... | @@ -295,19 +295,7 @@ function ckstyle() { //定义总的风格 |
| 295 | 295 | 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 |
| 296 | 296 | ------------------------------------------------------------------------------------------------------------------ |
| 297 | 297 | */ |
| 298 | - cpt_lights: '1', | |
| 299 | - /* | |
| 300 | - 该处定义是否使用开关灯,和right.swf插件配合作用,使用开灯效果时调用页面的js函数function closelights(){}; | |
| 301 | - */ | |
| 302 | - cpt_share: 'ckplayer/share.xml', | |
| 303 | - /* | |
| 304 | - 分享插件调用的配置文件地址 | |
| 305 | - 调用插件开始 | |
| 306 | - */ | |
| 307 | - cpt_list: ckcpt() | |
| 308 | - /* | |
| 309 | - ckcpt()是本文件最上方的定义插件的函数 | |
| 310 | - */ | |
| 298 | + | |
| 311 | 299 | } |
| 312 | 300 | return ck; |
| 313 | 301 | } | ... | ... |
src/main/webapp/static/assets/ck/ckplayer/ckplayer.xml
| ... | ... | @@ -259,22 +259,5 @@ |
| 259 | 259 | 跳过广告和播放结束时调用的js函数 |
| 260 | 260 | --> |
| 261 | 261 | <myweb></myweb> |
| 262 | - | |
| 263 | - <!-- | |
| 264 | - 以下内容部份是和插件相关的配置,请注意,自定义插件以及其配置的命名方式要注意,不要和系统的相重复,不然就会替换掉系统的相关设置,删除相关插件的话也可以同时删除相关的配置 | |
| 265 | - 以下内容定义自定义插件的相关配置,这里也可以自定义任何自己的插件需要配置的内容,当然,如果你某个插件不使用的话,也可以删除相关的配置 | |
| 266 | - --> | |
| 267 | - <cpt_lights>0</cpt_lights> | |
| 268 | - <!-- | |
| 269 | - 该处定义是否使用开关灯,和right.swf插件配合作用,使用开灯效果时调用页面的js函数function closelights(){}; | |
| 270 | - --> | |
| 271 | - <cpt_share>/ckplayer/share.xml</cpt_share> | |
| 272 | - <!-- | |
| 273 | - 分享插件调用的配置文件地址 | |
| 274 | - 调用插件开始 | |
| 275 | - --> | |
| 276 | - <!-- <cpt>right.swf,2,1,0,0,2,0</cpt>右边开关灯,调整,分享按钮的插件 | |
| 277 | - <cpt>share.swf,1,1,-180,-100,3,0</cpt>分享插件 | |
| 278 | - <cpt>adjustment.swf,1,1,-180,-100,3,0</cpt>调整大小和颜色的插件 --> | |
| 279 | 262 | </style> |
| 280 | 263 | </ckplayer> |
| 281 | 264 | \ No newline at end of file | ... | ... |
src/main/webapp/static/assets/cnlive/js/all_live.js
src/main/webapp/static/assets/cnlive/js/common.js
| ... | ... | @@ -6,20 +6,6 @@ |
| 6 | 6 | function next_page(pageNum) { |
| 7 | 7 | window.location.href = "" + pageNum; |
| 8 | 8 | } |
| 9 | -function next_pager(pageNum) { | |
| 10 | - $.ajax({ | |
| 11 | - url : '../../live/searchg/' + pageNum, | |
| 12 | - type : 'post', | |
| 13 | - datatype : "json", | |
| 14 | - async : true, | |
| 15 | - error : function() { | |
| 16 | - }, | |
| 17 | - success : function(data) { | |
| 18 | - location.href = '../../live/search/'+pageNum; | |
| 19 | - } | |
| 20 | - }); | |
| 21 | - | |
| 22 | -} | |
| 23 | 9 | |
| 24 | 10 | // 提示 |
| 25 | 11 | function showTip(succ) { | ... | ... |
src/main/webapp/static/assets/cnlive/js/global.js
| 1 | 1 | var BASE; // Context Path(在 script.jsp 中初始化) |
| 2 | - | |
| 2 | +function next_page(pageNum){ | |
| 3 | + window.location.href = "" + pageNum+window.location.search; | |
| 4 | + alert(window.location.search); | |
| 5 | +} | |
| 3 | 6 | var Smart = { |
| 4 | 7 | /* -------------------------------------------------- 函数 -------------------------------------------------- */ |
| 5 | 8 | Validator: { |
| ... | ... | @@ -146,7 +149,7 @@ $(function() { |
| 146 | 149 | }); |
| 147 | 150 | |
| 148 | 151 | // 设置 form 默认为 post 类型 |
| 149 | - $('form').attr('method', 'post'); | |
| 152 | + // $('form').attr('method', 'post'); | |
| 150 | 153 | |
| 151 | 154 | // 全局 AJAX 设置 |
| 152 | 155 | $.ajaxSetup({ | ... | ... |
src/main/webapp/static/assets/cnlive/js/live.js
| ... | ... | @@ -491,4 +491,19 @@ function t_live_underLine(id){ |
| 491 | 491 | } |
| 492 | 492 | }); |
| 493 | 493 | } |
| 494 | - | |
| 494 | +function checkUser(){ | |
| 495 | + var search_user_id = $("#search_user_id").val(); | |
| 496 | + var search_title = $("#search_title").val(); | |
| 497 | + $.ajax({ | |
| 498 | + url:'../../live/search/1', | |
| 499 | + type:'post', | |
| 500 | + datatype : 'json', | |
| 501 | + error : function() { | |
| 502 | + alert('下线时发生错误!'); | |
| 503 | + }, | |
| 504 | + success : function(data) { | |
| 505 | + //location.href = "../../live/search/1?search_user_id="+search_user_id+"&search_title="+search_title; | |
| 506 | + //alert(location.href); | |
| 507 | + } | |
| 508 | + }); | |
| 509 | +} | ... | ... |
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties
| ... | ... | @@ -5,3 +5,10 @@ groupId=com.cnlive.mz.live.web |
| 5 | 5 | m2e.projectName=cnlive_live_web |
| 6 | 6 | m2e.projectLocation=D\:\\1_CNLIVE_JAVA_CODE\\cnlive_live_web |
| 7 | 7 | artifactId=cnlive_live_web |
| 8 | +#Generated by Maven Integration for Eclipse | |
| 9 | +#Fri Jun 24 09:13:59 CST 2016 | |
| 10 | +version=0.0.1-SNAPSHOT | |
| 11 | +groupId=com.cnlive.mz.live.web | |
| 12 | +m2e.projectName=cnlive_live_web | |
| 13 | +m2e.projectLocation=C\:\\Users\\Administrator\\git\\cnlive_live_web | |
| 14 | +artifactId=cnlive_live_web | ... | ... |