|
@@ -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);
|
|
|
|
|
|
// 评价信息
|