commit
e544c5b702
@ -18,11 +18,21 @@ class JunziqianController extends BaseApiController
|
|||||||
public array $notNeedLogin = ['download_file'];
|
public array $notNeedLogin = ['download_file'];
|
||||||
|
|
||||||
/**请求地址*/
|
/**请求地址*/
|
||||||
private $serviceUrl = env('junzi.url');
|
private $serviceUrl;
|
||||||
/**appkey*/
|
/**appkey*/
|
||||||
private $appkey =env('junzi.app_key');
|
private $appkey;
|
||||||
/**secret*/
|
/**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';
|
// private $serviceUrl = 'https://api.junziqian.com';
|
||||||
// /**appkey*/
|
// /**appkey*/
|
||||||
|
@ -167,7 +167,16 @@ class LoginLogic extends BaseLogic
|
|||||||
self::setError('无登录信息');
|
self::setError('无登录信息');
|
||||||
return false;
|
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 = $user->avatar ?: Config::get('project.default_image.user_avatar');
|
||||||
$avatar = FileService::getFileUrl($avatar);
|
$avatar = FileService::getFileUrl($avatar);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user