|
@@ -24,15 +24,21 @@ class LoginData |
|
@@ -24,15 +24,21 @@ class LoginData |
24
|
* @param string $area 地区编号
|
24
|
* @param string $area 地区编号
|
25
|
* @param string $profile 邮箱或手机号
|
25
|
* @param string $profile 邮箱或手机号
|
26
|
* @param string $password 密码
|
26
|
* @param string $password 密码
|
|
|
27
|
+ * @param string $shoppingKey 未登录用户唯一识别码, 默认为空
|
27
|
* @return array
|
28
|
* @return array
|
28
|
*/
|
29
|
*/
|
29
|
- public static function signin($area, $profile, $password)
|
30
|
+ public static function signin($area, $profile, $password, $shoppingKey = null)
|
30
|
{
|
31
|
{
|
31
|
$param = Yohobuy::param();
|
32
|
$param = Yohobuy::param();
|
32
|
$param['method'] = 'app.passport.signin';
|
33
|
$param['method'] = 'app.passport.signin';
|
33
|
$param['area'] = $area;
|
34
|
$param['area'] = $area;
|
34
|
$param['profile'] = $profile;
|
35
|
$param['profile'] = $profile;
|
35
|
$param['password'] = $password;
|
36
|
$param['password'] = $password;
|
|
|
37
|
+
|
|
|
38
|
+ if (!empty($shoppingKey)) {
|
|
|
39
|
+ $param['shopping_key'] = $shoppingKey;
|
|
|
40
|
+ }
|
|
|
41
|
+
|
36
|
$param['client_secret'] = Sign::getSign($param);
|
42
|
$param['client_secret'] = Sign::getSign($param);
|
37
|
|
43
|
|
38
|
return Yohobuy::post(Yohobuy::API_URL, $param);
|
44
|
return Yohobuy::post(Yohobuy::API_URL, $param);
|