修改im
This commit is contained in:
parent
1164d47158
commit
95a14c5a59
@ -48,7 +48,6 @@ class LoginService extends BaseService
|
||||
|
||||
// 获取用户openid
|
||||
$wx_info_data = $weChat->codeToSession($wx_code);
|
||||
dump($wx_info_data);
|
||||
if (empty($wx_info_data['session_key']) || empty($wx_info_data['openid'])) {
|
||||
return fail(HttpEnumCode::GET_WX_ERROR);
|
||||
}
|
||||
@ -200,6 +199,20 @@ class LoginService extends BaseService
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::SERVER_ERROR);
|
||||
}
|
||||
|
||||
try {
|
||||
$avatar = addAliyunOssWebsite($user['avatar']);
|
||||
|
||||
$account = new Account();
|
||||
// 查询账号导入状态
|
||||
$res = $account->checkAccountStatus($user['user_id']);
|
||||
if (!$res) {
|
||||
// 创建单个账号
|
||||
$account->createAccount($user['user_id'], $user['user_name'], $avatar);
|
||||
}
|
||||
}catch(\Exception $e){
|
||||
Log::getInstance()->error("IM账号倒入失败");
|
||||
}
|
||||
}
|
||||
|
||||
// 记录用户登陆记录
|
||||
@ -431,6 +444,20 @@ class LoginService extends BaseService
|
||||
Db::rollBack();
|
||||
return fail(HttpEnumCode::SERVER_ERROR);
|
||||
}
|
||||
|
||||
try {
|
||||
$avatar = addAliyunOssWebsite($user['avatar']);
|
||||
|
||||
$account = new Account();
|
||||
// 查询账号导入状态
|
||||
$res = $account->checkAccountStatus($user['user_id']);
|
||||
if (!$res) {
|
||||
// 创建单个账号
|
||||
$account->createAccount($user['user_id'], $user['user_name'], $avatar);
|
||||
}
|
||||
}catch(\Exception $e){
|
||||
Log::getInstance()->error("IM账号倒入失败");
|
||||
}
|
||||
}
|
||||
|
||||
// 记录用户登陆记录
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user