Merge pull request 'mkm' (#21) from mkm into dev

Reviewed-on: #21
This commit is contained in:
mkm 2023-09-14 09:21:16 +08:00
commit e544c5b702
2 changed files with 23 additions and 4 deletions

View File

@ -18,11 +18,21 @@ class JunziqianController extends BaseApiController
public array $notNeedLogin = ['download_file'];
/**请求地址*/
private $serviceUrl = env('junzi.url');
private $serviceUrl;
/**appkey*/
private $appkey =env('junzi.app_key');
private $appkey;
/**secret*/
private $appSecret = env('junzi.app_secret');
private $appSecret;
public function initialize()
{
$this->serviceUrl=env('junzi.url');
$this->appkey=env('junzi.app_key');
$this->appSecret=env('junzi.app_secret');
parent::initialize();
}
/**请求地址*/
// private $serviceUrl = 'https://api.junziqian.com';
// /**appkey*/

View File

@ -167,7 +167,16 @@ class LoginLogic extends BaseLogic
self::setError('无登录信息');
return false;
}
$userInfo = UserTokenService::setToken($user->id, 3);
$terminal=3;
$Android=IndexLogic::isAndroid();
if($Android){
$terminal=5;
}
$ios=IndexLogic::isIOS();
if($ios){
$terminal=6;
}
$userInfo = UserTokenService::setToken($user->id, $terminal);
//返回登录信息
$avatar = $user->avatar ?: Config::get('project.default_image.user_avatar');
$avatar = FileService::getFileUrl($avatar);