|
@@ -81,17 +81,21 @@ class BindData |
|
@@ -81,17 +81,21 @@ class BindData |
81
|
* @param string $area 国别码
|
81
|
* @param string $area 国别码
|
82
|
* @param string $password 密码
|
82
|
* @param string $password 密码
|
83
|
*/
|
83
|
*/
|
84
|
- public static function bindMobile($openId, $nickname, $sourceType, $mobile, $area, $password = '')
|
84
|
+ public static function bindMobile($openId, $sourceType, $mobile, $area, $password = '', $nickname = '')
|
85
|
{
|
85
|
{
|
86
|
$param = Yohobuy::param();
|
86
|
$param = Yohobuy::param();
|
87
|
|
87
|
|
88
|
$param['method'] = 'app.passport.bind';
|
88
|
$param['method'] = 'app.passport.bind';
|
89
|
$param['mobile'] = $mobile;
|
89
|
$param['mobile'] = $mobile;
|
90
|
$param['open_id'] = $openId;
|
90
|
$param['open_id'] = $openId;
|
91
|
- $param['nickname'] = $nickname;
|
|
|
92
|
$param['source_type'] = $sourceType;
|
91
|
$param['source_type'] = $sourceType;
|
93
|
$param['area'] = $area;
|
92
|
$param['area'] = $area;
|
94
|
- if (!empty($password)) {
|
93
|
+ if (!empty($nickname))
|
|
|
94
|
+ {
|
|
|
95
|
+ $param['nickname'] = $nickname;
|
|
|
96
|
+ }
|
|
|
97
|
+ if (!empty($password))
|
|
|
98
|
+ {
|
95
|
$param['password'] = $password;
|
99
|
$param['password'] = $password;
|
96
|
}
|
100
|
}
|
97
|
$param['client_secret'] = Sign::getSign($param);
|
101
|
$param['client_secret'] = Sign::getSign($param);
|
|
@@ -99,7 +103,6 @@ class BindData |
|
@@ -99,7 +103,6 @@ class BindData |
99
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
103
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
100
|
}
|
104
|
}
|
101
|
|
105
|
|
102
|
-
|
|
|
103
|
/**
|
106
|
/**
|
104
|
* 换绑手机检验
|
107
|
* 换绑手机检验
|
105
|
* @param string $mobile 手机号
|
108
|
* @param string $mobile 手机号
|
|
@@ -116,7 +119,6 @@ class BindData |
|
@@ -116,7 +119,6 @@ class BindData |
116
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
119
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
117
|
}
|
120
|
}
|
118
|
|
121
|
|
119
|
-
|
|
|
120
|
/**
|
122
|
/**
|
121
|
* 换绑手机
|
123
|
* 换绑手机
|
122
|
* @param string $uid 用户Id
|
124
|
* @param string $uid 用户Id
|
|
@@ -138,5 +140,4 @@ class BindData |
|
@@ -138,5 +140,4 @@ class BindData |
138
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
140
|
return Yohobuy::get(Yohobuy::API_URL, $param);
|
139
|
}
|
141
|
}
|
140
|
|
142
|
|
141
|
-
|
|
|
142
|
} |
143
|
} |