作者 sgj
1 个管道 的构建 失败 耗费 3 秒

修改提交 会弹窗

@@ -147,7 +147,16 @@ class YuyueController extends UserBaseController @@ -147,7 +147,16 @@ class YuyueController extends UserBaseController
147 // } 147 // }
148 $data['status'] = '1'; 148 $data['status'] = '1';
149 $data['create_time'] = time(); 149 $data['create_time'] = time();
150 - 150 + /*查询是否有相关信息*/
  151 + $map['yuyue_day']=session('yuyue_pre.day');
  152 + $map['yuyue_week'] = session('yuyue_pre.week');
  153 + $map['yuyue_end'] = session('yuyue_pre.end');
  154 + $map['yuyue_begin'] = session('yuyue_pre.begin');
  155 + $map['teach_id'] = intval($tech_id);
  156 + $isin=\db('yuyue')->where($map)->find();
  157 + if (!empty($isin)){
  158 + return json(['code' => '0', 'msg' => '当前时间已经预约!']);
  159 + }
151 $res = Db::name('yuyue')->insert($data); 160 $res = Db::name('yuyue')->insert($data);
152 if ($res) { 161 if ($res) {
153 $stu_info = Db::name('user')->where(['id' => $data['uid']])->find(); 162 $stu_info = Db::name('user')->where(['id' => $data['uid']])->find();