lizhen_gitee il y a 1 an
Parent
commit
cdd2f91bc1
2 fichiers modifiés avec 21 ajouts et 21 suppressions
  1. 8 8
      addons/unishop/controller/Order.php
  2. 13 13
      addons/unishop/controller/Product.php

+ 8 - 8
addons/unishop/controller/Order.php

@@ -241,7 +241,7 @@ class Order extends Base
      */
     public function getDelivery()
     {
-        $cityId = $this->request->get('city_id', 0);
+        $cityId = $this->request->request('city_id', 0);
         $delivery = (new DeliveryRuleModel())->getDelivetyByArea($cityId);
         $this->success('', $delivery['list']);
     }
@@ -287,9 +287,9 @@ class Order extends Base
     public function getOrders()
     {
         // 0=全部,1=待付款,2=待发货,3=待收货,4=待评价,5=售后
-        $type = $this->request->get('type', 0);
-        $page = $this->request->get('page', 1);
-        $pagesize = $this->request->get('pagesize', 10);
+        $type = $this->request->request('type', 0);
+        $page = $this->request->request('page', 1);
+        $pagesize = $this->request->request('pagesize', 10);
         try {
 
             $orderModel = new \addons\unishop\model\Order();
@@ -314,7 +314,7 @@ class Order extends Base
      */
     public function cancel()
     {
-        $order_id = $this->request->get('order_id', 0);
+        $order_id = $this->request->request('order_id', 0);
         $order_id = \addons\unishop\extend\Hashids::decodeHex($order_id);
 
         $orderModel = new \addons\unishop\model\Order();
@@ -356,7 +356,7 @@ class Order extends Base
      */
     public function delete()
     {
-        $order_id = $this->request->get('order_id', 0);
+        $order_id = $this->request->request('order_id', 0);
         $order_id = \addons\unishop\extend\Hashids::decodeHex($order_id);
 
         $orderModel = new \addons\unishop\model\Order();
@@ -390,7 +390,7 @@ class Order extends Base
      */
     public function received()
     {
-        $order_id = $this->request->get('order_id', 0);
+        $order_id = $this->request->request('order_id', 0);
         $order_id = \addons\unishop\extend\Hashids::decodeHex($order_id);
 
         $orderModel = new \addons\unishop\model\Order();
@@ -589,7 +589,7 @@ class Order extends Base
      */
     public function detail()
     {
-        $order_id = $this->request->get('order_id', 0);
+        $order_id = $this->request->request('order_id', 0);
         $order_id = \addons\unishop\extend\Hashids::decodeHex($order_id);
 
         try {

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

@@ -48,7 +48,7 @@ class Product extends Base
      */
     public function detail()
     {
-        $productId = $this->request->get('id');
+        $productId = $this->request->request('id');
         $productId = \addons\unishop\extend\Hashids::decodeHex($productId);
 
         try {
@@ -134,13 +134,13 @@ class Product extends Base
      */
     public function lists()
     {
-        $page = $this->request->get('page', 1);
-        $pagesize = $this->request->get('pagesize', 20);
-        $by = $this->request->get('by', 'weigh');
-        $desc = $this->request->get('desc', 'desc');
+        $page = $this->request->request('page', 1);
+        $pagesize = $this->request->request('listrow', 20);
+        $by = $this->request->request('by', 'weigh');
+        $desc = $this->request->request('desc', 'desc');
 
-        $sid = $this->request->get('sid'); // 二级分类Id
-        $fid = $this->request->get('fid'); // 一级分类Id
+        $sid = $this->request->request('sid'); // 二级分类Id
+        $fid = $this->request->request('fid'); // 一级分类Id
 
         $productModel = new productModel();
 
@@ -180,7 +180,7 @@ class Product extends Base
      */
     public function favorite()
     {
-        $id = $this->request->get('id', 0);
+        $id = $this->request->request('id', 0);
         $id = \addons\unishop\extend\Hashids::decodeHex($id);
 
         $user_id = $this->auth->id;
@@ -233,8 +233,8 @@ class Product extends Base
      */
     public function favoriteList()
     {
-        $page = $this->request->get('page', 1);
-        $pageSize = $this->request->get('pagesize', 20);
+        $page = $this->request->request('page', 1);
+        $pageSize = $this->request->request('listrow', 20);
 
         $list = (new Favorite)->where(['user_id' => $this->auth->id])->with(['product'])->page($page, $pageSize)->select();
 
@@ -279,9 +279,9 @@ class Product extends Base
      */
     public function evaluate()
     {
-        $page = $this->request->get('page', 1);
-        $pageSize = $this->request->get('pagesize', 20);
-        $productId = $this->request->get('product_id');
+        $page = $this->request->request('page', 1);
+        $pageSize = $this->request->request('listrow', 20);
+        $productId = $this->request->request('product_id');
         $productId = \addons\unishop\extend\Hashids::decodeHex($productId);
 
         // 评价信息