Commit 1765c3dc authored by hujun's avatar hujun

分页处理

parent 51db1a53
......@@ -6,6 +6,7 @@ use app\index\service\ImageDepotService;
use app\model\GHouses;
use app\model\GImageDepot;
use think\Image;
use think\Request;
/**
* Created by PhpStorm.
......@@ -114,9 +115,13 @@ class JobTask
*/
public function image() {
set_time_limit(0); // 取消脚本运行时间的超时上限
ini_set('memory_limit', '512M');
ini_set('memory_limit', '256M');
$depot = new GImageDepot();
$image_data = $depot->getImageDepotList('img_name', [], 1, 500);
$param = Request::instance()->param();
$pageNo = empty($param['pageNo']) ? 1 : $param['pageNo'];
$pageSize = empty($param['pageSize']) ? 10 : $param['pageSize'];
$image_data = $depot->getImageDepotList('img_name', [], $pageNo, $pageSize);
$path = './static/shop_image_depot/';
foreach ($image_data as $k=>$v) {
$file_path = $path.$v['img_name'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment