|
@@ -48,7 +48,7 @@ class Product extends Base
|
|
|
*/
|
|
|
public function detail()
|
|
|
{
|
|
|
- $productId = $this->request->get('id');
|
|
|
+ $productId = input('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 = input('page', 1);
|
|
|
+ $pagesize = input('pagesize', 20);
|
|
|
+ $by = input('by', 'weigh');
|
|
|
+ $desc = input('desc', 'desc');
|
|
|
|
|
|
- $sid = $this->request->get('sid'); // 二级分类Id
|
|
|
- $fid = $this->request->get('fid'); // 一级分类Id
|
|
|
+ $sid = input('sid'); // 二级分类Id
|
|
|
+ $fid = input('fid'); // 一级分类Id
|
|
|
|
|
|
$productModel = new productModel();
|
|
|
|
|
@@ -180,7 +180,7 @@ class Product extends Base
|
|
|
*/
|
|
|
public function favorite()
|
|
|
{
|
|
|
- $id = $this->request->get('id', 0);
|
|
|
+ $id = input('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 = input('page', 1);
|
|
|
+ $pageSize = input('pagesize', 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 = input('page', 1);
|
|
|
+ $pageSize = input('pagesize', 20);
|
|
|
+ $productId = input('product_id');
|
|
|
$productId = \addons\unishop\extend\Hashids::decodeHex($productId);
|
|
|
|
|
|
// 评价信息
|