mirror of
				https://gitee.com/zoujingli/ThinkAdmin.git
				synced 2025-10-27 02:12:08 +08:00 
			
		
		
		
	增加后台记录域名
This commit is contained in:
		
							parent
							
								
									3ceefe05e2
								
							
						
					
					
						commit
						395b557835
					
				| @ -45,6 +45,10 @@ class Login extends Controller | ||||
|                 $this->captchaType = 'LoginCaptcha'; | ||||
|                 $this->captchaToken = CodeExtend::uniqidDate(18); | ||||
|                 $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')) { | ||||
|                     $this->app->session->set($this->captchaType, $this->captchaToken); | ||||
|                 } | ||||
|  | ||||
| @ -88,8 +88,9 @@ class Auto extends Command | ||||
|         if ($type === 'news') { | ||||
|             [$item, $news] = [MediaService::instance()->news($data['news_id']), []]; | ||||
|             if (!empty($item['articles'])) { | ||||
|                 $host = sysconf('base.site_host'); | ||||
|                 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'], | ||||
|                 ]); | ||||
|                 $result = $this->_sendMessage('news', ['articles' => $news]); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user