feat: 添加is_lack字段到ProductLists
This commit is contained in:
parent
f480e8aee7
commit
765e08fe9a
@ -87,7 +87,7 @@ class ProductLists extends BaseApiDataLists implements ListsSearchInterface, Lis
|
||||
} else {
|
||||
$order = [$field => $order];
|
||||
}
|
||||
$fields = 'id,id product_id,top_cate_id,cate_id,store_name,cost,vip_price,purchase,price,bar_code,image,sales,store_info,delete_time,unit,batch,top_cate_id,two_cate_id,stock';
|
||||
$fields = 'id,id product_id,top_cate_id,cate_id,store_name,cost,vip_price,purchase,price,bar_code,image,sales,store_info,delete_time,unit,batch,top_cate_id,two_cate_id,stock,is_lack';
|
||||
$off_activity = Config::where('name', 'off_activity')->value('value');
|
||||
if ($off_activity == 1) {
|
||||
$tag = '赠10%品牌礼品券';
|
||||
@ -104,7 +104,7 @@ class ProductLists extends BaseApiDataLists implements ListsSearchInterface, Lis
|
||||
if ($uid > 0) {
|
||||
$user_ship = User::where('id', $uid)->value('user_ship');
|
||||
if (in_array($user_ship, [4, 6, 7])) {
|
||||
$fields = 'id,id product_id,top_cate_id,cate_id,store_name,cost,vip_price,purchase,cost price,bar_code,image,sales,store_info,delete_time,unit,batch,top_cate_id,two_cate_id,stock';
|
||||
$fields = 'id,id product_id,top_cate_id,cate_id,store_name,cost,vip_price,purchase,cost price,bar_code,image,sales,store_info,delete_time,unit,batch,top_cate_id,two_cate_id,stock,is_lack';
|
||||
}
|
||||
}
|
||||
$this->off_activity = $off_activity;
|
||||
@ -119,6 +119,9 @@ class ProductLists extends BaseApiDataLists implements ListsSearchInterface, Lis
|
||||
if ($off_activity == 0 && $user_ship == 5 && $item['top_cate_id'] == 15189) {
|
||||
$item['price'] = $item['cost'];
|
||||
}
|
||||
if($item['is_lack']==1){
|
||||
$tag='缺货';
|
||||
}
|
||||
$item['tag'] = $tag;
|
||||
return $item;
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user