service = new AuthService(['mall_id' => $this->mall_id]); } /** * 列表 * * @return void */ public function actionIndex() { if ($this->request->isAjax) { return $this->success( 'ok', $this->service->getList( array_merge( $this->request->getBodyParams(), $this->request->get(), ) ), ApiStatusEnum::CODE_SUCCESS, JSON_UNESCAPED_UNICODE ); } return $this->render($this->action->id); } /** * 信息修改 * * @return void */ public function actionChange() { if ($this->request->isPost) { $id = $this->request->get('id'); $mobile = $this->request->post('mobile'); $account = $this->request->post('account'); return $this->service->changeMobile($id, $mobile, $account) ? $this->success() : $this->error($this->service->getError()); } } /** * 转换 * * @return void */ public function actionConvert() { if ($this->request->isAjax) { $this->service->convert(); return $this->success('转换任务已添加,请等待'); } } /** * 解除绑定 * * @return void */ public function actionUnbind() { if ($this->request->isAjax) { $id = $this->request->get('id'); return $this->service->unbind($id) ? $this->success('解除成功') : $this->error($this->service->getError()); } } }