2025-03-12 12:18:06 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace app\api\controller;
|
|
|
|
|
|
|
|
|
|
use think\Controller;
|
2025-03-17 10:09:27 +08:00
|
|
|
use think\facade\Env;
|
2025-04-09 14:45:27 +08:00
|
|
|
use app\common\service\AuthService;
|
2025-03-12 12:18:06 +08:00
|
|
|
|
2025-04-28 15:39:05 +08:00
|
|
|
class BaseController extends Controller
|
|
|
|
|
{
|
2025-03-12 12:18:06 +08:00
|
|
|
/**
|
|
|
|
|
* 令牌
|
|
|
|
|
*
|
2025-03-17 10:09:27 +08:00
|
|
|
* @var string
|
2025-03-12 12:18:06 +08:00
|
|
|
*/
|
2025-03-17 10:09:27 +08:00
|
|
|
protected $token = '';
|
|
|
|
|
protected $baseUrl;
|
2025-04-09 14:45:27 +08:00
|
|
|
protected $authorization = '';
|
|
|
|
|
|
2025-04-28 15:39:05 +08:00
|
|
|
public function __construct()
|
|
|
|
|
{
|
2025-03-17 10:09:27 +08:00
|
|
|
parent::__construct();
|
|
|
|
|
$this->baseUrl = Env::get('api.wechat_url');
|
2025-04-09 14:45:27 +08:00
|
|
|
$this->authorization = AuthService::getSystemAuthorization();
|
2025-03-12 12:18:06 +08:00
|
|
|
}
|
2025-03-17 10:09:27 +08:00
|
|
|
}
|