正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
@@ -135,9 +135,11 @@ class YuyueController extends UserBaseController | @@ -135,9 +135,11 @@ class YuyueController extends UserBaseController | ||
135 | } else { | 135 | } else { |
136 | $data['teach_id'] = intval($tech_id); | 136 | $data['teach_id'] = intval($tech_id); |
137 | $data['uid'] = session('user.id'); | 137 | $data['uid'] = session('user.id'); |
138 | + $data['status'] = array('neq','3'); | ||
138 | 139 | ||
139 | //预约订单完成后才可以再次预约 | 140 | //预约订单完成后才可以再次预约 |
140 | $rr = Db::name('yuyue')->where($data)->order('create_time', 'desc')->find(); | 141 | $rr = Db::name('yuyue')->where($data)->order('create_time', 'desc')->find(); |
142 | + unset($data['status']); | ||
141 | $ytime = strtotime($rr['yuyue_day'].''.$rr['yuyue_end'].':00'); | 143 | $ytime = strtotime($rr['yuyue_day'].''.$rr['yuyue_end'].':00'); |
142 | $tt = time(); | 144 | $tt = time(); |
143 | if ( $ytime >$tt) { | 145 | if ( $ytime >$tt) { |
@@ -286,7 +288,9 @@ class YuyueController extends UserBaseController | @@ -286,7 +288,9 @@ class YuyueController extends UserBaseController | ||
286 | $data['yuyue_begin'] = $begin; | 288 | $data['yuyue_begin'] = $begin; |
287 | $data['yuyue_end'] = $end; | 289 | $data['yuyue_end'] = $end; |
288 | $data['yuyue_week'] = $week; | 290 | $data['yuyue_week'] = $week; |
291 | + $data['status'] = array('neq','3'); | ||
289 | $ress = Db::name('yuyue')->where($data)->find(); | 292 | $ress = Db::name('yuyue')->where($data)->find(); |
293 | + unset($data['status']); | ||
290 | if($ress){ | 294 | if($ress){ |
291 | return json(['code'=>'0','msg'=>'抱歉,您已经预约过']); | 295 | return json(['code'=>'0','msg'=>'抱歉,您已经预约过']); |
292 | } | 296 | } |
-
请 注册 或 登录 后发表评论