分页获取产品指令
指令介绍
productPage,分页获取产品。
方法参数
参数名称 | 参数说明 | 参数类型 | 是否必须 |
pageNumber | 第几页 | Integer | 否 |
pageSize | 每页多少个 | Integer | 否 |
使用方法
该模板指令,会自动从 url链接中 获取参数,其中除了pageNumber,pageSize之外,还有对其属性进行搜索匹配对参数。
匹配规则如下
- eq 等于
- nq 不等于
- like 字符串匹配
-
isNull 为空
-
isNotNull 不为空
举例:
http://**.jxyunge.cn/page/products.html?search_eq_productCategory.uuid 对分类里面对uuid进行搜索
http://**.jxyunge.cn/page/products.html?search_like_title=你好 对产品标题进行搜索
使用举例
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<@productPage>
<#list productPageData.pagedata.content as data>
<a>${data.title}</a><br/>
</#list>
<@pagination pageData=articlePageData toURL='http://jxyunge.localhost:8888/page/products.html?pageSize=2' />
</@productPage>
</body>
</html>
效果展示