作者 lianghiu
此 diff 太大无法显示。
... ... @@ -204,4 +204,21 @@ class BookingController extends AdminBaseController
$this->assign('page', $list->render());
return $this->fetch();
}
public function delete(){
$param = $this->request->param();
if(!$param){
return json(['code'=>'0','msg'=>'数据错误']);
}
$res = Db::name('yuyue')
->where(['id'=>$param['id']])
->delete();
if ($res){
return json(['code'=>'1','msg'=>'删除成功']);
}else{
return json(['code'=>'0','msg'=>'删除失败']);
}
}
}
\ No newline at end of file
... ...
... ... @@ -40,7 +40,7 @@
<th width="50">预约时段</th>
<th width="50">预定时间</th>
<th width="50">状态</th>
<!--<th width="120">操作</th>-->
<th width="120">操作</th>
</tr>
</thead>
<foreach name="list" item="vo">
... ... @@ -57,10 +57,9 @@
</td>
<td>{$vo.status|yuyue_status_name}</td>
<!--<td>-->
<!--<a href="{:url('edit',array('id'=>$vo['id']))}">查看/编辑</a>-->
<!--<a href="{:url('delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>-->
<!--</td>-->
<td>
<a href="{:url('delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
</td>
</tr>
</foreach>
... ...
... ... @@ -60,7 +60,7 @@
<div class="yuyueList">
<div class="yList_top">
<b>{$vo.status|yuyue_status_name}</b>
<i>{$vo.create_time|date="Y-m-d",###}</i>
<i>{$vo.yuyue_day|date_to_date}</i>
</div>
<div class="yList_info">
<img src="{$vo.headimgurl}" class="yu_user_head"/>
... ... @@ -116,7 +116,7 @@
<div class="yuyueList">
<div class="yList_top">
<b>{$vo.status|yuyue_status_name}</b>
<i>{$vo.create_time|date="Y-m-d",###}</i>
<i>{$vo.yuyue_day|date_to_date}</i>
</div>
<div class="yList_info">
<img src="{$vo.headimgurl}" class="yu_user_head"/>
... ... @@ -172,7 +172,7 @@
<div class="yuyueList">
<div class="yList_top">
<b>{$vo.status|yuyue_status_name}</b>
<i>{$vo.create_time|date="Y-m-d",###}</i>
<i>{$vo.yuyue_day|date_to_date}</i>
</div>
<div class="yList_info">
<img src="{$vo.headimgurl}" class="yu_user_head"/>
... ... @@ -228,7 +228,7 @@
<div class="yuyueList">
<div class="yList_top">
<b>{$vo.status|yuyue_status_name}</b>
<i>{$vo.create_time|date="Y-m-d",###}</i>
<i>{$vo.yuyue_day|date_to_date}</i>
</div>
<div class="yList_info">
<img src="{$vo.headimgurl}" class="yu_user_head"/>
... ... @@ -284,7 +284,7 @@
<div class="yuyueList">
<div class="yList_top">
<b>{$vo.status|yuyue_status_name}</b>
<i>{$vo.create_time|date="Y-m-d",###}</i>
<i>{$vo.yuyue_day|date_to_date}</i>
</div>
<div class="yList_info">
<img src="{$vo.headimgurl}" class="yu_user_head"/>
... ...