|
@@ -183,16 +183,8 @@ class ProductController extends Controller
|
|
}
|
|
}
|
|
$list = $query->where('status',1)
|
|
$list = $query->where('status',1)
|
|
->paginate($limit);
|
|
->paginate($limit);
|
|
- $num = intval(round($limit / $go));
|
|
|
|
- $data = [
|
|
|
|
- 'items' => array_chunk($list->items(),$num),
|
|
|
|
- 'total' => $list->total(), // 总数
|
|
|
|
- 'pageSize' => $list->perPage(), // 每页数据
|
|
|
|
- 'totalPage' => $list->lastPage(),// 总页数
|
|
|
|
- 'page' => $list->currentPage(),//当前页
|
|
|
|
- ];
|
|
|
|
-
|
|
|
|
- return $this->success($data);
|
|
|
|
|
|
+ $num = intval($limit / $go);
|
|
|
|
+ return $this->success(pages($list,$num));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|