修改返回格式
This commit is contained in:
parent
618f9c3831
commit
19087229e4
@ -2681,16 +2681,20 @@ class StoreOrderRepository extends BaseRepository
|
||||
$deal = $this->dealArr($list);
|
||||
//平均2个左右 0 1 2 阶梯往上查寻找
|
||||
[$products, $minNum] = $this->getRange($deal, $range);
|
||||
$result = [];
|
||||
$list = [];
|
||||
if (!empty($products)) {
|
||||
$result = $this->findNearestPriceProduct($products, $money, $minNum);
|
||||
$list = $this->findNearestPriceProduct($products, $money, $minNum);
|
||||
}
|
||||
$count = count($result);//计算数量的
|
||||
return compact('count', 'result','merInfo');
|
||||
|
||||
} else {
|
||||
return compact('count', 'list','merInfo');
|
||||
$count = count($list);//计算数量的
|
||||
}
|
||||
|
||||
return [
|
||||
'count'=>$count,
|
||||
'list'=>$list,
|
||||
'merInfo'=>$merInfo,
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function getRange($array, $range)
|
||||
|
@ -332,8 +332,6 @@ class StoreOrder extends BaseController
|
||||
return app('json')->success($this->repository->beginMerchant($merId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
$where = [
|
||||
"a.mer_id" => $merId,
|
||||
"p.is_show" => 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user