Commit b1363a259a1686c3e7d6838e54f2fa784db31eac
1 parent
d528314d
mm
Showing
3 changed files
with
17 additions
and
11 deletions
src/main/java/com/cnlive/mz/live/action/LiveAction.java
| @@ -123,26 +123,26 @@ public class LiveAction { | @@ -123,26 +123,26 @@ public class LiveAction { | ||
| 123 | if(live_url.isEmpty()){ | 123 | if(live_url.isEmpty()){ |
| 124 | return null; | 124 | return null; |
| 125 | }else{ | 125 | }else{ |
| 126 | - int index = live_url.lastIndexOf("live"); | ||
| 127 | - String streamName = live_url.substring(index+6); | 126 | + int index = live_url.lastIndexOf("/"); |
| 127 | + String streamName = live_url.substring(index+1); | ||
| 128 | System.out.println("streamName==="+streamName); | 128 | System.out.println("streamName==="+streamName); |
| 129 | String accesskey = BaseUtil.getAccessKey(); | 129 | String accesskey = BaseUtil.getAccessKey(); |
| 130 | accesskey = java.net.URLEncoder.encode(accesskey,"utf-8"); | 130 | accesskey = java.net.URLEncoder.encode(accesskey,"utf-8"); |
| 131 | String add = "add"; | 131 | String add = "add"; |
| 132 | - String signature = BaseUtil.signature(add,streamName); | 132 | + String addsignature = BaseUtil.signature(add,streamName); |
| 133 | String del = "del"; | 133 | String del = "del"; |
| 134 | String delsignature = BaseUtil.signature(del,streamName); | 134 | String delsignature = BaseUtil.signature(del,streamName); |
| 135 | String expire = BaseUtil.getTimestamp(); | 135 | String expire = BaseUtil.getTimestamp(); |
| 136 | System.out.println(expire+"---expire---"); | 136 | System.out.println(expire+"---expire---"); |
| 137 | //断流。 | 137 | //断流。 |
| 138 | try { | 138 | try { |
| 139 | - addBlackList(signature,accesskey,expire,streamName); | 139 | + addBlackList(addsignature,accesskey,expire,streamName); |
| 140 | delBlackList(delsignature,accesskey,expire,streamName); | 140 | delBlackList(delsignature,accesskey,expire,streamName); |
| 141 | } catch (UnsupportedEncodingException e) { | 141 | } catch (UnsupportedEncodingException e) { |
| 142 | e.printStackTrace(); | 142 | e.printStackTrace(); |
| 143 | } | 143 | } |
| 144 | // 直播通知 | 144 | // 直播通知 |
| 145 | - // tLiveService.notify(video_uuid, "-1",-2); | 145 | + tLiveService.notify(video_uuid, -2); |
| 146 | boolean flag = tCheckService.closeLive(id); | 146 | boolean flag = tCheckService.closeLive(id); |
| 147 | return new Result(flag); | 147 | return new Result(flag); |
| 148 | } | 148 | } |
| @@ -218,7 +218,7 @@ public class LiveAction { | @@ -218,7 +218,7 @@ public class LiveAction { | ||
| 218 | Pager<TLive> tLive = tLiveService.getTLivePager(page_number, Constants.PAGE_SIZE); | 218 | Pager<TLive> tLive = tLiveService.getTLivePager(page_number, Constants.PAGE_SIZE); |
| 219 | return new View("live/all_live_management.jsp").data("tLive", tLive); | 219 | return new View("live/all_live_management.jsp").data("tLive", tLive); |
| 220 | } | 220 | } |
| 221 | - @Request.Post("/live/search/{page_number}") | 221 | + @Request.Get("/live/search/{page_number}") |
| 222 | public View search(int page_number,Params params) { | 222 | public View search(int page_number,Params params) { |
| 223 | int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); | 223 | int user_id = CastUtil.castInt(DataContext.getRequest().getSession().getAttribute(LiveUtils.SESSION_KEY_ID)); |
| 224 | System.out.println(user_id); | 224 | System.out.println(user_id); |
src/main/webapp/pages/live/all_live_management.jsp
| @@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
| 35 | <h3 class="box-title"></h3> | 35 | <h3 class="box-title"></h3> |
| 36 | <div class="box-tools"> | 36 | <div class="box-tools"> |
| 37 | <div class="input-group"> | 37 | <div class="input-group"> |
| 38 | - <form role = "form" action="../search/1" method="get"> | 38 | + <form role = "form"> |
| 39 | <div class="input-group"> | 39 | <div class="input-group"> |
| 40 | <input type="text" name="search_user_id" id="search_user_id" | 40 | <input type="text" name="search_user_id" id="search_user_id" |
| 41 | class="form-control input-sm" style="width: 150px;" | 41 | class="form-control input-sm" style="width: 150px;" |
| @@ -43,7 +43,7 @@ | @@ -43,7 +43,7 @@ | ||
| 43 | <input type="text" name="search_title" id="search_title" | 43 | <input type="text" name="search_title" id="search_title" |
| 44 | class="form-control input-sm" style="width: 150px;" | 44 | class="form-control input-sm" style="width: 150px;" |
| 45 | placeholder="活动名称" /> | 45 | placeholder="活动名称" /> |
| 46 | - <button id="t_activity_search_btn" type="submit" | 46 | + <button id="t_activity_search_btn" onclick="search()" |
| 47 | class="btn btn-sm btn-default"> | 47 | class="btn btn-sm btn-default"> |
| 48 | <i class="fa fa-search"></i>搜索 | 48 | <i class="fa fa-search"></i>搜索 |
| 49 | </button> | 49 | </button> |
| @@ -110,4 +110,12 @@ | @@ -110,4 +110,12 @@ | ||
| 110 | </div> | 110 | </div> |
| 111 | <%@ include file="/pages/common/js.jsp"%> | 111 | <%@ include file="/pages/common/js.jsp"%> |
| 112 | </body> | 112 | </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> | ||
| 113 | </html> | 121 | </html> |
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties
| 1 | #Generated by Maven Integration for Eclipse | 1 | #Generated by Maven Integration for Eclipse |
| 2 | -#Mon Jun 20 09:31:18 CST 2016 | ||
| 3 | -#Mon Jun 20 10:10:00 CST 2016 | ||
| 4 | -#Fri Jun 17 09:20:43 CST 2016 | 2 | +#Tue Jun 21 09:00:02 CST 2016 |
| 5 | version=0.0.1-SNAPSHOT | 3 | version=0.0.1-SNAPSHOT |
| 6 | groupId=com.cnlive.mz.live.web | 4 | groupId=com.cnlive.mz.live.web |
| 7 | m2e.projectName=cnlive_live_web | 5 | m2e.projectName=cnlive_live_web |