zhaojs
2023-10-07 74f6db362e1aacb440eacce84e9433de1368a51a
application/api/controller/Activity.php
@@ -13,7 +13,7 @@
header("Access-Control-Allow-Origin:*");
class Activity extends Api
{
    protected $noNeedLogin = ['fqb_plat_cate','run_countRecruitAct','test'];
    protected $noNeedLogin = ['recordItemClick','fqb_plat_cate','run_countRecruitAct','test'];
    protected $noNeedRight = '*';
    /**
     * 获取疯抢榜
@@ -265,7 +265,7 @@
    public function getCustomizePopup()
    {
        $LogicBanner = new LogicBanner();
        $list = $LogicBanner->getList(21);
        $list = $LogicBanner->getList('20,21');
        if(!$list||$list['customizePop']==null||count($list['customizePop'])==0)
        {
            $this->success('获取成功',[]);
@@ -273,10 +273,9 @@
        $user = $this->auth->getUser();
        $actInfo=new ActInfo();
        foreach ($list['customizePop'] as $vaule) {
            $paraJson=json_encode($vaule->parameter_json);
            $popupType=$paraJson['cmark'];
            $paraJson=json_decode($vaule->note);
            $isPop=false;
            switch($popupType)
            switch($paraJson->poptype)
            {
                case 'freebuy'://0元购弹窗
                    $isPop=$actInfo->popupcus_freebuy($user);
@@ -286,10 +285,27 @@
            }
            if($isPop)
            {
                $this->success('获取成功',$vaule);
                $this->success('获取成功',['haspop'=>true,'info'=>$vaule]);
                break;
            }
        }
        $this->success('获取成功',['haspop'=>false]);
    }
    /**
     *
     * 记录商品点击
     */
    public function recordItemClick()
    {
        $goodsid=request()->param('goodsid');
        $plat=request()->param('plat');
        $title=request()->param('title');
        $act_price=request()->param('act_price');
        $actInfo=new ActInfo();
        $actInfo->recordItemClick($goodsid,$plat,$title,$act_price);
        $this->success('成功',['success'=>true]);
    }