Browse Source

分页参数统一

lizhen_gitee 1 year ago
parent
commit
d0c61becfe
2 changed files with 3 additions and 3 deletions
  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()
     public function all()
     {
     {
         $page = $this->request->post('page', 1);
         $page = $this->request->post('page', 1);
-        $pagesize = $this->request->post('pagesize', 15);
+        $pagesize = $this->request->post('listrow', 15);
 
 
         $data = (new AddressModel())
         $data = (new AddressModel())
             ->with([
             ->with([

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

@@ -296,7 +296,7 @@ class Product extends Base
     public function favoriteList()
     public function favoriteList()
     {
     {
         $page = $this->request->request('page', 1);
         $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();
         $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()
     public function evaluate()
     {
     {
         $page = $this->request->request('page', 1);
         $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 = $this->request->request('product_id');
         $productId = \addons\unishop\extend\Hashids::decodeHex($productId);
         $productId = \addons\unishop\extend\Hashids::decodeHex($productId);