mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
增加后台记录域名
This commit is contained in:
parent
3ceefe05e2
commit
395b557835
@ -45,6 +45,10 @@ class Login extends Controller
|
|||||||
$this->captchaType = 'LoginCaptcha';
|
$this->captchaType = 'LoginCaptcha';
|
||||||
$this->captchaToken = CodeExtend::uniqidDate(18);
|
$this->captchaToken = CodeExtend::uniqidDate(18);
|
||||||
$this->devmode = SystemService::instance()->checkRunMode('dev');
|
$this->devmode = SystemService::instance()->checkRunMode('dev');
|
||||||
|
// 刷新当前后台域名
|
||||||
|
$host = "{$this->request->scheme()}://{$this->request->host()}";
|
||||||
|
if ($host !== sysconf('base.site_host')) sysconf('base.site_host', $host);
|
||||||
|
// 标记登录验证令牌
|
||||||
if (!$this->app->session->get('login_input_session_error')) {
|
if (!$this->app->session->get('login_input_session_error')) {
|
||||||
$this->app->session->set($this->captchaType, $this->captchaToken);
|
$this->app->session->set($this->captchaType, $this->captchaToken);
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,9 @@ class Auto extends Command
|
|||||||
if ($type === 'news') {
|
if ($type === 'news') {
|
||||||
[$item, $news] = [MediaService::instance()->news($data['news_id']), []];
|
[$item, $news] = [MediaService::instance()->news($data['news_id']), []];
|
||||||
if (!empty($item['articles'])) {
|
if (!empty($item['articles'])) {
|
||||||
|
$host = sysconf('base.site_host');
|
||||||
foreach ($item['articles'] as $vo) array_push($news, [
|
foreach ($item['articles'] as $vo) array_push($news, [
|
||||||
'url' => url("@wechat/api.view/item/id/{$vo['id']}", [], false, true)->build(),
|
'url' => url("@wechat/api.view/item/id/{$vo['id']}", [], false, $host)->build(),
|
||||||
'title' => $vo['title'], 'picurl' => $vo['local_url'], 'description' => $vo['digest'],
|
'title' => $vo['title'], 'picurl' => $vo['local_url'], 'description' => $vo['digest'],
|
||||||
]);
|
]);
|
||||||
$result = $this->_sendMessage('news', ['articles' => $news]);
|
$result = $this->_sendMessage('news', ['articles' => $news]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user