|
|
|
@ -54,12 +54,14 @@ class Goods extends GoodsService |
|
|
|
|
return $detail; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function getCommonConfig() |
|
|
|
|
public function getCommonConfig($storeInfo) |
|
|
|
|
{ |
|
|
|
|
//todo wmc1新品首发背景图 2限时秒杀背景图 3排行榜背景图 4大牌正品是轮播 5预售规则 |
|
|
|
|
switch (request()->get('type')) { |
|
|
|
|
//todo wmc1新品首发背景图 2限时秒杀背景图 3排行榜背景图 4大牌正品是轮播 5预售规则 6 新人首单 |
|
|
|
|
$type = request()->get('type'); |
|
|
|
|
switch ($type) { |
|
|
|
|
case 1: |
|
|
|
|
$data['imgurl'] = 'https://www.saas.njrenzhou.com/uploads/10001/20240131/bdc5f17f3ff8c53ce0853177bc4f1917.png'; |
|
|
|
|
$data['imgurl'] = $this->getStoreImgUrl($storeInfo['new_product_img_id']); |
|
|
|
|
//$data['imgurl'] = 'https://www.saas.njrenzhou.com/uploads/10001/20240131/bdc5f17f3ff8c53ce0853177bc4f1917.png'; |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
@ -71,9 +73,10 @@ class Goods extends GoodsService |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
case 4: |
|
|
|
|
$data['imgurl'] = [ |
|
|
|
|
'https://www.saas.njrenzhou.com/uploads/10001/20240131/5c4ec6ffeb23223936295e290dc3d1f9.png', |
|
|
|
|
]; |
|
|
|
|
$data['imgurl'] = $this->getStoreImgUrl($storeInfo['big_brand_img_id']); |
|
|
|
|
// $data['imgurl'] = [ |
|
|
|
|
// 'https://www.saas.njrenzhou.com/uploads/10001/20240131/5c4ec6ffeb23223936295e290dc3d1f9.png', |
|
|
|
|
// ]; |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
case 5: |
|
|
|
@ -82,10 +85,35 @@ class Goods extends GoodsService |
|
|
|
|
]; |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
case 6: |
|
|
|
|
$data['imgurl'] = $this->getStoreImgUrl($storeInfo['new_people_order_img_id']); |
|
|
|
|
// $data['imgurl'] = [ |
|
|
|
|
// 'http://qiniu.shop.royaum.com.cn/10001/20240201/13f2e675794e25176352fc039dfb6dcb.jpg', |
|
|
|
|
// ]; |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return []; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取(新品首发,大牌正品,新人首单)商铺的url |
|
|
|
|
*/ |
|
|
|
|
public function getStoreImgUrl($img_id){ |
|
|
|
|
$data = []; |
|
|
|
|
if(!empty($img_id)){ |
|
|
|
|
$img_ids = explode(",",$img_id); |
|
|
|
|
$infos = \app\common\model\UploadFile::where('file_id','in' ,$img_ids)->field('file_path,domain')->select(); |
|
|
|
|
if(!empty($infos)){ |
|
|
|
|
foreach($infos as $info){ |
|
|
|
|
$data[] = getUrl($info['file_path'], $info['domain']); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return $data; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 推荐的商品列表 |
|
|
|
|
* @return array |
|
|
|
|