1.提交缺失的东西
This commit is contained in:
@ -42,6 +42,7 @@ use think\facade\Db;
|
||||
use think\facade\Config;
|
||||
use think\facade\Cache;
|
||||
use think\facade\Hook;
|
||||
use weixin\Getopenid;
|
||||
|
||||
class LoginLogic extends LogicBase
|
||||
{
|
||||
@ -90,13 +91,13 @@ class LoginLogic extends LogicBase
|
||||
// 生成分销会员基础表
|
||||
\app\common\logic\DistributionLogic::add($user->id);
|
||||
|
||||
//注册赠送
|
||||
self::registerAward($user->id);
|
||||
//消息通知
|
||||
Hook::listen('notice', [
|
||||
'user_id' => $user->id,
|
||||
'scene' => NoticeSetting::REGISTER_SUCCESS_NOTICE,
|
||||
]);
|
||||
// //注册赠送
|
||||
// self::registerAward($user->id);
|
||||
// //消息通知
|
||||
// Hook::listen('notice', [
|
||||
// 'user_id' => $user->id,
|
||||
// 'scene' => NoticeSetting::REGISTER_SUCCESS_NOTICE,
|
||||
// ]);
|
||||
return $token;
|
||||
}
|
||||
/**
|
||||
@ -339,6 +340,12 @@ class LoginLogic extends LogicBase
|
||||
->field(['id', 'nickname', 'avatar', 'level', 'disable', 'distribution_code'])
|
||||
->where(['account|mobile' => $post['account']])
|
||||
->find();
|
||||
if($user_info == null){
|
||||
$open=new Getopenid();
|
||||
$response['openid'] = $open;
|
||||
$response['mobile'] = $post['account'];
|
||||
$user_info = UserServer::createUser($response, Client_::mnp);
|
||||
}
|
||||
$user_info['token'] = self::createSession($user_info['id'], $post['client']);
|
||||
if (empty($user_info['avatar'])) {
|
||||
$user_info['avatar'] = UrlServer::getFileUrl(ConfigServer::get('website', 'user_image'));
|
||||
|
||||
Reference in New Issue
Block a user