0.88
This commit is contained in:
parent
0776d3d3b6
commit
c7bf98f3d1
@ -1046,9 +1046,6 @@ class GoodsLogic extends Logic
|
|||||||
->limit(4)
|
->limit(4)
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
foreach ($list as &$v) {
|
|
||||||
$v['min_price'] = round(0.88*$v['min_price'],2);
|
|
||||||
}
|
|
||||||
$count = count($list);
|
$count = count($list);
|
||||||
|
|
||||||
if ($count < 4) {
|
if ($count < 4) {
|
||||||
@ -1063,6 +1060,7 @@ class GoodsLogic extends Logic
|
|||||||
|
|
||||||
$result = array_merge($list, $goods);
|
$result = array_merge($list, $goods);
|
||||||
foreach ($result as $k => &$v) {
|
foreach ($result as $k => &$v) {
|
||||||
|
$v['min_price'] = round(0.88*$v['min_price'],2);
|
||||||
if (isset($v['image'])) {
|
if (isset($v['image'])) {
|
||||||
$v['image'] = UrlServer::getFileUrl($v['image']);
|
$v['image'] = UrlServer::getFileUrl($v['image']);
|
||||||
}
|
}
|
||||||
@ -1082,9 +1080,6 @@ class GoodsLogic extends Logic
|
|||||||
->field('ng.id as ng_id, g.id as id, g.name, g.image, g.issuing_price, g.market_price, g.min_price, g.purchase_price, g.wholesale_price, g.subsidy_id')
|
->field('ng.id as ng_id, g.id as id, g.name, g.image, g.issuing_price, g.market_price, g.min_price, g.purchase_price, g.wholesale_price, g.subsidy_id')
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
foreach ($list as &$v) {
|
|
||||||
$v['min_price'] = round(0.88*$v['min_price'],2);
|
|
||||||
}
|
|
||||||
$goods = Db::name('goods')
|
$goods = Db::name('goods')
|
||||||
->where($onSaleWhere)
|
->where($onSaleWhere)
|
||||||
->where($shopWhere)
|
->where($shopWhere)
|
||||||
@ -1100,6 +1095,7 @@ class GoodsLogic extends Logic
|
|||||||
$result = array_merge($list, $goods);
|
$result = array_merge($list, $goods);
|
||||||
|
|
||||||
foreach ($result as $k => &$v) {
|
foreach ($result as $k => &$v) {
|
||||||
|
$result[$k]['min_price'] = round(0.88*$v['min_price'],2);
|
||||||
if (isset($v['image'])) {
|
if (isset($v['image'])) {
|
||||||
$v['image'] = UrlServer::getFileUrl($v['image']);
|
$v['image'] = UrlServer::getFileUrl($v['image']);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user