中秋节快乐
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\index;
|
||||
|
||||
use think\App;
|
||||
use EasyWeChat\Factory;
|
||||
use app\model\Conf as ConfModel;
|
||||
use app\model\User as UserModel;
|
||||
|
||||
/**
|
||||
* 控制器基础类
|
||||
*/
|
||||
abstract class QfShop
|
||||
{
|
||||
/**
|
||||
* 应用实例
|
||||
* @var \think\App
|
||||
*/
|
||||
protected $app;
|
||||
|
||||
/**
|
||||
* 构造方法
|
||||
* @access public
|
||||
* @param App $app 应用对象
|
||||
*/
|
||||
public function __construct(App $app)
|
||||
{
|
||||
$this->app = $app;
|
||||
$this->request = $this->app->request;
|
||||
// 控制器初始化
|
||||
$this->initialize();
|
||||
}
|
||||
|
||||
// 初始化
|
||||
protected function initialize()
|
||||
{
|
||||
$this->confModel = new ConfModel();
|
||||
|
||||
$configs = $this->confModel->select()->toArray();
|
||||
$c = array_column($configs, 'conf_value', 'conf_key');
|
||||
config($c, 'qfshop');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user