Commit befde78daa598f0301163d3c781a112bc9e5dcf7

Authored by 王言钊
1 parent 75914104

活动管理优化1

src/main/resources/templates/page/activity.html
... ... @@ -95,7 +95,7 @@
95 95 <div class="box-body">
96 96 <div class="btn-group margin-bottom " style="padding: 0; width: 98%; float: right;">
97 97 <div class="columns columns-right btn-group ">
98   - <button class="btn btn-success" onclick="javascript:add(0)" type="button"
  98 + <button class="btn btn-success" onclick="javascript:add()" type="button"
99 99 name="refresh" title="添加" id="email_addS">添加
100 100 </button>
101 101 </div>
... ... @@ -116,12 +116,11 @@
116 116 <label for="sp_id" class="control-label cb-toolbar"
117 117 style="font-size: 15px; top: 8px; font-weight: 100;">是否审核:</label>
118 118 <div class="col-sm-7" style="padding: 0;">
119   -
120 119 <select class="form-control" id="exempt_from_trial_query"
121 120 name="exempt_from_trial">
122   - <option value="" name="-全部审免类型-" th:selected="selected">-全部审核类型-</option>
123   - <option value="0" name="未审核">未审免</option>
124   - <option value="1" name="已经审核">已经审免</option>
  121 + <option value="" th:selected="selected">--全部审免类型--</option>
  122 + <option value="0" name="未审核" th:selected="${shyActivity.exempt_from_trial}==0" >未审免</option>
  123 + <option value="1" name="已经审核" th:selected="${shyActivity.exempt_from_trial}==1" >已经审免</option>
125 124 </select>
126 125 </div>
127 126 </div>
... ... @@ -337,10 +336,10 @@
337 336 <div class="modal-body">
338 337 <form action="/activity/add" method="post" id="editWrite1">
339 338 <input type="text" name="redirect_url" value="" class="hide" id="redirect_url1"/>
340   - <div class="form-group hide">
341   - <label class="control-label col-sm-3" style="font-size: 15px;">Id:</label>
  339 + <div class="form-group">
  340 + <label class="control-label col-sm-3" style="font-size: 15px;">活动ID:</label>
342 341 <div class="col-sm-9" style="margin-top: -5px;margin-bottom: 20px;">
343   - <input class="form-control" style="width:30%;" type="text" value="" id="id1" name="id">
  342 + <input class="form-control" style="width:40%;" type="text" value="" id="id1" name="id">
344 343 </div>
345 344 </div>
346 345 <div class="form-group">
... ... @@ -351,14 +350,6 @@
351 350 </div>
352 351 </div>
353 352  
354   - <div class="form-group">
355   - <label class="control-label col-sm-3" style="font-size: 15px;">审核类型:</label>
356   - <div class="col-sm-9" style="margin-top: -5px;margin-bottom: 20px;">
357   - <input class="form-control" style="width:40%;" type="text" value="0"
358   - id="exempt_from_trial1"
359   - name="exempt_from_trial">
360   - </div>
361   - </div>
362 353  
363 354 </form>
364 355 </div>
... ... @@ -375,9 +366,9 @@
375 366 <script>
376 367 // 添加事件
377 368 function submitAdd() {
  369 + var id1 = $("#id1").val();
378 370 var activity1 = $("#activity1").val();
379   - var exempt_from_trial1 = $("#exempt_from_trial1").val();
380   - $.post("/activity/add?activity=" + activity1 + "&exempt_from_trial=" + exempt_from_trial1, function (data) {
  371 + $.post("/activity/add?id=" + id1 + "&activity=" + activity1, function (data) {
381 372 if (data.errorCode == 0) {
382 373 alert(data.errorMessage);
383 374 location.href = location.href;
... ... @@ -416,12 +407,10 @@
416 407 }
417 408  
418 409 //打开添加窗口
419   - function add(exempt_from_trial) {
420   - $("#id1").val("");
421   - $("#activity1").val("");
  410 + function add() {
  411 + $("#id1").val();
  412 + $("#activity1").val();
422 413 $("#activity1").removeAttr("readonly");
423   - $("#exempt_from_trial1").val(exempt_from_trial);
424   - $("#exempt_from_trial1").attr("readonly", "true");
425 414 $(".write_check input").prop("checked", false);
426 415 $("#redirect_url1").val(location.pathname + location.search);
427 416 $("#myModalLabel1").text("添加活动名称");
... ...
src/main/resources/templates/page/video.html
... ... @@ -146,10 +146,7 @@
146 146 th:value="${activitys.id}"
147 147 th:text="${activitys.activity}">
148 148 </option>
149   -
150 149 </select>
151   -
152   - <!--< input class="form-control" name="video_priority" type="text" id="video_priority">-->
153 150 </div>
154 151 </div>
155 152 </div>
... ...