|
|
|
@ -12,18 +12,18 @@ declare (strict_types=1); |
|
|
|
|
|
|
|
|
|
namespace app\api\service\sharp; |
|
|
|
|
|
|
|
|
|
use think\model\Collection; |
|
|
|
|
use app\api\model\Goods as GoodsModel; |
|
|
|
|
use app\api\model\sharp\Active as ActiveModel; |
|
|
|
|
use app\api\model\sharp\Goods as SharpGoodsModel; |
|
|
|
|
use app\api\model\sharp\ActiveGoods as ActiveGoodsModel; |
|
|
|
|
use app\api\model\sharp\ActiveTime as ActiveTimeModel; |
|
|
|
|
use app\api\model\sharp\Goods as SharpGoodsModel; |
|
|
|
|
use app\api\model\sharp\GoodsSku as SharpGoodsSkuModel; |
|
|
|
|
use app\api\model\sharp\ActiveGoods as ActiveGoodsModel; |
|
|
|
|
use app\common\enum\sharp\GoodsStatus as GoodsStatusEnum; |
|
|
|
|
use app\common\enum\sharp\ActiveStatus as ActiveStatusEnum; |
|
|
|
|
use app\common\service\BaseService; |
|
|
|
|
use app\common\enum\sharp\GoodsStatus as GoodsStatusEnum; |
|
|
|
|
use app\common\library\helper; |
|
|
|
|
use app\common\service\BaseService; |
|
|
|
|
use cores\exception\BaseException; |
|
|
|
|
use think\model\Collection; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 秒杀活动服务类 |
|
|
|
@ -60,7 +60,10 @@ class Active extends BaseService |
|
|
|
|
{ |
|
|
|
|
// 获取秒杀首页顶部菜单 |
|
|
|
|
$tabbar = $this->getActiveTabbar(); |
|
|
|
|
empty($tabbar) && throwError('很抱歉,暂无秒杀活动'); |
|
|
|
|
if (empty($tabbar)) { |
|
|
|
|
return []; |
|
|
|
|
} |
|
|
|
|
//empty($tabbar) && throwError('很抱歉,暂无秒杀活动'); |
|
|
|
|
// 获取活动商品 |
|
|
|
|
$goodsList = $this->getGoodsListByActiveTimeId($tabbar[0]['active_time_id']); |
|
|
|
|
return compact('tabbar', 'goodsList'); |
|
|
|
|