|
@@ -19,13 +19,27 @@ class GradeData |
|
@@ -19,13 +19,27 @@ class GradeData |
19
|
* @return array 接口返回的会员等级数据
|
19
|
* @return array 接口返回的会员等级数据
|
20
|
*/
|
20
|
*/
|
21
|
public function getGradeData($channel, $uid) {
|
21
|
public function getGradeData($channel, $uid) {
|
22
|
-
|
22
|
+ $urlList = array();
|
|
|
23
|
+ //获取会员等级数据
|
23
|
$param = Yohobuy::param();
|
24
|
$param = Yohobuy::param();
|
24
|
$param['yh_channel'] = $channel;
|
25
|
$param['yh_channel'] = $channel;
|
25
|
$param['uid'] = $uid;
|
26
|
$param['uid'] = $uid;
|
26
|
$param['method'] = 'app.Passport.vip';
|
27
|
$param['method'] = 'app.Passport.vip';
|
27
|
$param['client_secret'] = Sign::getSign($param);
|
28
|
$param['client_secret'] = Sign::getSign($param);
|
28
|
- return Yohobuy::get(Yohobuy::API_URL, $param);
|
29
|
+ $urlList['grade'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL,$param);
|
|
|
30
|
+
|
|
|
31
|
+ //获取用户基本信息数据(用来得到username)
|
|
|
32
|
+ $param = array();
|
|
|
33
|
+ $param = Yohobuy::param();
|
|
|
34
|
+ $param['gender'] = $gender;
|
|
|
35
|
+ $param['uid'] = $uid;
|
|
|
36
|
+ $param['yh_channel'] = $channel;
|
|
|
37
|
+ $param['method'] = 'app.passport.profile';
|
|
|
38
|
+ $param['client_secret'] = Sign::getSign($param);
|
|
|
39
|
+ $urlList['userProfile'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL,$param);
|
|
|
40
|
+
|
|
|
41
|
+ return Yohobuy::getMulti($urlList);
|
|
|
42
|
+ //return Yohobuy::get(Yohobuy::API_URL, $param);
|
29
|
}
|
43
|
}
|
30
|
|
44
|
|
31
|
/**
|
45
|
/**
|
|
@@ -44,18 +58,18 @@ class GradeData |
|
@@ -44,18 +58,18 @@ class GradeData |
44
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
58
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
45
|
}
|
59
|
}
|
46
|
|
60
|
|
47
|
- /**
|
|
|
48
|
- * 获取用户基本信息数据
|
|
|
49
|
- */
|
|
|
50
|
- public function getUserProfileData($gender, $uid, $channel) {
|
|
|
51
|
- $param = Yohobuy::param();
|
|
|
52
|
- $param['gender'] = $gender;
|
|
|
53
|
- $param['uid'] = $uid;
|
|
|
54
|
- $param['yh_channel'] = $channel;
|
|
|
55
|
- $param['method'] = 'app.passport.profile';
|
|
|
56
|
- $param['client_secret'] = Sign::getSign($param);
|
|
|
57
|
-
|
|
|
58
|
- return Yohobuy::get("http://api.open.yohobuy.com/",$param);
|
|
|
59
|
- }
|
61
|
+// /**
|
|
|
62
|
+// * 获取用户基本信息数据
|
|
|
63
|
+// */
|
|
|
64
|
+// public function getUserProfileData($gender, $uid, $channel) {
|
|
|
65
|
+// $param = Yohobuy::param();
|
|
|
66
|
+// $param['gender'] = $gender;
|
|
|
67
|
+// $param['uid'] = $uid;
|
|
|
68
|
+// $param['yh_channel'] = $channel;
|
|
|
69
|
+// $param['method'] = 'app.passport.profile';
|
|
|
70
|
+// $param['client_secret'] = Sign::getSign($param);
|
|
|
71
|
+//
|
|
|
72
|
+// return Yohobuy::get("http://api.open.yohobuy.com/",$param);
|
|
|
73
|
+// }
|
60
|
|
74
|
|
61
|
} |
75
|
} |