GradeData.php
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?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));
}
}