瀏覽代碼

分页参数统一

lizhen_gitee 1 年之前
父節點
當前提交
d0c61becfe
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      addons/unishop/controller/Address.php
  2. 2 2
      addons/unishop/controller/Product.php

+ 1 - 1
addons/unishop/controller/Address.php

@@ -50,7 +50,7 @@ class Address extends Base
     public function all()
     {
         $page = $this->request->post('page', 1);
-        $pagesize = $this->request->post('pagesize', 15);
+        $pagesize = $this->request->post('listrow', 15);
 
         $data = (new AddressModel())
             ->with([

+ 2 - 2
addons/unishop/controller/Product.php

@@ -296,7 +296,7 @@ class Product extends Base
     public function favoriteList()
     {
         $page = $this->request->request('page', 1);
-        $pageSize = $this->request->request('pagesize', 20);
+        $pageSize = $this->request->request('listrow', 20);
 
         $list = (new Favorite)->where(['user_id' => $this->auth->id])->with(['product'])->page($page, $pageSize)->select();
 
@@ -342,7 +342,7 @@ class Product extends Base
     public function evaluate()
     {
         $page = $this->request->request('page', 1);
-        $pageSize = $this->request->request('pagesize', 20);
+        $pageSize = $this->request->request('listrow', 20);
         $productId = $this->request->request('product_id');
         $productId = \addons\unishop\extend\Hashids::decodeHex($productId);