<?php

namespace app\controller\api;

use app\model\User;
use support\Request;

use App\Utils\ApiResponse;

use App\model\Carousel;
use App\model\Project;
use App\model\ProjectDetailed;
use App\model\ProjectRegister;
use App\model\Carouselad;
use App\model\VipLevel;
use App\Utils\ApiResponseApp;
use Tinywan\Jwt\JwtToken;

use hg\apidoc\annotation as Apidoc;
use support\Db;

/**
 * @Apidoc\Title("用户vip控制器")
 */

class Vip_salaryController
{
    protected $noNeedLogin = [ 'get_project', 'get_projectdetailed', 'get_mechanism_list'];
    /**
     * @Apidoc\Title("1.0 获取首页轮播图")
     * @Apidoc\Url("api/vip_salary/product")
     * @Apidoc\Method("POST")
     */
    public function user_count(Request $request)
    {
        $user_id=$request->data['id'];
        var_dump($user_id);
        $user=User::find($user_id);
        return ApiResponseApp::success(['user_count'=>$user->vip_id]);
    }
        /**
     * @Apidoc\Title("1.0 获取vip等级赠送积分")
     * @Apidoc\Url("api/vip_salary/product")
     * @Apidoc\Method("POST")
     */
    public function product(Request $request)
    {
        $res = VipLevel::all();
        return ApiResponseApp::success($res);
    }
    

}
