service = new OrderService(['mall_id'=>$this->mall_id]); } public function actionIndex(){ if(!$this->request->isAjax){ return $this->render('index'); } $param = $this->request->get(); $list = $this->service->lists($param); return $this->success('ok',$list); } public function actionQuery(){ $order_no = $this->request->get('order_no'); $service = new PayService(['mall_id'=>$this->mall_id]); $res = $service->query($order_no); return $res ? $this->success('操作成功,请刷新页面',$res) : $this->error($service->error); } }