作者 郭文星

123

@@ -1549,6 +1549,9 @@ class Car extends Base @@ -1549,6 +1549,9 @@ class Car extends Base
1549 public function orderinfo(){ 1549 public function orderinfo(){
1550 $order_id = $this->request->param("order_id"); 1550 $order_id = $this->request->param("order_id");
1551 $res=Db::name("order")->where('id',$order_id)->find(); 1551 $res=Db::name("order")->where('id',$order_id)->find();
  1552 + if(!$res){
  1553 + $this->error("数据为空");
  1554 + }
1552 $specificaddress=Db::name("specificaddress")->where('id',$res['specificaddress_id'])->find(); 1555 $specificaddress=Db::name("specificaddress")->where('id',$res['specificaddress_id'])->find();
1553 $data=[ 1556 $data=[
1554 "position"=>$res['position'], 1557 "position"=>$res['position'],