作者 lianghiu
此 diff 太大无法显示。
@@ -204,4 +204,21 @@ class BookingController extends AdminBaseController @@ -204,4 +204,21 @@ class BookingController extends AdminBaseController
204 $this->assign('page', $list->render()); 204 $this->assign('page', $list->render());
205 return $this->fetch(); 205 return $this->fetch();
206 } 206 }
  207 +
  208 + public function delete(){
  209 + $param = $this->request->param();
  210 + if(!$param){
  211 + return json(['code'=>'0','msg'=>'数据错误']);
  212 + }
  213 + $res = Db::name('yuyue')
  214 + ->where(['id'=>$param['id']])
  215 + ->delete();
  216 +
  217 + if ($res){
  218 + return json(['code'=>'1','msg'=>'删除成功']);
  219 + }else{
  220 + return json(['code'=>'0','msg'=>'删除失败']);
  221 + }
  222 + }
  223 +
207 } 224 }
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <th width="50">预约时段</th> 40 <th width="50">预约时段</th>
41 <th width="50">预定时间</th> 41 <th width="50">预定时间</th>
42 <th width="50">状态</th> 42 <th width="50">状态</th>
43 - <!--<th width="120">操作</th>--> 43 + <th width="120">操作</th>
44 </tr> 44 </tr>
45 </thead> 45 </thead>
46 <foreach name="list" item="vo"> 46 <foreach name="list" item="vo">
@@ -57,10 +57,9 @@ @@ -57,10 +57,9 @@
57 57
58 </td> 58 </td>
59 <td>{$vo.status|yuyue_status_name}</td> 59 <td>{$vo.status|yuyue_status_name}</td>
60 - <!--<td>-->  
61 - <!--<a href="{:url('edit',array('id'=>$vo['id']))}">查看/编辑</a>-->  
62 - <!--<a href="{:url('delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>-->  
63 - <!--</td>--> 60 + <td>
  61 + <a href="{:url('delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
  62 + </td>
64 </tr> 63 </tr>
65 </foreach> 64 </foreach>
66 65
@@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
60 <div class="yuyueList"> 60 <div class="yuyueList">
61 <div class="yList_top"> 61 <div class="yList_top">
62 <b>{$vo.status|yuyue_status_name}</b> 62 <b>{$vo.status|yuyue_status_name}</b>
63 - <i>{$vo.create_time|date="Y-m-d",###}</i> 63 + <i>{$vo.yuyue_day|date_to_date}</i>
64 </div> 64 </div>
65 <div class="yList_info"> 65 <div class="yList_info">
66 <img src="{$vo.headimgurl}" class="yu_user_head"/> 66 <img src="{$vo.headimgurl}" class="yu_user_head"/>
@@ -116,7 +116,7 @@ @@ -116,7 +116,7 @@
116 <div class="yuyueList"> 116 <div class="yuyueList">
117 <div class="yList_top"> 117 <div class="yList_top">
118 <b>{$vo.status|yuyue_status_name}</b> 118 <b>{$vo.status|yuyue_status_name}</b>
119 - <i>{$vo.create_time|date="Y-m-d",###}</i> 119 + <i>{$vo.yuyue_day|date_to_date}</i>
120 </div> 120 </div>
121 <div class="yList_info"> 121 <div class="yList_info">
122 <img src="{$vo.headimgurl}" class="yu_user_head"/> 122 <img src="{$vo.headimgurl}" class="yu_user_head"/>
@@ -172,7 +172,7 @@ @@ -172,7 +172,7 @@
172 <div class="yuyueList"> 172 <div class="yuyueList">
173 <div class="yList_top"> 173 <div class="yList_top">
174 <b>{$vo.status|yuyue_status_name}</b> 174 <b>{$vo.status|yuyue_status_name}</b>
175 - <i>{$vo.create_time|date="Y-m-d",###}</i> 175 + <i>{$vo.yuyue_day|date_to_date}</i>
176 </div> 176 </div>
177 <div class="yList_info"> 177 <div class="yList_info">
178 <img src="{$vo.headimgurl}" class="yu_user_head"/> 178 <img src="{$vo.headimgurl}" class="yu_user_head"/>
@@ -228,7 +228,7 @@ @@ -228,7 +228,7 @@
228 <div class="yuyueList"> 228 <div class="yuyueList">
229 <div class="yList_top"> 229 <div class="yList_top">
230 <b>{$vo.status|yuyue_status_name}</b> 230 <b>{$vo.status|yuyue_status_name}</b>
231 - <i>{$vo.create_time|date="Y-m-d",###}</i> 231 + <i>{$vo.yuyue_day|date_to_date}</i>
232 </div> 232 </div>
233 <div class="yList_info"> 233 <div class="yList_info">
234 <img src="{$vo.headimgurl}" class="yu_user_head"/> 234 <img src="{$vo.headimgurl}" class="yu_user_head"/>
@@ -284,7 +284,7 @@ @@ -284,7 +284,7 @@
284 <div class="yuyueList"> 284 <div class="yuyueList">
285 <div class="yList_top"> 285 <div class="yList_top">
286 <b>{$vo.status|yuyue_status_name}</b> 286 <b>{$vo.status|yuyue_status_name}</b>
287 - <i>{$vo.create_time|date="Y-m-d",###}</i> 287 + <i>{$vo.yuyue_day|date_to_date}</i>
288 </div> 288 </div>
289 <div class="yList_info"> 289 <div class="yList_info">
290 <img src="{$vo.headimgurl}" class="yu_user_head"/> 290 <img src="{$vo.headimgurl}" class="yu_user_head"/>