Commit 33bf92f7ad36ce05ee2e9de6618b16f9d0e763c3

Authored by luoyanshou
1 parent 205808d9

【留言板】逻辑完善

trunk/www/apidocassets/javascript/mess_admin.js
... ... @@ -14,7 +14,7 @@ function jumpDel(mid)
14 14 return false;
15 15 }
16 16 $.ajax({
17   - url:'http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessDel/Del/?mid='+mid,
  17 + url:'http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessDel/Del/',
18 18 type:'post',
19 19 data:{
20 20 'mid':mid
... ... @@ -23,12 +23,17 @@ function jumpDel(mid)
23 23 success:function(data){
24 24 if (data['result'] == 1) {
25 25 alert("删除成功。");
  26 + console.log(data);
26 27 window.location.href = './list.php';
  28 + } else {
  29 + alert("删除失败。");
  30 + console.log('error:'+data);
  31 + return false;
27 32 }
28 33  
29 34 },
30 35 error:function(e){
31   - alert("删除失败。");
  36 + alert("ajax调用失败。");
32 37 console.log("error:"+e);
33 38 }
34 39 });
... ... @@ -56,15 +61,28 @@ function jumdAudit(mid)
56 61 }
57 62  
58 63 $.ajax({
59   - url:'',
60   - type:'',
61   - dataType:'',
  64 + url:'http://lys.com/wx5019b9c455ea9c81/Message/Apicp/Message/MessAudit/Audit/',
  65 + type:'post',
  66 + dataType:'json',
62 67 data:{
63 68 'mid':mid,
64 69 'status':status,
65 70 'reason':reason
66 71 },
67   - success:function(data){},
68   - error:function(e){}
  72 + success:function(data){
  73 + if(data['result'] == 1){
  74 + console.log(data);
  75 + alert('提交成功。');
  76 + window.location.href = './list.php';
  77 + return false;
  78 + }else{
  79 + alert('审核失败。');
  80 + console.log(data);
  81 + }
  82 + },
  83 + error:function(e){
  84 + alert('ajax调用失败。');
  85 + console.log('error:'+e);
  86 + }
69 87 });
70 88 }
... ...
trunk/www/mess_admin/detail.php
... ... @@ -182,7 +182,7 @@ if ($scenario == 'detail') {
182 182 </tr>
183 183 <tr></tr>
184 184 <?php
185   - if ($scenario == 'audit' && $mess_detail['m_status'] == 1) {
  185 + if ($scenario == 'audit' && ($mess_detail['m_status'] == 1 || $mess_detail['m_status'] == 2)) {
186 186 ?>
187 187 <tr>
188 188 <td>
... ...
trunk/www/mess_admin/list.php
... ... @@ -84,7 +84,7 @@
84 84 if ($value['m_status'] == 1) {
85 85 echo "<a href=detail.php?mid={$value['m_id']}&scenario=audit>审核</a> &nbsp;&nbsp;";
86 86 } else if($value['m_status'] == 2) {
87   - echo "<a href='##'>再次审核</a> &nbsp;&nbsp;";
  87 + echo "<a href='detail.php?mid={$value['m_id']}&scenario=audit'>再次审核</a> &nbsp;&nbsp;";
88 88 echo "<a onclick='javascript:jumpDel({$value['m_id']}); return false;'>删除</a> &nbsp;&nbsp;";
89 89 } else if($value['m_status'] == 3) {
90 90 echo "<a onclick='javascript:jumpDel({$value['m_id']}); return false;'>删除</a> &nbsp;&nbsp;";
... ...