all(); $list = $this->service->getList($param); return successTrans("success.data",pageFormat($list),200); } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } #[Route(path: "platform",methods: "get")] public function getPlatform(): Response { try { $param = $this->_valid([ "id.require" => trans("empty.require") ]); if (!is_array($param)) return error($param); $user = $this->model->where("id",$param['id'])->findOrEmpty(); if ($user->isEmpty()) return errorTrans("empty.data"); $platform = (new BlueExpertPlatform)->where("openid",$user['openid'])->append(['source_name','aweme_count_format','follower_count_format','total_favorited_format'])->withAttr(['source_name' => function($data,$resp){ return $this->service->source[$resp['source']]; },'aweme_count_format' => function($data,$resp){ // return formatMoneyKw($resp['aweme_count'],1); return $resp['aweme_count']; },'follower_count_format' => function($data,$resp){ return formatMoneyKw($resp['follower_count'],1); },'total_favorited_format' => function($data,$resp){ return formatMoneyKw($resp['total_favorited'],1); }])->select()->toArray(); return success("ok",$platform); } catch (\Throwable $throwable) { return error($throwable->getMessage()); } } }