GradeData.php 1.44 KB
<?php

    namespace LibModels\Wap\Home;
    use Api\Yohobuy;
    use Api\Sign;
/*
 *个人中心-会员等级接口操作类
 */
    
class GradeData {
    
    /**
    * 获取会员等级展示数据
    */
    public function getGradeData($channel,$uid){
        
        $param = Yohobuy::param();
        $param['yh_channel'] = $channel;
        $param['uid'] = $uid;
        $param['method'] = 'app.Passport.vip';
        $param['client_secret'] = Sign::getSign($param);
        return Yohobuy::get(Yohobuy::API_URL,$param);
    }
    /**
    * 获取会员特权查看页面数据
    */
    public function getPreferentialData($channel,$uid){
        $param = Yohobuy::param();
        $param['yh_channel'] = $channel;
        $param['uid'] = $uid;
        $param['method'] = 'app.passport.getPrivilege';   
        $param['client_secret'] = Sign::getSign($param);
        //print_r($param);
        //print_r(Yohobuy::get('http://api.open.yohobuy.com',$param));
        return Yohobuy::get(Yohobuy::API_URL,$param);
    }
    
      /**
    * 获取用户基本信息数据
    */
    public function getUserProfileData($gender,$uid,$channel){
        $param = Yohobuy::param();
        $param['gender'] = $gender;
        $param['uid'] = $uid;
        $param['yh_channel'] = $channel;
        $param['method'] = 'app.passport.profile';
        $param['client_secret'] = Sign::getSign($param);
        
        var_dump(Yohobuy::get(Yohobuy::API_URL,$param));
    }
}