本地生活88折
This commit is contained in:
parent
5db6a38173
commit
e225b291a5
@ -181,12 +181,12 @@ class LocalStoreGoodsCartLogic extends Logic
|
||||
$goods_num += $v['goods_num'];
|
||||
}
|
||||
|
||||
if ($lstore_id == Config::get('localstore.dlh_lstore_id')) {
|
||||
// if ($lstore_id == Config::get('localstore.dlh_lstore_id')) {
|
||||
foreach ($cart as $k => &$v) {
|
||||
// $cart[$k]['original_price'] = $v['price'];
|
||||
$cart[$k]['original_price'] = $v['price'];
|
||||
$v['price'] = number_format($v['price'] * LocalStoreGoodsLogic::$sale, 2, '.', '');
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
return [
|
||||
'cart' => $cart,
|
||||
|
||||
@ -17,7 +17,7 @@ use app\common\model\goods\GoodsSubsidy;
|
||||
class LocalStoreGoodsLogic extends Logic
|
||||
{
|
||||
// 折扣控制
|
||||
public static $sale = 1;
|
||||
public static $sale = 88 / 100;
|
||||
|
||||
// 88折商家ID
|
||||
public static $lstore_id = 138;
|
||||
@ -71,12 +71,12 @@ class LocalStoreGoodsLogic extends Logic
|
||||
$list[$k]['subsidy_txt'] = '最高返' . $list[$k]['subsidy']['subsidy'];
|
||||
}
|
||||
|
||||
if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
// if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
foreach ($list as $k => &$v) {
|
||||
// $list[$k]['original_price'] = $v['price'];
|
||||
$list[$k]['original_price'] = $v['price'];
|
||||
$v['price'] = number_format($v['price'] * self::$sale, 2, '.', '');
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
$count = LocalStoreGoods::where($where)->where($m_where)->count();
|
||||
|
||||
@ -273,10 +273,10 @@ class LocalStoreGoodsLogic extends Logic
|
||||
$data['subsidy_txt'] = '最高返' . $data['subsidy']['subsidy'];
|
||||
|
||||
// 东龙汇超时价格 *88折
|
||||
if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
// $data['original_price'] = $data['price'];
|
||||
// if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
$data['original_price'] = $data['price'];
|
||||
$data['price'] = number_format($data['price'] * self::$sale, 2, '.', '');
|
||||
}
|
||||
// }
|
||||
|
||||
if ($get['lstore_id'] != Config::get('localstore.dlh_lstore_id')) {
|
||||
$data['close'] = array(
|
||||
@ -295,10 +295,10 @@ class LocalStoreGoodsLogic extends Logic
|
||||
$v['image'] = Config::get('aliyunoss.domain') . $v['image'];
|
||||
|
||||
// 东龙汇超时价格 *88折
|
||||
if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
// $v['original_price'] = $v['price'];
|
||||
// if ($get['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
$v['original_price'] = $v['price'];
|
||||
$v['price'] = number_format($v['price'] * self::$sale, 2, '.', '');
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -164,10 +164,10 @@ class LocalStoreLogic extends Logic
|
||||
$lists[$key]['subsidy_txt'] = '最高返' . $lists[$key]['subsidy']['subsidy'];
|
||||
|
||||
// 东龙汇超时价格 *88折
|
||||
if ($value['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
// $lists[$key]['original_price'] = $value['price'];
|
||||
// if ($value['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
$lists[$key]['original_price'] = $value['price'];
|
||||
$lists[$key]['price'] = round($value['price'] * LocalStoreGoodsLogic::$sale, 2);
|
||||
}
|
||||
// }
|
||||
|
||||
$pic = LocalStoreGoodsPic::where('lsg_id', $value['id'])->field('url')->find();
|
||||
$lists[$key]['url'] = $pic['url'];
|
||||
@ -248,12 +248,12 @@ class LocalStoreLogic extends Logic
|
||||
}
|
||||
|
||||
// 东龙汇超时价格 *88折
|
||||
if ($value['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
// if ($value['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
foreach ($value['street_goods'] as $k1 => &$v1) {
|
||||
// $value['street_goods'][$k1]['original_price'] = $v1['price'];
|
||||
$value['street_goods'][$k1]['original_price'] = $v1['price'];
|
||||
$v1['price'] = round($v1['price'] * LocalStoreGoodsLogic::$sale, 2);
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
// 店铺下面的商品数量
|
||||
$lists[$key]['goods_count'] = LocalStoreGoods::where(['lstore_id' => $value['ls_id'], 'state' => 1, 'audit_status' => 1, 'delete_time' => 0])->count();
|
||||
@ -394,9 +394,9 @@ class LocalStoreLogic extends Logic
|
||||
$data['goods_total_price'] = round($goods_msg['price'] * $post['goods_num'], 2);
|
||||
}
|
||||
|
||||
if ($post['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
// if ($post['lstore_id'] == Config::get('localstore.dlh_lstore_id')) {
|
||||
$data['goods_total_price'] = number_format($data['goods_total_price'] * LocalStoreGoodsLogic::$sale, 2, '.', '');
|
||||
}
|
||||
// }
|
||||
|
||||
$data['order_no'] = createSn('local_goods_order', 'order_no');
|
||||
$data['lstore_id'] = $post['lstore_id'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user