...
|
...
|
@@ -161,7 +161,7 @@ class User extends Api |
|
|
->where('openid', $openid)
|
|
|
->where('app_id', $appId)
|
|
|
->update($userData);
|
|
|
$this->success("登录成功!", ['token' => $token]);
|
|
|
$this->success("登录成功!", ['token' => $token, 'avatar' => $wxUserData['avatarUrl']]);
|
|
|
} else {
|
|
|
if(empty($data['inviter'])){
|
|
|
$invite_id = '';
|
...
|
...
|
@@ -361,4 +361,41 @@ class User extends Api |
|
|
}
|
|
|
$this->success('success',$data);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @ApiTitle (获取用户融云账号信息)
|
|
|
* @ApiSummary (获取用户融云账号信息)
|
|
|
* @ApiMethod (POST)
|
|
|
* @ApiRoute (/api/user/rongyun)
|
|
|
*
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
|
|
"msg": "成功",
|
|
|
"time": "1571492001",
|
|
|
"data": {
|
|
|
"id"://融云id
|
|
|
"token"://融云token
|
|
|
}
|
|
|
})
|
|
|
*/
|
|
|
public function rongyun() {
|
|
|
$return = [
|
|
|
'id' => '',
|
|
|
'token' => ''
|
|
|
];
|
|
|
if($this->userId) {
|
|
|
$user_id = $this->getUserId();
|
|
|
if($this->user['is_create'] == 1) {
|
|
|
$return = [
|
|
|
'id' => $this->user['rongyun_id'],
|
|
|
'token' => $this->user['rongyun_token'],
|
|
|
];
|
|
|
}
|
|
|
}
|
|
|
$this->success('成功',$return);
|
|
|
}
|
|
|
} |
...
|
...
|
|