You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
683 B

<?php
declare (strict_types=1);
namespace app\api\controller;
use app\BaseController;
use auth\PermissAuth;
use think\App;
use think\facade\Db;
use think\facade\Request;
use think\facade\Validate;
class CmsBase extends Common
{
public function __construct(App $app)
{
parent::__construct($app);
//获取当前site_id 使用的模板id
$site_data = Db::name('site')->where('id',SITE_ID)->find();
$template_id = 0; //默认0
if($site_data){
$template_id = $site_data['use_template'];
}
/**
* 模板ID
*/
defined('TEMPLATE_ID') ?: define('TEMPLATE_ID', $template_id);
}
}