分页获取产品指令

指令介绍

 

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>

 

效果展示

 

http://lanbo.jxyunge.cn/page/products.html?search_eq_productCategory.uuid=3e0cd202d9084f52a39c3a766c5ec05a

 

2019-06-27 16:07:02
0