$request->user['store_id'],'agent_id' => $request->user['agent_id']]; $detail = $this->mode->where($map)->findOrEmpty(); if ($detail->isEmpty()) return error("店铺信息错误"); return success("ok",$detail->toArray()); } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } /** * 保存 * @param Request $request * @return Response */ #[Route(path: "save",methods: "post")] public function setUserData(Request $request): Response { try { $param = $request->post(); $store = $this->mode->where("store_id",$request->user['store_id'])->findOrEmpty(); if ($store->isEmpty()) return errorTrans(40015); $state = $this->mode->setAutoData($param,"store_id"); if (!$state) return errorTrans("error.data"); return successTrans("success.data"); } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } }