商品列表添加上商品返比文字
This commit is contained in:
parent
66eff15d0c
commit
2cc5037b6b
@ -90,13 +90,13 @@ class MallNewsLogic extends Logic
|
|||||||
|
|
||||||
private static function content(&$arg)
|
private static function content(&$arg)
|
||||||
{
|
{
|
||||||
foreach ($arg as &$v) {
|
foreach ($arg as $k => &$v) {
|
||||||
if ($v['mall_type'] == 0) {
|
if ($v['mall_type'] == 0) {
|
||||||
if ($v['shop_id'] > 0) {
|
if ($v['shop_id'] > 0) {
|
||||||
$v['shop'] = Goods::field('name, image, min_price, subsidy_id')->find($v['shop_id']);
|
$v['shop'] = Goods::field('name, image, min_price, subsidy_id')->find($v['shop_id']);
|
||||||
// 获取返补比例, subsidy_id为0的就传递一个ID为4的固定ID
|
// 获取返补比例, subsidy_id为0的就传递一个ID为4的固定ID
|
||||||
$v['shop']['subsidy'] = (new GoodsSubsidy())->getSubsidyById($v['shop']['subsidy_id'] > 0 ? $v['shop']['subsidy_id'] : 4);
|
$arg[$k]['subsidy'] = (new GoodsSubsidy())->getSubsidyById($v['shop']['subsidy_id'] > 0 ? $v['shop']['subsidy_id'] : 4);
|
||||||
$v['shop']['subsidy_txt'] = '最高返' . $v['shop']['subsidy'];
|
$arg[$k]['subsidy_txt'] = '最高返' . $v['shop']['subsidy'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($v['files'])) {
|
if (isset($v['files'])) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user