Files
julecn 9bab04be20 chore: 批量修改文件权限为可执行
将项目内绝大多数文件的权限从644调整为755,统一可执行权限配置
2026-08-02 16:29:01 +08:00

36 lines
1.1 KiB
PHP
Executable File

<?php
namespace app\kernel\Lebolebo;
use GuzzleHttp\Client;
class Account
{
protected $client;
public function __construct()
{
$this->client = new Client([
'timeout' => 10,
]);
}
public function login(string $username,string $password)
{
$url = 'https://api-manage2.shengtongedu.cn/st-permission-server/saas/account/login';
$options = [
'body'=>json_encode([
'campusIdList'=>['1863'],
'loginCode'=>$username,
'loginPassword'=>md5($password),
'platform'=>'OMO_WEB',
]),
'headers'=>[
'user-agent'=>'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Core/1.94.196.400 QQBrowser/11.7.5286.400',
'platform'=>'OMO_WEB',
'content-type'=>'application/json; charset=utf-8',
]
];
$result = $this->client->post($url,$options);
return json_decode($result->getBody()->getContents(),true);
}
}