<?php

namespace app\mobile;

use app\BaseController;
use app\common\model\SettingModel;

/**
 * 控制器基础类
 */
abstract class MobileBaseController extends BaseController
{
    // 初始化
    protected function initialize()
    {
        $setting = SettingModel::select();
        $set     = [];
        foreach ($setting as $v) {
            $set[$v['code']] = $v['value'];
        }
        config($set, 'mobile');
    }
}
