作者 guosheng
1 个管道 的构建 通过 耗费 2 秒

购物车下单流程调试

@@ -49,6 +49,9 @@ class Order extends Frontend @@ -49,6 +49,9 @@ class Order extends Frontend
49 }*/ 49 }*/
50 $car_model = new \app\index\model\Car(); 50 $car_model = new \app\index\model\Car();
51 $data = $car_model->field('id,store_id,goods_id,number')->whereIn('id',$car_data)->select(); 51 $data = $car_model->field('id,store_id,goods_id,number')->whereIn('id',$car_data)->select();
  52 + if(!$data) {
  53 + $this->redirect(url('car/index'));
  54 + }
52 $goodsModel = new \app\index\model\Goods(); 55 $goodsModel = new \app\index\model\Goods();
53 $goods_price = []; 56 $goods_price = [];
54 $store_ids = []; 57 $store_ids = [];