tp5中分页后怎么处理items数据?thinkphp5处理分页后的数据 下面是demo
$list = Db::name("content") ->where("createdby",$u["admin_userid"]) ->order("contentid DESC") ->paginate($limit); $list = json_encode($list); $list = json_decode($list,true); $temp = $list["data"]; foreach ($temp as $k => $v){ $temp[$k]["thumb"] = "https://upload.qudong.com/".$v["thumb"]; } $list["data"] = $temp; if($list){ return json(array("code"=>200,"msg"=>"获取成功","data"=>$list)); }else{ return json(array("code"=>400,"msg"=>"bad request","data"=>"")); }