|
@@ -29,15 +29,15 @@ class StoreProductController
|
|
|
public function lst(Request $request)
|
|
public function lst(Request $request)
|
|
|
{
|
|
{
|
|
|
$data = UtilService::getMore([
|
|
$data = UtilService::getMore([
|
|
|
- ['sid', 0],
|
|
|
|
|
- ['cid', 0],
|
|
|
|
|
|
|
+ [['sid', 'd'], 0],
|
|
|
|
|
+ [['cid', 'd'], 0],
|
|
|
['keyword', ''],
|
|
['keyword', ''],
|
|
|
['priceOrder', ''],
|
|
['priceOrder', ''],
|
|
|
['salesOrder', ''],
|
|
['salesOrder', ''],
|
|
|
- ['news', 0],
|
|
|
|
|
- ['page', 0],
|
|
|
|
|
- ['limit', 0],
|
|
|
|
|
- ['type', 0]
|
|
|
|
|
|
|
+ [['news', 'd'], 0],
|
|
|
|
|
+ [['page', 'd'], 0],
|
|
|
|
|
+ [['limit', 'd'], 0],
|
|
|
|
|
+ [['type', 'd'], 0]
|
|
|
], $request);
|
|
], $request);
|
|
|
return app('json')->successful(StoreProduct::getProductList($data, $request->uid()));
|
|
return app('json')->successful(StoreProduct::getProductList($data, $request->uid()));
|
|
|
}
|
|
}
|
|
@@ -165,8 +165,8 @@ class StoreProductController
|
|
|
public function product_hot(Request $request)
|
|
public function product_hot(Request $request)
|
|
|
{
|
|
{
|
|
|
list($page, $limit) = UtilService::getMore([
|
|
list($page, $limit) = UtilService::getMore([
|
|
|
- ['page', 0],
|
|
|
|
|
- ['limit', 0]
|
|
|
|
|
|
|
+ [['page', 'd'], 0],
|
|
|
|
|
+ [['limit', 'd'], 0]
|
|
|
], $request, true);
|
|
], $request, true);
|
|
|
if (!$limit) return app('json')->successful([]);
|
|
if (!$limit) return app('json')->successful([]);
|
|
|
$productHot = StoreProduct::getHotProductLoading('id,image,store_name,cate_id,price,unit_name,ot_price', (int)$page, (int)$limit);
|
|
$productHot = StoreProduct::getHotProductLoading('id,image,store_name,cate_id,price,unit_name,ot_price', (int)$page, (int)$limit);
|
|
@@ -223,7 +223,9 @@ class StoreProductController
|
|
|
public function reply_list(Request $request, $id)
|
|
public function reply_list(Request $request, $id)
|
|
|
{
|
|
{
|
|
|
list($page, $limit, $type) = UtilService::getMore([
|
|
list($page, $limit, $type) = UtilService::getMore([
|
|
|
- ['page', 0], ['limit', 0], ['type', 0]
|
|
|
|
|
|
|
+ [['page', 'd'], 0],
|
|
|
|
|
+ [['limit', 'd'], 0],
|
|
|
|
|
+ [['type', 'd'], 0]
|
|
|
], $request, true);
|
|
], $request, true);
|
|
|
if (!$id || !is_numeric($id)) return app('json')->fail('参数错误!');
|
|
if (!$id || !is_numeric($id)) return app('json')->fail('参数错误!');
|
|
|
$list = StoreProductReply::getProductReplyList($id, (int)$type, $page, $limit);
|
|
$list = StoreProductReply::getProductReplyList($id, (int)$type, $page, $limit);
|