|
|
@@ -29,7 +29,7 @@ class Product extends Api
|
|
|
*/
|
|
|
public function getPopularList(ProductsModel $productsModel, ProductPopular $productPopular, ProductLists $productLists)
|
|
|
{
|
|
|
- $item = $productsModel::getProductTypeById($this->lan);
|
|
|
+ $item = $productsModel::getProductTypeAll($this->lan);
|
|
|
$resp = array();
|
|
|
foreach ($item as $kk =>$val) {
|
|
|
$list= $productLists->where('type_id', $kk)->field('id,thum as img_url,'.$this->lan.'_name as name')->select();
|
|
|
@@ -96,8 +96,6 @@ class Product extends Api
|
|
|
public function getTransferDetail(ProductMarket $productMarket, OrderLogic $orderLogic, ProductOrder $productOrder)
|
|
|
{
|
|
|
$sort = $this->request->post('sort/d', '');
|
|
|
- $type_id = $this->request->post('type_id/s', '');
|
|
|
- $key_val = $this->request->post('key_val/s', '');
|
|
|
$order = 'a.price ASC';
|
|
|
if($sort == 1) $order = 'a.price DESC';
|
|
|
$map['a.status'] = $productMarket::Normal;
|
|
|
@@ -109,12 +107,8 @@ class Product extends Api
|
|
|
->where('a.status', $productMarket::Normal)
|
|
|
->where($map)
|
|
|
->order($order)
|
|
|
- ->paginate($this->pageSize);
|
|
|
-
|
|
|
- foreach ($list as &$item) {
|
|
|
- $item['issue'] = $orderLogic::getProductIssue($item->product_id); //发行: 是产品的库存总量(卖出和没卖出的都算,最保险的计算方式是剩余库存量+所有用户的持有量;因为空投产品不是从库存出去的
|
|
|
- $item['circulation'] = $productOrder::where('status', $productOrder::Paid)->count(); //流通: 所有用户的持有量
|
|
|
- }
|
|
|
+ ->find();
|
|
|
+
|
|
|
$this->success('', $list);
|
|
|
}
|
|
|
|