|
|
|
@ -48,7 +48,28 @@ class Goods extends GoodsService |
|
|
|
|
|
|
|
|
|
public function getCommonConfig() |
|
|
|
|
{ |
|
|
|
|
//todo wmc1新品首发背景图 2限时秒杀背景图 3排行榜背景图 |
|
|
|
|
//todo wmc1新品首发背景图 2限时秒杀背景图 3排行榜背景图 4大牌正品是轮播 |
|
|
|
|
|
|
|
|
|
switch (request()->get('type')) { |
|
|
|
|
case 1: |
|
|
|
|
$data['imgurl']= 'https://www.saas.njrenzhou.com/uploads/10001/20240131/bdc5f17f3ff8c53ce0853177bc4f1917.png'; |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
$data['imgurl']= 'https://www.saas.njrenzhou.com/uploads/10001/20240131/e8e10653875e779bc72dbee65b8072c0.png'; |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
$data['imgurl']= 'https://www.saas.njrenzhou.com/uploads/10001/20240131/5c4ec6ffeb23223936295e290dc3d1f9.png'; |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
case 4: |
|
|
|
|
$data['imgurl']= [ |
|
|
|
|
'https://www.saas.njrenzhou.com/uploads/10001/20240131/5c4ec6ffeb23223936295e290dc3d1f9.png', |
|
|
|
|
]; |
|
|
|
|
return $data; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
return []; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -85,7 +106,7 @@ class Goods extends GoodsService |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//大牌正品列表 |
|
|
|
|
public function brandList() |
|
|
|
|
public function brandList($storeid) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
$page = (int)$_GET['page']; |
|
|
|
@ -96,7 +117,7 @@ class Goods extends GoodsService |
|
|
|
|
'is_delete' => 0, |
|
|
|
|
'is_brand' => $_GET['is_brand'], |
|
|
|
|
'is_new' => $_GET['is_new'], |
|
|
|
|
'store_id' => $_GET['store_id'], |
|
|
|
|
'store_id' => $storeid, |
|
|
|
|
'categoryId' => (int)$_GET['categoryId'], |
|
|
|
|
], 15); |
|
|
|
|
|
|
|
|
@ -107,18 +128,12 @@ class Goods extends GoodsService |
|
|
|
|
|
|
|
|
|
$list['data'] = $this->formatGoodsList($goodsList); |
|
|
|
|
return $list; |
|
|
|
|
// $list = $model->where([ |
|
|
|
|
// 'is_delete' => 0, |
|
|
|
|
// 'status' => 10, |
|
|
|
|
// 'is_brand' => 1, |
|
|
|
|
// 'store_id' => $_GET['store_id'] |
|
|
|
|
// ])->field('goods_name,sales_initial,sales_actual,goods_id,goods_price_min')->paginate($page)->toArray(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//排行榜分类列表 一级 |
|
|
|
|
public function charts(): array |
|
|
|
|
public function charts($storeid): array |
|
|
|
|
{ |
|
|
|
|
$model = new CategoryModel; |
|
|
|
|
|
|
|
|
@ -126,14 +141,14 @@ class Goods extends GoodsService |
|
|
|
|
'parent_id' => 0, |
|
|
|
|
'status' => 1, |
|
|
|
|
'is_paihang' => 1, |
|
|
|
|
'store_id' => $_GET['store_id'] |
|
|
|
|
'store_id' => $storeid |
|
|
|
|
])->order('category_id desc')->select()->toArray(); |
|
|
|
|
|
|
|
|
|
return $list; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function chartsGoodsList() |
|
|
|
|
public function chartsGoodsList($storeid) |
|
|
|
|
{ |
|
|
|
|
$model = new GoodsModel; |
|
|
|
|
|
|
|
|
@ -141,7 +156,7 @@ class Goods extends GoodsService |
|
|
|
|
'status' => 10, |
|
|
|
|
'is_delete' => 0, |
|
|
|
|
'paihang' => 1, |
|
|
|
|
'store_id' => $_GET['store_id'], |
|
|
|
|
'store_id' => $storeid, |
|
|
|
|
'categoryId' => (int)$_GET['categoryId'], |
|
|
|
|
], 15); |
|
|
|
|
|
|
|
|
@ -155,7 +170,7 @@ class Goods extends GoodsService |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function chartsGoodsJing(): array |
|
|
|
|
public function chartsGoodsJing($storeid): array |
|
|
|
|
{ |
|
|
|
|
$model = new CategoryModel; |
|
|
|
|
|
|
|
|
@ -163,7 +178,7 @@ class Goods extends GoodsService |
|
|
|
|
'parent_id' => 0, |
|
|
|
|
'status' => 1, |
|
|
|
|
'is_paihang' => 1, |
|
|
|
|
'store_id' => $_GET['store_id'] |
|
|
|
|
'store_id' => $storeid |
|
|
|
|
])->order('category_id desc')->select()->toArray(); |
|
|
|
|
$model = new GoodsModel; |
|
|
|
|
foreach ($list as &$v) { |
|
|
|
@ -171,7 +186,7 @@ class Goods extends GoodsService |
|
|
|
|
'status' => 10, |
|
|
|
|
'is_delete' => 0, |
|
|
|
|
'paihang' => 1, |
|
|
|
|
'store_id' => $_GET['store_id'], |
|
|
|
|
'store_id' => $storeid, |
|
|
|
|
'categoryId' => $v['category_id'], |
|
|
|
|
], 3); |
|
|
|
|
$list2 = $goodsList->toArray()['data']; |
|
|
|
@ -184,17 +199,17 @@ class Goods extends GoodsService |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//同城信息 |
|
|
|
|
public function cityInfo(): array |
|
|
|
|
public function cityInfo($storeid): array |
|
|
|
|
{ |
|
|
|
|
$model = new ShopModel; |
|
|
|
|
$info = $model->where([ |
|
|
|
|
'is_delete' => 0, |
|
|
|
|
'status' => 1, |
|
|
|
|
'store_id' => $_GET['store_id'], |
|
|
|
|
'store_id' => $storeid, |
|
|
|
|
'is_main' => 1, |
|
|
|
|
])->field('shop_name,star,shop_hours,summary,phone, |
|
|
|
|
province_id,city_id,region_id,shop_id,address,latitude,longitude')->find()->toArray(); |
|
|
|
|
|
|
|
|
|
//todo wmc |
|
|
|
|
$info['remark'] = ['手机选购', '电脑选购']; |
|
|
|
|
$info['star'] = 5; |
|
|
|
|
$info['fuwu_hours'] = 5; |
|
|
|
|