<?php

/**
 * 礼物系统
 * 2020-4-9 18:02:46
 * junshi
*/

class giftController extends baseController
{

    /**
     * 礼物列表
     * return $gift
     */
    public function getGiftListAction(){
        $gift = (new giftModule())->getAllBySort(["status"=>1]);
        returnSuccess($gift,getcodestr(200),200);
    }

    /**
     * 礼物赠送
    */
    public function userSentGiftAction(){

        //获取参数信息
        $request = Request::unsetRoute()->all();
        $userModule = new userModule();
        $user_info = $userModule->getUserInfoByToken();

        //执行赠送
        $giftModule = new giftModule();
        $giftModule->verUserSentGift($user_info,$request);
    }

}