清除CarController文件中info函数的多余代码

dev
曾超新 5 years ago
parent a877e4f28f
commit 370bef5158
  1. 51
      frontend/controllers/CarController.php

@ -531,62 +531,11 @@ class CarController extends BaseController
$order_info->link_phone = $car_info->phone; $order_info->link_phone = $car_info->phone;
$order_info->save(); $order_info->save();
} }
$insurer_type_items = InsurerTypeT::find()->all();
$insurer_company_items = InsurerCompanyT::find()->all();
$insurer_company2_items = InsurerCompany2T::find()->all();
$pay_type_items = PayTypeT::find()->all();
$car_use_items = CarUseT::find()->all();
$direction_items = DirectionT::find()
->all();
$range_items = RangeT::find()
->all();
$city_items = CityT::find()
->all();
$district_items = DistrictT::find()
->orderBy('order_id ASC')
->all();
$gift_items = GiftT::find()
->where('type_id=1')
->all();
$success_items = InvalidT::getTree(1);
$failure_items = InvalidT::getTreeXinbaoNew(2);
$list = MeetT::getAllData(1);
$order_ad=OrderAddress::findOne(['id'=>$order_info->addr_id]);
$province = Region::find()->asArray()->where(['parent_id'=>0])->andWhere(['level'=>1])->all();
$c=[];
$d=[];
$e=[];
$linkMan_items = $car_info->getLinkmen()
->orderBy('created_at desc')
->all();
return $this->render('info',[ return $this->render('info',[
'user_id' => $this->my->id, 'user_id' => $this->my->id,
'car_info' => $car_info, 'car_info' => $car_info,
'link_men' => $linkMan_items,
'insurer_type_items' => $insurer_type_items,
'order_info' => $order_info, 'order_info' => $order_info,
'insurer_company_items' => $insurer_company_items,
'insurer_company2_items' => $insurer_company2_items,
'list' => $list,
'pay_type_items' => $pay_type_items,
'car_use_items' => $car_use_items,
'direction_items' => $direction_items,
'range_items' => $range_items,
'city_items' => $city_items,
'district_items' => $district_items,
'gift_items' => $gift_items,
'success_items' => $success_items,
'failure_items' => $failure_items,
'province' => $province,
'city' =>$c,
'district' =>$d,
'twon' =>isset($e)?$e:[],
'order_ad' =>isset($order_ad)?$order_ad:[]
]); ]);
} }
/* /*

Loading…
Cancel
Save