...
|
...
|
@@ -81,17 +81,21 @@ class BindData |
|
|
* @param string $area 国别码
|
|
|
* @param string $password 密码
|
|
|
*/
|
|
|
public static function bindMobile($openId, $nickname, $sourceType, $mobile, $area, $password = '')
|
|
|
public static function bindMobile($openId, $sourceType, $mobile, $area, $password = '', $nickname = '')
|
|
|
{
|
|
|
$param = Yohobuy::param();
|
|
|
|
|
|
$param['method'] = 'app.passport.bind';
|
|
|
$param['mobile'] = $mobile;
|
|
|
$param['open_id'] = $openId;
|
|
|
$param['nickname'] = $nickname;
|
|
|
$param['source_type'] = $sourceType;
|
|
|
$param['area'] = $area;
|
|
|
if (!empty($password)) {
|
|
|
if (!empty($nickname))
|
|
|
{
|
|
|
$param['nickname'] = $nickname;
|
|
|
}
|
|
|
if (!empty($password))
|
|
|
{
|
|
|
$param['password'] = $password;
|
|
|
}
|
|
|
$param['client_secret'] = Sign::getSign($param);
|
...
|
...
|
@@ -99,7 +103,6 @@ class BindData |
|
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 换绑手机检验
|
|
|
* @param string $mobile 手机号
|
...
|
...
|
@@ -116,7 +119,6 @@ class BindData |
|
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 换绑手机
|
|
|
* @param string $uid 用户Id
|
...
|
...
|
@@ -138,5 +140,4 @@ class BindData |
|
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|