|
|
@@ -72,35 +72,6 @@ class GoodsController extends webApp
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 创业大礼包
|
|
|
- * @return array
|
|
|
- */
|
|
|
- public function data()
|
|
|
- {
|
|
|
- $areaId = $this->areaId;
|
|
|
- $buyType = $this->buyType;
|
|
|
- if($areaId<=0){
|
|
|
- $cacheInfo = RedisService::get("caches:index:area_".get_client_ip());
|
|
|
- $areaId = isset($cacheInfo['area_id'])?$cacheInfo['area_id'] : 1;
|
|
|
- $buyType = isset($cacheInfo['buy_type'])?$cacheInfo['buy_type'] : 1;
|
|
|
- }
|
|
|
- try {
|
|
|
- $data = [
|
|
|
- // 轮播
|
|
|
- 'banners' => AdService::make()->getListByPosition(1),
|
|
|
- 'goods' => GoodsService::make()->getListByType(2, $buyType, $this->userId),
|
|
|
- 'areaId'=> $areaId,
|
|
|
- 'buyType'=> $buyType,
|
|
|
- ];
|
|
|
-
|
|
|
- return showJson(1010, true, $data);
|
|
|
- } catch (\Exception $exception) {
|
|
|
- $error = ['data' => $exception->getTrace(), 'err' => $exception->getMessage()];
|
|
|
- return showJson(1046, false, $error);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* 收藏
|
|
|
*/
|
|
|
public function collect()
|