request->isAjax) { $params = $this->request->post(); $service = new RefundService(['mall_id' => $this->mall_id]); return $this->success('ok', $service->getList($params)); } return $this->render('index'); } /** * 同意申请 * * @return string */ public function actionAgree() { if ($this->request->isAjax) { $id = $this->request->getBodyParam('id'); $service = new RefundService(['mall_id' => $this->mall_id]); return $service->agree([$id], $this->request->getBodyParam('amount', 0), $this->request->getBodyParam('refund_way')) ? $this->success('ok') : $this->error('推送失败'); } } /** * 驳回申请 * * @return string */ public function actionReject() { if ($this->request->isAjax) { $id = $this->request->getBodyParam('id'); $service = new RefundService(['mall_id' => $this->mall_id]); return $service->reject([$id]) ? $this->success('ok') : $this->error('操作失败'); } } }