Authored by 周少峰

add shopping_key to synchronous cart data

... ... @@ -81,8 +81,9 @@ class BindData
* @param string $mobile 手机号
* @param string $area 国别码
* @param string $password 密码
* @param string $shoppingKey 未登录用户唯一识别码, 默认为空
*/
public static function bindMobile($openId, $sourceType, $mobile, $area, $password = '', $nickname = '')
public static function bindMobile($openId, $sourceType, $mobile, $area, $password = '', $nickname = '', $shoppingKey = null)
{
$param = Yohobuy::param();
... ... @@ -100,9 +101,13 @@ class BindData
if (!empty($password)) {
$param['password'] = $password;
}
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
// return Yohobuy::get(API_URL, $param);
return Yohobuy::get('http://devapi.yoho.cn:28078/', $param);
}
/**
... ... @@ -112,8 +117,9 @@ class BindData
* @param string $sourceType 登录方式
* @param string $mobile 手机号
* @param string $area 国别码
* @param string $shoppingKey 未登录用户唯一识别码, 默认为空
*/
public static function relateMobile($openId, $sourceType, $mobile, $area)
public static function relateMobile($openId, $sourceType, $mobile, $area, $shoppingKey = null)
{
$param = Yohobuy::param();
... ... @@ -122,10 +128,13 @@ class BindData
$param['openId'] = $openId;
$param['source_type'] = $sourceType;
$param['area'] = $area;
if (!empty($shoppingKey)) {
$param['shopping_key'] = $shoppingKey;
}
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
// return Yohobuy::get(API_URL, $param);
return Yohobuy::get('http://devapi.yoho.cn:28078/', $param);
}
/**
... ...