<?php
namespace app\api\controller;

use app\adminapi\lists\property\PropertyActivityLists;
use app\adminapi\logic\property\PropertyActivityLogic;
use app\adminapi\validate\property\PropertyActivityValidate;
use app\api\logic\ActivityLogic;
use app\api\logic\GoodsLogic;
use app\api\validate\GoodsValidate;
use think\facade\Log;


/**
 * PropertyActivity控制器
 * Class PropertyActivityController
 * @package app\api\controller
 */
class PropertyActivityController extends BaseApiController
{

    public array $notNeedLogin = ['getActivityHomepage'];

    /**
     * @notes 获取代理活动商品列表
     * @return \think\response\Json
     * @author likeadmin
     * @date 2024/11/21 15:04
     */
    public function getActivityHomepage()
    {
        try{
            $params = (new GoodsValidate())->post()->goCheck('activity',[
                'user_id'=>$this->userId
            ]);
            $result = ActivityLogic::getHomepageByActivityId($params);
            return $this->success('', $result, 1, 1);
        }catch(\Exception $e){
            return $this->fail($e->getMessage());
        }
    }




}