|
@@ -108,19 +108,20 @@ class Product extends Api{
|
|
|
if ($promoList && $cityId){
|
|
|
if (isset($promoList[$value['id']])){
|
|
|
$promoInfo = $promoList[$value['id']];
|
|
|
- $promoTitle = "满". $promoInfo['std_pay']. "元";
|
|
|
+ $promoTitle = '';
|
|
|
if ($promoInfo['rebate_type'] == 1){
|
|
|
- $promoTitle .= "减". $promoInfo['rebate']. "元";
|
|
|
+ $promoTitle = "满减";
|
|
|
}elseif ($promoInfo['rebate_type'] == 2){
|
|
|
- $promoTitle .= "打". $promoInfo['rebate']. "折";
|
|
|
+ $promoTitle .= "满折";
|
|
|
}elseif ($promoInfo['rebate_type'] == 3){
|
|
|
- $rebate = (string) PromoRebate::query()->join('product','promo_rebate.product_id','=','product.id')->where([['promo_id','=',$promoInfo['id']]])->value('product.name');
|
|
|
-
|
|
|
- $promoTitle .= "赠送". $rebate;
|
|
|
+ $promoTitle .= "满赠";
|
|
|
+ }
|
|
|
+ $promoInfoCity = [];
|
|
|
+ if ($promoInfo['city_ids']){
|
|
|
+ $promoInfoCity = explode(',',$promoInfo['city_ids']);
|
|
|
}
|
|
|
- $promoInfoCity = explode(',',$promoInfo['city_ids']);
|
|
|
// 判断是不是可以参与
|
|
|
- if (in_array($cityId,$promoInfoCity)){
|
|
|
+ if (!$promoInfoCity || in_array($cityId,$promoInfoCity)){
|
|
|
if( $promoInfo['tag_scope']) {
|
|
|
// 解析数组
|
|
|
$promoInfo['tag_scope'] = explode(',',$promoInfo['tag_scope']);
|
|
@@ -290,9 +291,12 @@ class Product extends Api{
|
|
|
|
|
|
$promoTitle .= "赠送". $rebate;
|
|
|
}
|
|
|
- $promoInfoCity = explode(',',$promoInfo['city_ids']);
|
|
|
+ $promoInfoCity = [];
|
|
|
+ if ($promoInfo['city_ids']){
|
|
|
+ $promoInfoCity = explode(',',$promoInfo['city_ids']);
|
|
|
+ }
|
|
|
// 判断是不是可以参与
|
|
|
- if (in_array($cityId,$promoInfoCity)){
|
|
|
+ if (!$promoInfoCity || in_array($cityId,$promoInfoCity)){
|
|
|
if( $promoInfo['tag_scope']) {
|
|
|
// 解析数组
|
|
|
$promoInfo['tag_scope'] = explode(',',$promoInfo['tag_scope']);
|