Phalcon Framework 3.4.2

RedisException: Connection refused

/data/home/yzhang/WebHospital/Manager/Applications/Common/di-services-db.php (296)
#0Redis->pconnect(127.0.0.1, 6379)
/data/home/yzhang/WebHospital/Manager/Applications/Common/di-services-db.php (296)
<?php
 
// * Database connection is created based in the parameters defined in the configuration file
$di->set('db', function () use ($di, $config) {
 
    $dbConnection = new \Phalcon\Db\Adapter\Pdo\Mysql(array(
        "host" => $config->database->host,
        "username" => $config->database->username,
        "password" => $config->database->password,
        "dbname" => $config->database->db_name,
        'charset' => 'utf8',
        "options" => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
            PDO::ATTR_PERSISTENT => true, #使用持久连接
//            \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
//            \PDO::ATTR_AUTOCOMMIT => false,
        )
    ));
 
    // 如果是开发环境,则开启调试模式...
    if (DEV_ING) {
        $eventsManager = $di->getShared('eventsManager');
        //$eventsManager = new \Phalcon\Events\Manager();
 
        // 分析底层sql性能,并记录日志
        // [Phalcon 框架如何在model执行完毕,如何打印SQL?](https://segmentfault.com/q/1010000008456941/a-1020000008594825)
        $dbProfiler = new \Phalcon\Db\Profiler();
        $eventsManager->attach('db', function ($event, $connection) use ($dbProfiler) {
 
            # 事件类型...
            $evt = $event->getType();
 
            #lg_debug("|||||||||||||||||||||#DbProfiler@-----------[Model-:" . get_class($connection) . "][Evt: {$evt}].........................................................................");
 
            # 事件处理...
            switch ($evt) {
                case "beforeQuery":
                    // 在sql发送到数据库前启动分析
                    $sql = $connection->getSQLStatement();
                    $dbProfiler->startProfile($sql);
                    break;
                case "afterQuery":
                    // 在sql执行完毕后停止分析
                    $dbProfiler->stopProfile();
 
                    // Get the last profile in the profiler
                    $dpProfile = $dbProfiler->getLastProfile();
                    //echo "SQL Statement: ", $dpProfile->getSQLStatement(), "\n";
                    //echo "Start Time: ", $dpProfile->getInitialTime(), "\n";
                    //echo "Final Time: ", $dpProfile->getFinalTime(), "\n";
                    //echo "Total Elapsed Time: ", $dpProfile->getTotalElapsedSeconds(), "\n";
                    $sql = $dpProfile->getSQLStatement();
                    $executeTime = $dpProfile->getTotalElapsedSeconds();
 
                    #lg_debug("#DbProfiler@[sql: {$sql}][executeTime: {$executeTime}]");
                    break;
                default:
                    break;
            }
        });
 
        /* 注册监听事件 */
        $dbConnection->setEventsManager($eventsManager);
    }
 
    return $dbConnection;
});
 
// 主库
$di->setShared('dbWrite', function () use ($di, $config) {
    $dbConnection = new \Phalcon\Db\Adapter\Pdo\Mysql(array(
        "host" => $config->w_database->host,
        "username" => $config->w_database->username,
        "password" => $config->w_database->password,
        "dbname" => $config->w_database->db_name,
        'charset' => 'utf8',
        "options" => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
            PDO::ATTR_PERSISTENT => true, #使用持久连接
//            \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
//            \PDO::ATTR_AUTOCOMMIT => false,
        )
    ));
 
    // 如果是开发环境,则开启调试模式...
    if (DEV_ING) {
        $eventsManager = $di->getShared('eventsManager');
        //$eventsManager = new \Phalcon\Events\Manager();
 
        // 分析底层sql性能,并记录日志
        // [Phalcon 框架如何在model执行完毕,如何打印SQL?](https://segmentfault.com/q/1010000008456941/a-1020000008594825)
        $dbProfiler = new \Phalcon\Db\Profiler();
        $eventsManager->attach('db', function ($event, $connection) use ($dbProfiler) {
 
            # 事件类型...
            $evt = $event->getType();
 
            #lg_debug("|||||||||||||||||||||#DbProfiler@-----------[Model-:" . get_class($connection) . "][Evt: {$evt}].........................................................................");
 
            # 事件处理...
            switch ($evt) {
                case "beforeQuery":
                    // 在sql发送到数据库前启动分析
                    $sql = $connection->getSQLStatement();
                    $dbProfiler->startProfile($sql);
                    break;
                case "afterQuery":
                    // 在sql执行完毕后停止分析
                    $dbProfiler->stopProfile();
 
                    // Get the last profile in the profiler
                    $dpProfile = $dbProfiler->getLastProfile();
                    //echo "SQL Statement: ", $dpProfile->getSQLStatement(), "\n";
                    //echo "Start Time: ", $dpProfile->getInitialTime(), "\n";
                    //echo "Final Time: ", $dpProfile->getFinalTime(), "\n";
                    //echo "Total Elapsed Time: ", $dpProfile->getTotalElapsedSeconds(), "\n";
                    $sql = $dpProfile->getSQLStatement();
                    $executeTime = $dpProfile->getTotalElapsedSeconds();
 
                    #lg_debug("#DbProfiler@[sql: {$sql}][executeTime: {$executeTime}]");
                    break;
                default:
                    break;
            }
        });
 
        /* 注册监听事件 */
        $dbConnection->setEventsManager($eventsManager);
    }
 
    return $dbConnection;
});
 
//  从库VIP
$di->setShared('dbRead', function () use ($di, $config) {
    $dbConnection = new \Phalcon\Db\Adapter\Pdo\Mysql(array(
        "host" => $config->r_database->host,
        "username" => $config->r_database->username,
        "password" => $config->r_database->password,
        "dbname" => $config->r_database->db_name,
        'charset' => 'utf8',
        "options" => array(
            PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
            PDO::ATTR_PERSISTENT => true, #使用持久连接
//            \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
//            \PDO::ATTR_AUTOCOMMIT => false,
        )
    ));
 
    // 如果是开发环境,则开启调试模式...
    if (DEV_ING) {
        $eventsManager = $di->getShared('eventsManager');
        //$eventsManager = new \Phalcon\Events\Manager();
 
        // 分析底层sql性能,并记录日志
        // [Phalcon 框架如何在model执行完毕,如何打印SQL?](https://segmentfault.com/q/1010000008456941/a-1020000008594825)
        $dbProfiler = new \Phalcon\Db\Profiler();
        $eventsManager->attach('db', function ($event, $connection) use ($dbProfiler) {
 
            # 事件类型...
            $evt = $event->getType();
 
            #lg_debug("|||||||||||||||||||||#DbProfiler@-----------[Model-:" . get_class($connection) . "][Evt: {$evt}].........................................................................");
 
            # 事件处理...
            switch ($evt) {
                case "beforeQuery":
                    // 在sql发送到数据库前启动分析
                    $sql = $connection->getSQLStatement();
                    $dbProfiler->startProfile($sql);
                    break;
                case "afterQuery":
                    // 在sql执行完毕后停止分析
                    $dbProfiler->stopProfile();
 
                    // Get the last profile in the profiler
                    $dpProfile = $dbProfiler->getLastProfile();
                    //echo "SQL Statement: ", $dpProfile->getSQLStatement(), "\n";
                    //echo "Start Time: ", $dpProfile->getInitialTime(), "\n";
                    //echo "Final Time: ", $dpProfile->getFinalTime(), "\n";
                    //echo "Total Elapsed Time: ", $dpProfile->getTotalElapsedSeconds(), "\n";
                    $sql = $dpProfile->getSQLStatement();
                    $executeTime = $dpProfile->getTotalElapsedSeconds();
 
                    #lg_debug("#DbProfiler@[sql: {$sql}][executeTime: {$executeTime}]");
                    break;
                default:
                    break;
            }
        });
 
        /* 注册监听事件 */
        $dbConnection->setEventsManager($eventsManager);
    }
 
    return $dbConnection;
});
 
// 设置模型缓存服务
// [缓存对象关系映射(Caching in the ORM)](https://docs.phalconphp.com/zh/latest/reference/models-cache.html)
// [Class Phalcon\Cache\Backend\Redis](https://docs.phalconphp.com/zh/latest/api/Phalcon_Cache_Backend_Redis.html)
$di->set("modelsCache", function () use ($config) {
 
    // 默认缓存时间为一天
    $frontCache = new \Phalcon\Cache\Frontend\Data([
        "lifetime" => 60,
    ]);
 
    // Memcached连接配置 这里使用的是Memcache适配器
    $cache = new \Phalcon\Cache\Backend\Redis($frontCache, [
        'host' => $config->redis_cache->host,
        'port' => $config->redis_cache->port,
        'index' => $config->redis_cache->db_index,//选择的数据库 从 0 ~ 15 ,默认为 0
        'auth' => $config->redis_cache->password,//验证相关
        //"persistent" => false,
        //'statsKey' => ':MC',
        'statsKey' => '_PHCR',
        'prefix' => "_MC:" //加区分层结构
    ]);
 
    return $cache;
});
 
// 设置通用缓存服务...
$di->set("commonCache", function () use ($config) {
 
    // 默认缓存时间为一天
    $frontCache = new Phalcon\Cache\Frontend\Data([
        "lifetime" => 60,
    ]);
 
    // Memcached连接配置 这里使用的是Memcache适配器
    $cache = new Phalcon\Cache\Backend\Redis($frontCache, [
        'host' => $config->redis_cache->host,
        'port' => $config->redis_cache->port,
        'index' => $config->redis_cache->db_index,//选择的数据库 从 0 ~ 15 ,默认为 0
        'auth' => $config->redis_cache->password,//验证相关
        //"persistent" => false,
        //'statsKey' => ':MC',
        'statsKey' => '_PHCR',
        'prefix' => "_CC:" //加区分层结构
    ]);
 
    return $cache;
});
 
// * memcacheDB缓存
$di->set('memcacheDB', function () use ($config) {
 
    // Create a Data frontend and set a default lifetime to 1 hour
    $frontend = new Phalcon\Cache\Frontend\Data(array(
        'lifetime' => $config->memcache_db["lifttime"]
    ));
 
    // memcacheDB 需要安装 *memcache* 扩展-当前服务器没有安装memcache扩展,不推荐使用此扩展
    //2016/05/14 10:31:56 [error] 32433#32433: *307 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class 'memcache' not found in /data/home/yzhang/CoamServer/Home/applications/Controllers/AjaxloadController.php on line 51" while reading response header from upstream, client: 58.48.206.108, server: coam.co, request: "POST /ajaxLoad/areaSerial HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "coam.co", referrer: "https://lw.coam.co/"
 
 
    // Set up memcacheDBd and use tracking to be able to clean it later.
    // You should not use tracking if you're going to store a lot of keys!
//    $memcacheDB = new Phalcon\Cache\Backend\memcacheDB($frontend, array(
//        //'host' => '43.241.222.110', #开启远程访问
//        'host' => '127.0.0.1', #开启远程访问
//        'port' => 11211,
//        'tracking' => true
//    ));
 
    // memcacheDB 需要安装 *memcached* 扩展-当前服务器安装memcached扩展,推荐使用此最新扩展
    // https://docs.phalconphp.com/zh/latest/api/Phalcon_Cache_Backend_Libmemcached.html
    //Create the Cache setting memcached connection options
    $memcacheDB = new \Phalcon\Cache\Backend\Libmemcached($frontend, array(
        "servers" => array(
            array(
                'host' => $config->memcache_db->host,
                'port' => $config->memcache_db->port,
                'weight' => 1
            ),
        ),
        "client" => array(
            Memcached::OPT_HASH => Memcached::HASH_MD5,
            Memcached::OPT_PREFIX_KEY => 'prefix.',
        )
    ));
 
    //print_r($memcacheDB);¨
 
    return $memcacheDB;
});
 
// * Redis Cache
$di->set('redisDB', function () use ($config) {
 
    //Connect to redis
    $redis = new Redis();
    //$redis->connect('127.0.0.1', 6379);
    $redis->pconnect($config->redis_db->host, $config->redis_db->port); #短连接
//    $redis->pconnect('103.37.147.250', 6379); #持久连接
    $redis->auth($config->redis_db->password);
    $redis->select($config->redis_db->db_index);
 
    //Create a Data frontend and set a default lifetime to 1 hour
//    $frontend = new Phalcon\Cache\Frontend\Data(array(
//        'lifetime' => 3600
//    ));
//
//    //Create the cache passing the connection
//    $cache = new Phalcon\Cache\Backend\Redis($frontend, array(
//        'redis' => $redis
//    ));
 
    return $redis;
});
 
// * Swoole Redis Client...
$di->set('redisSc', function () use ($config) {
    //Connect to redis
    $redisSc = new Redis();
//    $redisSc->connect('127.0.0.1', 6379);
    $redisSc->connect($config->swoole_server->listen_server_ip, $config->swoole_server->listen_server_port); #短连接
//    $redis->pconnect('103.37.147.250', 6379); #持久连接
//    $redisSc->auth("yafei312");
//    $redisSc->select(1);
 
    return $redisSc;
});
 
// * Simple database connection to localhost
$di->set("mongoSyData", function () use ($config) {
    //$mongo = new MongoClient();
//    $mongo = new MongoClient("mongodb://" . $config->server->host); // 连接到远程服务器 (使用默认端口: 27017)
    //$manager = new \MongoDB\Driver\Manager("mongodb://127.0.0.1:27017"); // 连接到远程服务器 (使用默认端口: 27017)
    //$mongo = new MongoClient( "mongodb://43.241.222.110:65432" ); // 链接到远程服务器,使用自定义的端口
    ///return $mongo->selectDb("syData");
 
 
//    $mongo = new Phalcon\Db\Adapter\MongoDB\Client("mongodb://127.0.0.1:27017");
//    return $mongo->selectDatabase('syData');
 
 
    # 使用第三方
    //$database = (new MongoDB\Client("mongodb://127.0.0.1:27017"))->selectDatabase('syData');
    //return $database;
 
 
    # 暂时借用 [phalcon/incubator](https://github.com/phalcon/incubator/tree/master/Library/Phalcon/Db/Adapter)
    $dsn = "mongodb://" . $config->mongo_db->host . ":" . $config->mongo_db->port;
    $dsn = "mongodb://{$config->mongo_db->user}:{$config->mongo_db->pwd}@" . $config->mongo_db->host . ":" . $config->mongo_db->port;
    $mongo = new Phalcon\Db\Adapter\MongoDB\Client($dsn);
    return $mongo->selectDatabase($config->mongo_db->db_name);
 
    //$collection = new MongoDB\Collection($manager, "syData", "items");
    //$initialCollectionCount = $collection->count();
 
//return $manager;
 
    //$mongo = new \MongoDB\Driver\Manager("mongodb://127.0.0.1:27017");
    //return (new MongoDB\Client())->selectDatabase('syData');
 
}, true);
 
 
//$di->set("mongoSyData", function () use ($config) {
//    //$mongo = new MongoClient("mongodb://127.0.0.1:27017");
//    //return $mongo->selectDb("syData");
//    $mongo = new Phalcon\Db\Adapter\MongoDB\Client("mongodb://127.0.0.1:27017");
//    return $mongo->selectDatabase('syData');
//}, true);
#1Closure->{closure}()
#2Phalcon\Di\Service->resolve(null, Object(Phalcon\Di\FactoryDefault))
#3Phalcon\Di->get(redisDB, null)
#4Phalcon\Di->getShared(redisDB)
#5Phalcon\Di\Injectable->__get(redisDB)
/data/home/yzhang/WebHospital/Manager/Applications/Utils/DiSecurity.php (99)
<?php
 
use Coam\App\Collections;
use Coam\App\Library;
use Coam\App\Models;
use Coam\App\Library\Zz_Api;
use Phalcon\Events\Event,
    Phalcon\Mvc\User\Plugin,
    Phalcon\Mvc\Dispatcher,
    Phalcon\Acl;
 
/**
 * Security
 * This is the security plugin which controls that users only have access to the modules they're assigned to
 */
class DiSecurity extends \Coam\App\Library\DiSecurityBase
{
    // 菜单列表
    public $adminNavMenuLevel;
    // 不同用户角色菜单自定义配置
    public $aNavMenuLevel;
    public $aaNavMenuLevel;
    public $afNavMenuLevel;
    public $amNavMenuLevel;
 
    // 账户类型资源接口权限配置[role]
    public $adminRoleResources;
    public $aplRoleResources;
    public $rcRoleResources;
    public $tjRoleResources;
    public $zavRoleResources;
    public $zawRoleResources;
    public $zamRoleResources;
    public $apiRoleResources;
    public $cliRoleResources;
    public $webRoleResources;
    public $openRoleResources;
    public $mailRoleResources;
 
    // 账户等级资源接口权限配置[level]
    # adminLevelResources
    public $a_adminLevelResources;
    public $c_adminLevelResources;
    public $m_adminLevelResources;
    # aplLevelResources
    public $a_aplLevelResources;
    public $c_aplLevelResources;
    public $m_aplLevelResources;
    # rcLevelResources
    public $a_rcLevelResources;
    public $c_rcLevelResources;
    public $m_rcLevelResources;
    # tjLevelResources
    public $a_tjLevelResources;
    public $c_tjLevelResources;
    public $m_tjLevelResources;
    # zavLevelResources
    public $a_zavLevelResources;
    public $c_zavLevelResources;
    public $m_zavLevelResources;
    # zawLevelResources
    public $a_zawLevelResources;
    public $c_zawLevelResources;
    public $m_zawLevelResources;
    # zamLevelResources
    public $a_zamLevelResources;
    public $c_zamLevelResources;
    public $m_zamLevelResources;
    # apiLevelResources
    public $a_apiLevelResources;
    public $c_apiLevelResources;
    public $m_apiLevelResources;
    # cliLevelResources
    public $a_cliLevelResources;
    public $c_cliLevelResources;
    public $m_cliLevelResources;
    # webLevelResources
    public $a_webLevelResources;
    public $c_webLevelResources;
    public $m_webLevelResources;
    # openLevelResources
    public $a_openLevelResources;
    public $c_openLevelResources;
    public $m_openLevelResources;
    # mailLevelResources
    public $a_mailLevelResources;
    public $c_mailLevelResources;
    public $m_mailLevelResources;
 
    public function __construct($dependencyInjector)
    {
        // 构建父类构造函数 ...
        parent::__construct($dependencyInjector);
 
        // 配置访问可跨的根域 ...
        $this->cross_dos = ['coam.co', 'lonal.com', 'nocs.cn', 'coopens.com', 'we-jy.com', 'yyi.io', 'zanshan.org', 'beecloudpay.com', 'yyi.io'];
 
        // 清除 Redis Di 缓存
        $this->redisDB->delete($this->redisDB->keys("ACL:*"));
        $this->redisDB->delete($this->redisDB->keys("CNML:*"));
    }
 
    // 加载管理后台菜单...
    private function loadAdminMenu()
    {
        # adminAccessLevel 代表显示级别 分别有 ["*":"开放所有访问权限"|"-":"关闭所有访问权限"|"A":"超级管理员权限"|"B":"二级管理员权限"|"C":"三级管理员权限"|"G":"访客权限"]
        $this->adminNavMenuLevel = array(
            'index' => array(
                'title' => '首页',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-home"></i>',
                'icon_right' => '<span class="menu-arrow"></span>',
                'refreshPanel' => 'no',
                'tag' => 'index',
                'path' => '/index/index',
                'II_MenuList' => [],
            ),
            'account' => array(
                'title' => '账户管理',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'account',
                'path' => '/account/menu',
                'II_MenuList' => array(
                    'adminListPaginate' => [
                        'title' => '系统管理员列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-user"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'adminListPaginate',
                        'path' => '/account/adminListPaginate',
                        'III_MenuList' => [],
                    ],
                    'medicalListPaginate' => [
                        'title' => '医护账户列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-user"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'medicalListPaginate',
                        'path' => '/account/medicalListPaginate',
                        'III_MenuList' => [],
                    ],
                    'customerListPaginate' => [
                        'title' => '客户账户列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-user"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'customerListPaginate',
                        'path' => '/account/customerListPaginate',
                        'III_MenuList' => [],
                    ],
                ),
            ),
//            'pms' => array(
//                'title' => '人事管理系统',
//                'description' => '--self-description.................',
//                'menu' => true,
//                'icon_left' => '<i class="ti-control-record"></i>',
//                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
//                'refreshPanel' => 'no',
//                'tag' => 'pms',
//                'path' => '/pms/menu',
//                'II_MenuList' => array(
//
//                ),
//            ),
            'mpd' => array(
                'title' => '医疗患者数据',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'mpd',
                'path' => '/mpd/menu',
                'II_MenuList' => array(
                    'patientListPaginate' => [
                        'title' => '就诊患者列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-user"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'patientListPaginate',
                        'path' => '/mpd/patientListPaginate',
                        'III_MenuList' => [],
                    ],
                    'ctListPaginate' => [
                        'title' => '就诊卡列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-user"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'ctListPaginate',
                        'path' => '/mpd/ctListPaginate',
                        'III_MenuList' => [],
                    ],
                    'cssListPaginate' => [
                        'title' => '社保卡列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-user"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'cssListPaginate',
                        'path' => '/mpd/cssListPaginate',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'treatPayment' => array(
                'title' => '医疗收费列表',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-paint-bucket"></i>',
                'icon_right' => '<span class="menu-arrow"></span>',
                'refreshPanel' => 'no',
                'tag' => 'treatPayment',
                'path' => '/treatPayment/mPaymentListPaginate',
                'II_MenuList' => [],
            ),
            'webPost' => array(
                'title' => '网站文章列表',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-paint-bucket"></i>',
                'icon_right' => '<span class="menu-arrow"></span>',
                'refreshPanel' => 'no',
                'tag' => 'webPost',
                'path' => '/webPost/mPostListPaginate',
                'II_MenuList' => [],
            ),
//            'wcPost' => array(
//                'title' => '微信文章列表',
//                'description' => '--self-description.................',
//                'menu' => true,
//                'icon_left' => '<i class="ti-paint-bucket"></i>',
//                'icon_right' => '<span class="menu-arrow"></span>',
//                'refreshPanel' => 'no',
//                'tag' => 'wcPost',
//                'path' => '/wcPost/index',
//                'II_MenuList' => [],
//            ),
            'medicine' => array(
                'title' => '药品管理',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'medicine',
                'path' => '/medicine/menu',
                'II_MenuList' => array(
                    'mMedicineListPaginate' => [
                        'title' => '平台医用药材',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'mMedicineListPaginate',
                        'path' => '/medicine/mMedicineListPaginate',
                        'III_MenuList' => [],
                    ],
                    'cMedicineListPaginate' => [
                        'title' => '平台医用耗材',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'cMedicineListPaginate',
                        'path' => '/medicine/cMedicineListPaginate',
                        'III_MenuList' => [],
                    ],
                    'wMedicineListPaginate' => [
                        'title' => '平台办公用品',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'wMedicineListPaginate',
                        'path' => '/medicine/wMedicineListPaginate',
                        'III_MenuList' => [],
                    ],
                    'oMedicineListPaginate' => [
                        'title' => '药品销项记录',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'oMedicineListPaginate',
                        'path' => '/medicine/oMedicineListPaginate',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'ds' => array(
                'title' => '排班挂号管理',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'ds',
                'path' => '/ds/menu',
                'II_MenuList' => array(
                    'dsListPaginate' => [
                        'title' => '医师排班列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'dsListPaginate',
                        'path' => '/ds/dsListPaginate',
                        'III_MenuList' => [],
                    ],
                    'dsCalendar' => [
                        'title' => '医生排班表格',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-user"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'dsCalendar',
                        'path' => '/ds/dsCalendar',
                        'III_MenuList' => [],
                    ],
                    'oScheduleListPaginate' => [
                        'title' => '用户挂号记录',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'oScheduleListPaginate',
                        'path' => '/ds/oScheduleListPaginate',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'me' => array(
                'title' => '医学体检管理',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'me',
                'path' => '/me/menu',
                'II_MenuList' => array(
                    'meListPaginate' => [
                        'title' => '医学体检列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'meListPaginate',
                        'path' => '/me/meListPaginate',
                        'III_MenuList' => [],
                    ],
                    'oMeListPaginate' => [
                        'title' => '体检诊断记录',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'oMeListPaginate',
                        'path' => '/me/oMeListPaginate',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'order' => array(
                'title' => '订单管理',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'order',
                'path' => '/order/menu',
                'II_MenuList' => array(
                    'mmOrderListPaginate' => [
                        'title' => '平台[药材]-订单列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'mmOrderListPaginate',
                        'path' => '/order/mmOrderListPaginate',
                        'III_MenuList' => [],
                    ],
                    'cmOrderListPaginate' => [
                        'title' => '平台[耗材]-订单列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'cmOrderListPaginate',
                        'path' => '/order/cmOrderListPaginate',
                        'III_MenuList' => [],
                    ],
                    'wmOrderListPaginate' => [
                        'title' => '[办公用品]-订单列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'wmOrderListPaginate',
                        'path' => '/order/wmOrderListPaginate',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'certify' => array(
                'title' => '认证管理',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'certify',
                'path' => '/certify/menu',
                'II_MenuList' => array(
//                    'companyAuthListPaginate' => [
//                        'title' => '企业认证列表',
//                        'description' => '--self-description.................',
//                        'menu' => true,
//                        'icon_left' => '<i class="ti-id-badge"></i>',
//                        'icon_right' => '',
//                        'refreshPanel' => 'no',
//                        'tag' => 'companyAuthListPaginate',
//                        'path' => '/certify/companyAuthListPaginate',
//                        'III_MenuList' => [],
//                    ],
                    'icAuthListPaginate' => [
                        'title' => '实名认证列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-id-badge"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'icAuthListPaginate',
                        'path' => '/certify/icAuthListPaginate',
                        'III_MenuList' => [],
                    ],
//                    'bcAuthListPaginate' => [
//                        'title' => '银行卡认证列表',
//                        'description' => '--self-description.................',
//                        'menu' => true,
//                        'icon_left' => '<i class="ti-id-badge"></i>',
//                        'icon_right' => '',
//                        'refreshPanel' => 'no',
//                        'tag' => 'bcAuthListPaginate',
//                        'path' => '/certify/bcAuthListPaginate',
//                        'III_MenuList' => [],
//                    ],
                ),
            ),
            'financial' => array(
                'title' => '财务分析',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'financial',
                'path' => '/financial/menu',
                'II_MenuList' => array(
                    'zsFinancialSummaryInfo' => [
                        'title' => '财务摘要',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-receipt"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'zsFinancialSummaryInfo',
                        'path' => '/financial/zsFinancialSummaryInfo',
                        'III_MenuList' => [],
                    ],
                    'zsAtpListPaginate' => [
                        'title' => '交易流水-报告',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'zsAtpListPaginate',
                        'path' => '/financial/zsAtpListPaginate',
                        'III_MenuList' => [],
                    ],
                    'paiAtpListPaginate' => [
                        'title' => '支付入账-交易',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'paiAtpListPaginate',
                        'path' => '/financial/paiAtpListPaginate',
                        'III_MenuList' => [],
                    ],
                    'asiAtpListPaginate' => [
                        'title' => '分销分成-交易',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'asiAtpListPaginate',
                        'path' => '/financial/asiAtpListPaginate',
                        'III_MenuList' => [],
                    ],
                    'aboAtpListPaginate' => [
                        'title' => '账户提现-交易',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'aboAtpListPaginate',
                        'path' => '/financial/aboAtpListPaginate',
                        'III_MenuList' => [],
                    ],
                    'atiAtpListPaginate' => [
                        'title' => '财务转账-交易',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'atiAtpListPaginate',
                        'path' => '/financial/atiAtpListPaginate',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'data' => array(
                'title' => '平台数据中心',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'data',
                'path' => '/data/menu',
                'II_MenuList' => array(
                    'dataIntegrityAnalysis' => [
                        'title' => '数据冗余分析',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'dataIntegrityAnalysis',
                        'path' => '/data/dataIntegrityAnalysis',
                        'III_MenuList' => [],
                    ],
                    'medicalProviderListPaginate' => [
                        'title' => '平台供药商',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'medicalProviderListPaginate',
                        'path' => '/data/medicalProviderListPaginate',
                        'III_MenuList' => [],
                    ],
                    'bankListPaginate' => [
                        'title' => '开户总行列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'bankListPaginate',
                        'path' => '/data/bankListPaginate',
                        'III_MenuList' => [],
                    ],
                    'branchListPaginate' => [
                        'title' => '开户支行列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'branchListPaginate',
                        'path' => '/data/branchListPaginate',
                        'III_MenuList' => [],
                    ],
                    'categoryListPaginate' => [
                        'title' => '药品分类列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'categoryListPaginate',
                        'path' => '/data/categoryListPaginate',
                        'III_MenuList' => [],
                    ],
                    'categoryTree' => [
                        'title' => '药品分类管理',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-layout-list-thumb-alt"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'categoryTree',
                        'path' => '/data/categoryTree',
                        'III_MenuList' => [],
                    ],
                    'departmentListPaginate' => [
                        'title' => '科室分类列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'departmentListPaginate',
                        'path' => '/data/departmentListPaginate',
                        'III_MenuList' => [],
                    ],
                    'departmentTree' => [
                        'title' => '科室分类管理',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-layout-list-thumb-alt"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'departmentTree',
                        'path' => '/data/departmentTree',
                        'III_MenuList' => [],
                    ],
                    'postListPaginate' => [
                        'title' => '文章分类列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'postListPaginate',
                        'path' => '/data/postListPaginate',
                        'III_MenuList' => [],
                    ],
                    'postTree' => [
                        'title' => '文章分类管理',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-layout-list-thumb-alt"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'postTree',
                        'path' => '/data/postTree',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'service' => array(
                'title' => '服务功能管理',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'service',
                'path' => '/service/menu',
                'II_MenuList' => array(
                    'notifyListPaginate' => [
                        'title' => '平台消息公告',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'notifyListPaginate',
                        'path' => '/service/notifyListPaginate',
                        'III_MenuList' => [],
                    ],
                    'feedbackListPaginate' => [
                        'title' => '平台用户反馈',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'feedbackListPaginate',
                        'path' => '/service/feedbackListPaginate',
                        'III_MenuList' => [],
                    ],
                    'integralListPaginate' => [
                        'title' => '平台积分记录',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'integralListPaginate',
                        'path' => '/service/integralListPaginate',
                        'III_MenuList' => [],
                    ],
                    'rcListPaginate' => [
                        'title' => '红会数据列表',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'rcListPaginate',
                        'path' => '/service/rcListPaginate',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'system' => array(
                'title' => '系统管理',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'system',
                'path' => '/system/menu',
                'II_MenuList' => array(
                    'appRunListPaginate' => [
                        'title' => '平台活跃用户',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'appRunListPaginate',
                        'path' => '/system/appRunListPaginate',
                        'III_MenuList' => [],
                    ],
                    'loggerListPaginate' => [
                        'title' => '平台操作日志',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'loggerListPaginate',
                        'path' => '/system/loggerListPaginate',
                        'III_MenuList' => [],
                    ],
                    'smsTemplateInfo' => [
                        'title' => '短信模板',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'smsTemplateInfo',
                        'path' => '/system/smsTemplateInfo',
                        'III_MenuList' => [],
                    ],
                    'mailTemplateInfo' => [
                        'title' => '邮件模板',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'mailTemplateInfo',
                        'path' => '/system/mailTemplateInfo',
                        'III_MenuList' => [],
                    ],
                ),
            ),
            'help' => array(
                'title' => '帮助中心',
                'description' => '--self-description.................',
                'menu' => true,
                'icon_left' => '<i class="ti-control-record"></i>',
                'icon_right' => '<span class="menu-arrow ti-angle-right"></span>',
                'refreshPanel' => 'no',
                'tag' => 'help',
                'path' => '/help/menu',
                'II_MenuList' => array(
                    'account' => [
                        'title' => '管理账户中心',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'account',
                        'path' => '/help/account',
                        'III_MenuList' => [],
                    ],
                    'devDoc' => [
                        'title' => '后台开发摘要',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'devDoc',
                        'path' => '/help/devDoc',
                        'III_MenuList' => [],
                    ],
                    'operation' => [
                        'title' => '后台运营维护',
                        'description' => '--self-description.................',
                        'menu' => true,
                        'icon_left' => '<i class="ti-align-justify"></i>',
                        'icon_right' => '',
                        'refreshPanel' => 'no',
                        'tag' => 'operation',
                        'path' => '/help/operation',
                        'III_MenuList' => [],
                    ],
                ),
            ),
        );
 
        // 管理员默认配置项 - 默认
        $this->aNavMenuLevel = array();
    }
 
    // 加载权限等级...
    private function setAdminAclResources()
    {
        // Admin area resources
        $this->adminRoleResources = array(
            'index' => array("*" => "A"),
            'account' => array(
                "menu" => "AM",
                "xAInfoLevel" => "A",
                "medicalListPaginate" => "AM", "medicalListData" => "AM", "showMedicalInfo" => "AM", "updateMedicalInfo" => "AM", "searchMedicalList" => "AM",
                "customerListPaginate" => "A", "customerListData" => "A", "showCustomerInfo" => "A", "updateCustomerInfo" => "A",
                "adminListPaginate" => "A", "adminListData" => "A", "showAdminInfo" => "A", "updateAdminInfo" => "A"
            ),
//            'pms' => array(
//                "menu" => "AM",
//                "dsCalendar" => "A",
//            ),
            'mpd' => array(
                "menu" => "AM",
                "patientListPaginate" => "AM", "patientListData" => "AM",
                "ctListPaginate" => "AM", "ctListData" => "AM",
                "cssListPaginate" => "AM", "cssListData" => "AM",
            ),
            'api' => array("*" => "A"),
            'ajaxLoad' => array("*" => "AMG"),
            'webPost' => array(
                "mPostListPaginate" => "A", "mPostListData" => "A", "showMPostInfo" => "A"
            ),
            'common' => array("*" => "A"),
            'comment' => array(
                "cmStateAs" => "AM",
                "showCmImageList" => "AM",
                "updateCommentInfo" => "AM",
            ),
            'certify' => array(
                "menu" => "AM",
                //"companyAuthListPaginate" => "AM", "companyAuthListData" => "AM", "showCompanyCertifyAuthInfo" => "AM", "sendCompanyCertifyAuthInfo" => "AM", "searchCompanyDbBranchList" => "AM",
                "icAuthListPaginate" => "A", "icAuthListData" => "A", "showIcCertifyAuthInfo" => "A", "sendIcCertifyAuthInfo" => "A",
                //"bcAuthListPaginate" => "A", "bcAuthListData" => "A", "showBcCertifyAuthInfo" => "A", "sendBcCertifyAuthInfo" => "A",
            ),
            'medicine' => array(
                "menu" => "AM",
                // 平台福利社药品相关...
                "mMedicineListPaginate" => "A", "mMedicineListData" => "A",
                // 平台医用耗材相关...
                "cMedicineListPaginate" => "A", "cMedicineListData" => "A",
                // 平台医用耗材相关...
                "wMedicineListPaginate" => "A", "wMedicineListData" => "A",
                // 通用药品详情管理...
                "m_aAiListPaginate" => "AM", "m_aAiListData" => "AM",
                "m_attributeListPaginate" => "AM", "m_attributeListData" => "AM", "showMAttributeInfo" => "AM", "updateMAttributeInfo" => "AM", "m_attributeAs" => "AM",
                "m_orderListPaginate" => "AM", "m_orderListData" => "AM", //"showMOrderInfo" => "S", "updateGOrderInfo" => "S",
                "m_commentListPaginate" => "AM", "m_commentListData" => "AM",// "showGCommentInfo" => "S", "updateGCommentInfo" => "S",
                // 药品订购记录...
                "oMedicineListPaginate" => "AM", "oMedicineListData" => "AM", //"showOMedicineInfo" => "AM", "updateOMedicineInfo" => "AM",
                // 通用药品管理...
                "showMedicineInfo" => "AM", "updateMedicineInfo" => "AM", "changeMState" => "AM", "changeMaState" => "AM", "updateMedicineCategory" => "AM", "updateMedicineUnit" => "AM", "deleteMedicineInfo" => "AM", "showMedicineImageList" => "AM", "deleteMedicineImageList" => "AM",
                "showMaAiInfo" => "AM", "updateMaAiInfo" => "AM", "deleteMAiInfo" => "AM",
            ),
            'ds' => array(
                "menu" => "A",
                "dsCalendar" => "A",
                "dsListPaginate" => "A", "dsListData" => "A",
                "showDsInfo" => "A", "updateDsInfo" => "A", "changeDsState" => "A", "deleteDsInfo" => "A", "showDsImageList" => "A", "deleteDsImageList" => "A",
                "ds_orderListPaginate" => "A", "ds_orderListData" => "A", "showDsOrderInfo" => "A", "updateDsOrderInfo" => "A",
                // 商品订购记录...
                "oScheduleListPaginate" => "AS", "oScheduleListData" => "AS",
            ),
            'me' => array(
                "menu" => "A",
                "meListPaginate" => "A", "meListData" => "A",
                "showMeInfo" => "A", "updateMeInfo" => "A", "changeMeState" => "A", "deleteMeInfo" => "A", "showMeImageList" => "A", "deleteMeImageList" => "A",
                "me_orderListPaginate" => "A", "me_orderListData" => "A", "showMeOrderInfo" => "A", "updateMeOrderInfo" => "A",
                // 商品订购记录...
                "oMeListPaginate" => "AS", "oMeListData" => "AS", "showOMeInfo" => "AS", "updateOMeInfo" => "AS",
            ),
            'order' => array(
                "menu" => "AM",
                "exportOrderData" => "AM",
                "exportOExpressData" => "AM",
                // 平台药品订单
                "mmOrderListPaginate" => "A", "mmOrderListData" => "A",
                // 平台积分订单
                "cmOrderListPaginate" => "A", "cmOrderListData" => "A",
                // 平台积分订单
                "wmOrderListPaginate" => "A", "wmOrderListData" => "A",
                // 通用订单关联药品列表...
                "mo_medicineListPaginate" => "AM", "mo_medicineListData" => "AM",
                // 其它订单接口...
                "showOrderInfo" => "AM", "updateOrderInfo" => "AM",// "changeOState" => "AM",
            ),
            'data' => array(
                "menu" => "A",
                "medicalProviderListPaginate" => "A", "medicalProviderListData" => "A", "showMedicalProviderInfo" => "A", "updateMedicalProviderInfo" => "A",
                "bankListPaginate" => "A", "bankListData" => "A", "showBankInfo" => "A", "updateBankInfo" => "A",
                "branchListPaginate" => "A", "branchListData" => "A", "showBranchInfo" => "A", "updateBranchInfo" => "A",
                // 药品分类
                "categoryTree" => "A", "categoryTreeData" => "A", "changeCategoryInfo" => "A", "sendCategoryInfo" => "A", "showCiUnitsInfo" => "A", "updateCiUnitsInfo" => "A",
                "categoryListPaginate" => "A", "categoryListData" => "A", "showCategoryInfo" => "A", "updateCategoryInfo" => "A",
                // 科室分类
                "departmentTree" => "A", "departmentTreeData" => "A", "changeDepartmentInfo" => "A", "sendDepartmentInfo" => "A", "showDiUnitsInfo" => "A", "updateDiUnitsInfo" => "A",
                "departmentListPaginate" => "A", "departmentListData" => "A", "showDepartmentInfo" => "A", "updateDepartmentInfo" => "A",
                // 文章分类
                "postTree" => "A", "postTreeData" => "A", "changePostInfo" => "A", "sendPostInfo" => "A", "showPiUnitsInfo" => "A", "updatePiUnitsInfo" => "A",
                "postListPaginate" => "A", "postListData" => "A", "showPostInfo" => "A", "updatePostInfo" => "A",
                // 药品类属性分类
                "cAttributeInfoTree" => "A", "cAttributeInfoTreeData" => "A", "changeCAttributeInfo" => "A", "sendCAttributeInfo" => "A",
                "cAttributeListPaginate" => "A", "cAttributeListData" => "A",
            ),
            'service' => array(
                "menu" => "A",
                "notifyListPaginate" => "A", "notifyListData" => "A", "showNotifyInfo" => "A", "searchUserList" => "A", "updateNotifyInfo" => "A",
                "feedbackListPaginate" => "A", "feedbackListData" => "A", "showFeedbackInfo" => "A", "updateFeedbackInfo" => "A",
                "lotteryListPaginate" => "A", "lotteryListData" => "A",
                "integralListPaginate" => "A", "integralListData" => "A",
                "pSupplierListPaginate" => "A", "pSupplierListData" => "A",
                "pMedicineListPaginate" => "A", "pMedicineListData" => "A",
                // rc
                "rcListPaginate" => "A", "rcListData" => "A", "showRcInfo" => "A", "updateRcInfo" => "A",
            ),
            'financial' => array(
                "menu" => "AM",
                "zsFinancialSummaryInfo" => "A",
                "showFinancialAccountOutInfo" => "A", "updateFinancialAccountOutInfo" => "A",
                "zsAtpListPaginate" => "A", "zsAtpListData" => "A", "exportZsAtpData" => "A",
                "paiAtpListPaginate" => "A", "paiAtpListData" => "A", "exportPaiAtpData" => "A",
                "aboAtpListPaginate" => "AM", "aboAtpListData" => "AM", "exportAboAtpData" => "AM", "showAbOutInfo" => "S",
                "atiAtpListPaginate" => "A", "atiAtpListData" => "A", "atiPushAbo" => "A", "atiPopAbo" => "A", "refuseAboAtp" => "A", "deleteAtiAtp" => "A", "exportAtiAtpData" => "A",
                "ati_aboAtpListPaginate" => "A", "ati_aboAtpListData" => "A", "exportAtiAboAtpData" => "A", "confirmGoesAtiAtp" => "A",
                "asiAtpListPaginate" => "A", "asiAtpListData" => "A",
            ),
            'treatPayment' => array(
                "mPaymentListPaginate" => "A", "mPaymentListData" => "A", "showMPaymentInfo" => "A", "printMPaymentInfo" => "A"
            ),
            'wcPost' => array("*" => "A"),
            'user' => array(
                "profile" => "AM", "aCompanyAdminAs" => "AM", "aDemoDocAs" => "*", "setting" => "AM", "login" => "*", "rsLogin" => "*", "loginIn" => "*", "loginOut" => "AM",
                "showUserPassword" => "AM", "updateUserPassword" => "AM"
            ),
            'system' => array(
                "menu" => "A",
                "appRunListPaginate" => "A", "appRunListData" => "A",
                "loggerListPaginate" => "A", "loggerListData" => "A",
            ),
            'help' => array(
                "*" => "*"
            ),
            'cloud' => array(
                "createCloudFileUpToken" => '*',
                "uploadAInfoPicture" => 'AM', "uploadCustomerAInfoPicture" => 'AM', "uploadMedicalAInfoPicture" => 'AM', "uploadAdminAInfoPicture" => 'AM',
                "uploadExpressInfoLogo" => 'A', "uploadPromotionInfoPicture" => 'A',
                "uploadCompanyLogo" => 'S',
                "uploadMedicineInfoPicture" => 'AM', "uploadMaInfoPicture" => 'AM', "uploadMedicineImageList" => 'AM',
                "uploadDsInfoPicture" => 'A', "uploadDsImageList" => 'A',
                "uploadMeInfoPicture" => 'A', "uploadMeImageList" => 'A',
                "uploadOExpressInfoPicture" => 'S', "uploadSupplierInfoPicture" => 'S',
                "uploadAuthIdentityCertifyInfo" => 'S', "uploadAuthCompanyCertifyInfo" => 'S', "uploadAuthBankCertifyInfo" => 'S'
            ),
        );
 
        // Admin
        $this->a_adminLevelResources = array(
            'index' => array("*" => "AFM"),
            'account' => array(
                "menu" => "AFM",
                "xAInfoLevel" => "A",
                "adminListPaginate" => "AF", "adminListData" => "AF", "showAdminInfo" => "A", "updateAdminInfo" => "A",
                "medicalListPaginate" => "AFM", "medicalListData" => "AFM", "showMedicalInfo" => "AFM", "updateMedicalInfo" => "AFM", "searchMedicalList" => "AFM",
                "customerListPaginate" => "AFM", "customerListData" => "AFM", "showCustomerInfo" => "AFM", "updateCustomerInfo" => "AFM",
            ),
//            'pms' => array(
//                "menu" => "AFM",
//            ),
            'mpd' => array(
                "menu" => "AM",
                "patientListPaginate" => "AM", "patientListData" => "AM",
                "ctListPaginate" => "AM", "ctListData" => "AM",
                "cssListPaginate" => "AM", "cssListData" => "AM",
            ),
            'api' => array("*" => "AFM"),
            'ajaxLoad' => array("*" => "AFM"),
            'webPost' => array(
                "mPostListPaginate" => "AM", "mPostListData" => "AM", "showMPostInfo" => "AM"
            ),
            'comment' => array(
                "index" => "A",
                "cmStateAs" => "AFM",
                "showCmImageList" => "AFM",
                "updateCommentInfo" => "AFM",
            ),
            'certify' => array(
                "menu" => "M",
                //"companyAuthListPaginate" => "M", "companyAuthListData" => "M", "showCompanyCertifyAuthInfo" => "M", "sendCompanyCertifyAuthInfo" => "M",
                "icAuthListPaginate" => "M", "icAuthListData" => "M", "showIcCertifyAuthInfo" => "M", "sendIcCertifyAuthInfo" => "M",
                //"bcAuthListPaginate" => "M", "bcAuthListData" => "M", "showBcCertifyAuthInfo" => "M", "sendBcCertifyAuthInfo" => "M",
            ),
            'medicine' => array(
                "menu" => "AM",
                // 平台福利社药品相关...
                "mMedicineListPaginate" => "AM", "mMedicineListData" => "AM",
                // 平台医用耗材相关...
                "cMedicineListPaginate" => "AM", "cMedicineListData" => "AM",
                // 平台医用耗材相关...
                "wMedicineListPaginate" => "AM", "wMedicineListData" => "AM",
                // 药品订购记录...
                "oMedicineListPaginate" => "AFM", "oMedicineListData" => "AFM", //"showOMedicineInfo" => "AFM", "updateOMedicineInfo" => "AFM",
                // 通用药品详情管理
                "m_aAiListPaginate" => "M", "m_aAiListData" => "M",
                "m_attributeListPaginate" => "M", "m_attributeListData" => "M", "showMAttributeInfo" => "M", "updateMAttributeInfo" => "M", "m_attributeAs" => "M",
                "m_orderListPaginate" => "MPM", "m_orderListData" => "MPM", //"showMOrderInfo" => "M", "updateGOrderInfo" => "M",
                "m_commentListPaginate" => "AM", "m_commentListData" => "AM", //"showGCommentInfo" => "M", "updateGCommentInfo" => "M",
                // 通用药品管理...
                "showMedicineInfo" => "M", "updateMedicineInfo" => "M", "changeMState" => "M", "changeMaState" => "M", "updateMedicineCategory" => "M", "updateMedicineUnit" => "M", "deleteMedicineInfo" => "M", "showMedicineImageList" => "M", "deleteMedicineImageList" => "M",
                "showMaAiInfo" => "M", "updateMaAiInfo" => "M", "deleteMAiInfo" => "M",
            ),
            'ds' => array(
                "menu" => "AM",
                "dsCalendar" => "AM",
                "dsListPaginate" => "AM", "dsListData" => "AM",
                "showDsInfo" => "AM", "updateDsInfo" => "AM", "changeDsState" => "AM", "deleteDsInfo" => "AM", "showDsImageList" => "AM", "deleteDsImageList" => "AM",
                "ds_orderListPaginate" => "AM", "ds_orderListData" => "AM", "showDsOrderInfo" => "AM", "updateDsOrderInfo" => "AM",
                // 挂号捐赠订购记录...
                "oScheduleListPaginate" => "AFM", "oScheduleListData" => "AFM",
            ),
            'me' => array(
                "menu" => "AM",
                "meListPaginate" => "AM", "meListData" => "AM",
                "showMeInfo" => "AM", "updateMeInfo" => "AM", "changeMeState" => "AM", "deleteMeInfo" => "AM", "showMeImageList" => "AM", "deleteMeImageList" => "AM",
                "me_orderListPaginate" => "AM", "me_orderListData" => "AM", "showMeOrderInfo" => "AM", "updateMeOrderInfo" => "AM",
                // 挂号订购记录...
                "oMeListPaginate" => "AFM", "oMeListData" => "AFM", "showOMeInfo" => "AFM", "updateOMeInfo" => "AFM",
            ),
            'order' => array(
                "menu" => "AFM",
                "exportOrderData" => "AFM",
                "exportOExpressData" => "AFM",
                // 平台福利社药品相关...
                "mmOrderListPaginate" => "AFM", "mmOrderListData" => "AFM",
                // 平台医用耗材相关...
                "cmOrderListPaginate" => "AFM", "cmOrderListData" => "AFM",
                // 平台医用耗材相关...
                "wmOrderListPaginate" => "AFM", "wmOrderListData" => "AFM",
                // 其它订单接口...
                "mo_medicineListPaginate" => "AFM", "mo_medicineListData" => "AFM",
                // 其它订单接口...
                "showOrderInfo" => "F", "updateOrderInfo" => "F", //"changeOState" => "F",
            ),
            'data' => array(
                "menu" => "AM",
                "dataIntegrityAnalysis" => "A",
                "medicalProviderListPaginate" => "AM", "medicalProviderListData" => "AM", "showMedicalProviderInfo" => "AM", "updateMedicalProviderInfo" => "AM",
                "bankListPaginate" => "A", "bankListData" => "A", "showBankInfo" => "A", "updateBankInfo" => "A",
                "branchListPaginate" => "A", "branchListData" => "A", "showBranchInfo" => "A", "updateBranchInfo" => "A",
                // 药品分类列表
                "categoryTree" => "AM", "categoryTreeData" => "AM", "changeCategoryInfo" => "AM", "sendCategoryInfo" => "AM", "showCiUnitsInfo" => "AM", "updateCiUnitsInfo" => "AM",
                "categoryListPaginate" => "AM", "categoryListData" => "AM", "showCategoryInfo" => "AM", "updateCategoryInfo" => "AM",
                // 科室分类列表
                "departmentTree" => "AM", "departmentTreeData" => "AM", "changeDepartmentInfo" => "AM", "sendDepartmentInfo" => "AM", "showDiUnitsInfo" => "AM", "updateDiUnitsInfo" => "AM",
                "departmentListPaginate" => "AM", "departmentListData" => "AM", "showDepartmentInfo" => "AM", "updateDepartmentInfo" => "AM",
                // 文章分类列表
                "postTree" => "AM", "postTreeData" => "AM", "changePostInfo" => "AM", "sendPostInfo" => "AM", "showPiUnitsInfo" => "AM", "updatePiUnitsInfo" => "AM",
                "postListPaginate" => "AM", "postListData" => "AM", "showPostInfo" => "AM", "updatePostInfo" => "AM",
                // 药品属性分类
                "cAttributeInfoTree" => "AM", "cAttributeInfoTreeData" => "AM", "changeCAttributeInfo" => "AM", "sendCAttributeInfo" => "AM",
                "cAttributeListPaginate" => "AM", "cAttributeListData" => "AM",
            ),
            'service' => array(
                "menu" => "AM",
                "notifyListPaginate" => "AM", "notifyListData" => "AM", "showNotifyInfo" => "AM", "searchUserList" => "AFM", "updateNotifyInfo" => "AM",
                "feedbackListPaginate" => "AM", "feedbackListData" => "AM", "showFeedbackInfo" => "AM", "updateFeedbackInfo" => "AM",
                "lotteryListPaginate" => "AM", "lotteryListData" => "AM",
                "integralListPaginate" => "AM", "integralListData" => "AM",
                "pSupplierListPaginate" => "AM", "pSupplierListData" => "AM",
                "pMedicineListPaginate" => "AM", "pMedicineListData" => "AM",
                // 红会
                "rcListPaginate" => "AM", "rcListData" => "AM", "showRcInfo" => "AM", "updateRcInfo" => "AM",
            ),
            'financial' => array(
                "menu" => "AF",
                "zsFinancialSummaryInfo" => "AF",
                "showFinancialAccountOutInfo" => "F", "updateFinancialAccountOutInfo" => "F",
                "zsAtpListPaginate" => "F", "zsAtpListData" => "F", "exportZsAtpData" => "F",
                "paiAtpListPaginate" => "F", "paiAtpListData" => "F", "exportPaiAtpData" => "F",
                "aboAtpListPaginate" => "F", "aboAtpListData" => "F", "exportAboAtpData" => "F",
                "atiAtpListPaginate" => "F", "atiAtpListData" => "F", "atiPushAbo" => "F", "atiPopAbo" => "F", "refuseAboAtp" => "F", "deleteAtiAtp" => "F", "exportAtiAtpData" => "F",
                "ati_aboAtpListPaginate" => "F", "ati_aboAtpListData" => "F", "exportAtiAboAtpData" => "F", "confirmGoesAtiAtp" => "F",
                "asiAtpListPaginate" => "F", "asiAtpListData" => "F",
            ),
            'treatPayment' => array(
                "mPaymentListPaginate" => "AM", "mPaymentListData" => "AM", "showMPaymentInfo" => "AM", "printMPaymentInfo" => "AM"
            ),
            'wcPost' => array("*" => "AFM"),
            'user' => array(
                "menu" => "AFM",
                "profile" => "AFM", "aDemoDocAs" => "*", "setting" => "AFM", "login" => "*", "rsLogin" => "*", "loginIn" => "*", "loginOut" => "*",
                "showUserPassword" => "AFM", "updateUserPassword" => "AFM"
            ),
            'system' => array(
                "menu" => "A",
                "appRunListPaginate" => "A", "appRunListData" => "A",
                "loggerListPaginate" => "A", "loggerListData" => "A",
            ),
            'help' => array("*" => "*"),
            'cloud' => array(
                "createCloudFileUpToken" => '*',
                "uploadAInfoPicture" => 'AFM', "uploadCustomerAInfoPicture" => 'AFM', "uploadSupplierAInfoPicture" => 'AFM', "uploadAdminAInfoPicture" => 'AFM',
                "uploadExpressInfoLogo" => 'AFM', "uploadPromotionInfoPicture" => 'AFM',
                "uploadMedicineInfoPicture" => 'M', "uploadMaInfoPicture" => 'M', "uploadMedicineImageList" => 'M',
                "uploadDsInfoPicture" => 'H', "uploadDsImageList" => 'H',
                "uploadMeInfoPicture" => 'AM', "uploadMeImageList" => 'AM',
                "uploadOExpressInfoPicture" => 'M', "uploadSupplierInfoPicture" => 'A',
                //"uploadAuthIdentityCertifyInfo" => 'A', "uploadAuthCompanyCertifyInfo" => 'A', "uploadAuthBankCertifyInfo" => 'A'
            ),
        );
 
        // Medical
        $this->m_adminLevelResources = array(
            'index' => array("*" => "MP"),
            'account' => array(
                "menu" => "MP",
                "medicalListPaginate" => "MP", "medicalListData" => "MP", "showMedicalInfo" => "MP", "updateMedicalInfo" => "MP", "searchMedicalList" => "MP",
                "customerListPaginate" => "MP", "customerListData" => "MP", "showCustomerInfo" => "MP", "updateCustomerInfo" => "MP",
            ),
//            'pms' => array(
//                "menu" => "MP",
//            ),
            'mpd' => array(
                "menu" => "MP",
                "patientListPaginate" => "MP", "patientListData" => "MP",
                "ctListPaginate" => "MP", "ctListData" => "MP",
                "cssListPaginate" => "MP", "cssListData" => "MP",
            ),
            'api' => array("*" => "MP"),
            'ajaxLoad' => array("*" => "MP"),
            'comment' => array(
                "cmStateAs" => "MP",
                "showCmImageList" => "MP",
                "updateCommentInfo" => "MP",
            ),
            'medicine' => array(
                "menu" => "MP",
                // 平台福利社药品相关...
                "mMedicineListPaginate" => "MP", "mMedicineListData" => "MP",
                // 平台医用耗材相关...
                "cMedicineListPaginate" => "MP", "cMedicineListData" => "MP",
                // 平台医用耗材相关...
                "wMedicineListPaginate" => "MP", "wMedicineListData" => "MP",
                // 药品订购记录...
                "oMedicineListPaginate" => "MP", "oMedicineListData" => "MP",
                // 通用药品详情管理
                "m_aAiListPaginate" => "MP", "m_aAiListData" => "MP",
                "m_attributeListPaginate" => "MP", "m_attributeListData" => "MP", "showMAttributeInfo" => "MP", "updateMAttributeInfo" => "MP", "m_attributeAs" => "MP",
                "m_orderListPaginate" => "MP", "m_orderListData" => "MP", //"showMOrderInfo" => "M", "updateGOrderInfo" => "M",
                "m_commentListPaginate" => "MP", "m_commentListData" => "MP", //"showGCommentInfo" => "M", "updateGCommentInfo" => "M",
                // 通用药品管理...
                "showMedicineInfo" => "MP", "updateMedicineInfo" => "MP", "changeMState" => "MP", "changeMaState" => "MP", "updateMedicineCategory" => "MP", "updateMedicineUnit" => "MP", "deleteMedicineInfo" => "MP", "showMedicineImageList" => "MP", "deleteMedicineImageList" => "MP",
                "showMaAiInfo" => "MP", "updateMaAiInfo" => "MP", "deleteMAiInfo" => "MP",
            ),
            'ds' => array(
                "menu" => "MP",
                "dsCalendar" => "A",
                "dsListPaginate" => "MP", "dsListData" => "MP",
                "showDsInfo" => "MP", "updateDsInfo" => "MP", "changeDsState" => "MP", "deleteDsInfo" => "MP", "showDsImageList" => "MP", "deleteDsImageList" => "MP",
                "ds_orderListPaginate" => "MP", "ds_orderListData" => "MP", "showDsOrderInfo" => "MP", "updateDsOrderInfo" => "MP",
                // 挂号捐赠订购记录...
                "oScheduleListPaginate" => "MPF", "oScheduleListData" => "MPF",
            ),
            'me' => array(
                "menu" => "AM",
                "meListPaginate" => "AM", "meListData" => "AM",
                "showMeInfo" => "AM", "updateMeInfo" => "AM", "changeMeState" => "AM", "deleteMeInfo" => "AM", "showMeImageList" => "AM", "deleteMeImageList" => "AM",
                "me_orderListPaginate" => "AM", "me_orderListData" => "AM", "showMeOrderInfo" => "AM", "updateMeOrderInfo" => "AM",
                // 挂号订购记录...
                "oMeListPaginate" => "AFM", "oMeListData" => "AFM", "showOMeInfo" => "AFM", "updateOMeInfo" => "AFM",
            ),
            'order' => array(
                "menu" => "MP",
                "exportOrderData" => "MP",
                // 平台福利社药品相关...
                "mmOrderListPaginate" => "MP", "mmOrderListData" => "MP",
                // 平台医用耗材相关...
                "cmOrderListPaginate" => "MP", "cmOrderListData" => "MP",
                // 平台医用耗材相关...
                "wmOrderListPaginate" => "MP", "wmOrderListData" => "MP",
                // 其它订单接口...
                "mo_medicineListPaginate" => "MP", "mo_medicineListData" => "MP",
                // 其它订单接口...
                "showOrderInfo" => "F", "updateOrderInfo" => "F", //"changeOState" => "F",
            ),
            'data' => array(
                "menu" => "AM",
                "dataIntegrityAnalysis" => "AFM",
                "bankListPaginate" => "AM", "bankListData" => "AM", "showBankInfo" => "AM", "updateBankInfo" => "AM",
                "branchListPaginate" => "AM", "branchListData" => "AM", "showBranchInfo" => "AM", "updateBranchInfo" => "AM",
            ),
            'treatPayment' => array("*" => "MP"),
            'user' => array(
                "menu" => "MP",
                "profile" => "MP", "aDemoDocAs" => "*", "setting" => "MP", "login" => "*", "rsLogin" => "*", "loginIn" => "*", "loginOut" => "*",
                "showUserPassword" => "MP", "updateUserPassword" => "MP"
            ),
            'help' => array("*" => "*"),
            'cloud' => array(
                "createCloudFileUpToken" => '*',
                "uploadAInfoPicture" => 'MP', "uploadCustomerAInfoPicture" => 'MP', "uploadMedicalAInfoPicture" => 'MP', "uploadAdminAInfoPicture" => 'MP',
            ),
        );
 
        $this->c_adminLevelResources = $this->m_adminLevelResources = array(
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'user' => array(
                "index" => "AFM",
                "profile" => "AFM", "aCompanyAdminAs" => "AFM", "aDemoDocAs" => "*", "setting" => "AFM", "login" => "*", "rsLogin" => "*", "loginIn" => "*", "loginOut" => "AFM",
                "showUserPassword" => "AFM", "updateUserPassword" => "AFM"
            ),
            'cloud' => array('*' => '*'),
            'help' => array("*" => "*"),
        );
    }
 
    private function setAplAclResources()
    {
        // Apl area resources
        $this->aplRoleResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'business' => array("*" => "*"),
            'core' => array("*" => "*"),
            'news' => array("*" => "*"),
            'organizationStructure' => array("*" => "*"),
            'talentedPeople' => array("*" => "*"),
            'about' => array("*" => "*"),
        );
 
        $this->a_aplLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'business' => array("*" => "*"),
            'core' => array("*" => "*"),
            'news' => array("*" => "*"),
            'organizationStructure' => array("*" => "*"),
            'talentedPeople' => array("*" => "*"),
            'about' => array("*" => "*"),
        );
 
        $this->c_aplLevelResources = $this->m_aplLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'business' => array("*" => "*"),
            'core' => array("*" => "*"),
            'news' => array("*" => "*"),
            'organizationStructure' => array("*" => "*"),
            'talentedPeople' => array("*" => "*"),
            'about' => array("*" => "*"),
        );
    }
 
    private function setRcAclResources()
    {
        // Rc area resources
        $this->rcRoleResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'medicalNews' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'medicalTechnology' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'contact' => array("*" => "*"),
            'expertIntroduction' => array("*" => "*"),
        );
 
        $this->a_rcLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'medicalNews' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'medicalTechnology' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'contact' => array("*" => "*"),
            'expertIntroduction' => array("*" => "*"),
        );
 
        $this->c_rcLevelResources = $this->m_rcLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'medicalNews' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'medicalTechnology' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'contact' => array("*" => "*"),
            'expertIntroduction' => array("*" => "*"),
        );
    }
 
    private function setTjAclResources()
    {
        // Tj area resources
        $this->tjRoleResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'medicalSurgical' => array("*" => "*"),
            'medicalMale' => array("*" => "*"),
            'medicalWomen' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'contact' => array("*" => "*"),
        );
 
        $this->a_tjLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'medicalSurgical' => array("*" => "*"),
            'medicalMale' => array("*" => "*"),
            'medicalWomen' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'contact' => array("*" => "*"),
        );
 
        $this->c_tjLevelResources = $this->m_tjLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'medicalSurgical' => array("*" => "*"),
            'medicalMale' => array("*" => "*"),
            'medicalWomen' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'contact' => array("*" => "*"),
        );
    }
 
    private function setZavAclResources()
    {
        // Zav area resources
        $this->zavRoleResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'therapy' => array("*" => "*"),
            'traditional' => array("*" => "*"),
            'recovery' => array("*" => "*"),
            'route' => array("*" => "*"),
            'redirect' => array("*" => "*"),
            'navDisease' => array("*" => "*"),
        );
 
        $this->a_zavLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'therapy' => array("*" => "*"),
            'traditional' => array("*" => "*"),
            'recovery' => array("*" => "*"),
            'route' => array("*" => "*"),
            'redirect' => array("*" => "*"),
            'navDisease' => array("*" => "*"),
        );
 
        $this->c_zavLevelResources = $this->m_zavLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'therapy' => array("*" => "*"),
            'traditional' => array("*" => "*"),
            'recovery' => array("*" => "*"),
            'route' => array("*" => "*"),
            'redirect' => array("*" => "*"),
            'navDisease' => array("*" => "*"),
        );
    }
 
    private function setZawAclResources()
    {
        // Zaw area resources
        $this->zawRoleResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'navDisease' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'traditional' => array("*" => "*"),
            'therapy' => array("*" => "*"),
            'contact' => array("*" => "*"),
        );
 
        $this->a_zawLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'navDisease' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'traditional' => array("*" => "*"),
            'therapy' => array("*" => "*"),
            'contact' => array("*" => "*"),
        );
 
        $this->c_zawLevelResources = $this->m_zawLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
            'hospitalIntroduction' => array("*" => "*"),
            'navDisease' => array("*" => "*"),
            'expert' => array("*" => "*"),
            'traditional' => array("*" => "*"),
            'therapy' => array("*" => "*"),
            'contact' => array("*" => "*"),
        );
    }
 
    private function setZamAclResources()
    {
        // Zam area resources
        $this->zamRoleResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
        );
 
        $this->a_zamLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
        );
 
        $this->c_zamLevelResources = $this->m_zamLevelResources = array(
            'index' => array("*" => "*"),
            'api' => array("*" => "*"),
            'ajax' => array("*" => "*"),
            'ajaxLoad' => array("*" => "*"),
            'common' => array("*" => "*"),
            'service' => array("*" => "*"),
            'post' => array("*" => "*"),
        );
    }
 
    private function setApiAclResources()
    {
        // Api area resources
        $this->apiRoleResources = array(
            'index' => array(
                "index" => "*", "help" => "*"
            ),
            'common' => array(
                "index" => "*", "error" => "*", "loadBankList" => "C", "loadBranchList" => "C", "loadRcList" => "C", "areaLevelMap" => "C", "notifyList" => "C", "notifyInfo" => "C", "feedback" => "C", "categoryList" => "*", "loadInviteQrCode" => "*",
                "sign" => "C", "signIn" => "C", "lottery" => "*", "lotteryIn" => "*"
            ),
            'service' => array(
                "index" => "*", "loadAuthCodeVerifyImg" => "*", "verifyAuthCode" => "*", "getSecurityCode" => "*", "checkAppUpdate" => "*", "loadAppLicense" => "*", "zyApp" => "*", "showOrderExpressInfo" => "C", "requestToken" => "*"
            ),
            'ajax' => array(
                "index" => "*", "show" => "*", "category" => "*", "search" => "*", "region" => "*", "searchKeywords" => "*", "brand" => "*", "runAreaInfo" => "*", "areaLevelMap" => "*"
            ),
            'cloud' => array(
                "createCloudFileUpToken" => '*',
                "uploadMedicineInfoPicture" => 'C',
                "uploadMedicineImageList" => 'C',
                "uploadCmImageList" => 'C',
                "uploadRcImageList" => 'C',
                "uploadAInfoPicture" => 'C', "uploadCompanyBlPicture" => "C", "uploadPayElectronicSignaturePicture" => 'C',
                "uploadAuthIdentityCertifyInfo" => 'C', "uploadAuthCompanyCertifyInfo" => 'C', "uploadAuthBankCertifyInfo" => 'C', "uploadAuthRcCertifyInfo" => 'C'
            ),
        );
        $this->a_apiLevelResources = $this->m_apiLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'service' => array("*" => "*"),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
    }
 
 
    private function setCliAclResources()
    {
        // Cli area resources
        $this->cliRoleResources = array(
            ////////////////////////公司代网点管理项目//////////////////////////////
            'index' => array(
                "index" => "*", "help" => "*"
            ),
            'common' => array(
                "index" => "*", "error" => "*", "notifyList" => "*", "notifyInfo" => "*", "feedback" => "*", "categoryList" => "*", "article" => "*"
            ),
        );
        $this->a_cliLevelResources = $this->c_cliLevelResources = $this->s_cliLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
        $this->m_cliLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
    }
 
    private function setWebAclResources()
    {
        // Web area resources
        $this->webRoleResources = array(
            'index' => array(
                "index" => "*", "help" => "*"
            ),
            'common' => array(
                "index" => "*", "error" => "*"
            ),
            'api' => array(
                "*" => "*"
            ),
            'ajaxLoad' => array(
                "*" => "*"
            ),
            'ajax' => array(
                "*" => "*"
            ),
            'service' => array(
                "index" => "*", "requestToken" => "*", "loadAuthCodeVerifyImg" => "*", "verifyAuthCode" => "*", "getSecurityCode" => "*"
            ),
            'user' => array(
                "index" => "AFM", "login" => "*", "rsLogin" => "*", "loginIn" => "*", "loginOut" => "*"
            ),
            'cloud' => array(
                'pictureUpload' => 'AFMG', "uploadMedicineInfoPicture" => 'AFMG'
            )
        );
        $this->a_webLevelResources = $this->c_webLevelResources = $this->s_webLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'service' => array("*" => "*"),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
        $this->m_webLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'service' => array("*" => "*"),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
    }
 
    private function setOpenAclResources()
    {
        // Open area resources
        $this->openRoleResources = array(
            'index' => array("*" => '*'),
            'common' => array(
                "index" => "*",
                "error" => "*",
                "sync" => "*",
            ),
            'ajaxLoad' => array("*" => '*'),
            'qqInterface' => array("*" => '*'),
            'wcInterface' => array("*" => '*'),
            'wbInterface' => array("*" => '*'),
        );
        $this->a_openLevelResources = $this->c_openLevelResources = $this->s_openLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
        $this->m_openLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
    }
 
    private function setMailAclResources()
    {
        // Mail area resources
        $this->mailRoleResources = array(
            'index' => array("*" => '*'),
            'common' => array(
                "index" => "*",
                "error" => "*",
                "sync" => "*",
            ),
            'ajaxLoad' => array("*" => '*'),
        );
        $this->a_mailLevelResources = $this->c_mailLevelResources = $this->s_mailLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
        $this->m_mailLevelResources = array(
            'index' => array("index" => "*",),
            'statistics' => array("index" => "*",),
            'ajaxLoad' => array("*" => "*"),
            'amApi' => array("*" => "*"),
            'common' => array("*" => "*",),
            'user' => array("index" => "*", "profile" => "X", "login" => "*", "rsLogin" => "*", "loginIn" => "*",),
            'help' => array("*" => "*"),
        );
    }
 
    public function loadCommonAclResources()
    {
        // 账号等级权限
        $as = explode("-", $this->acAsId)[0];
        $asLevel = $this->acAsLevel;
        switch ($this->module) {
            case "admin":
                // 加载管理后台菜单...
                $this->loadAdminMenu();
                // 加载权限等级...
                $this->setAdminAclResources();
 
                $this->cMcaRoleResources = $this->adminRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_adminLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_adminLevelResources;
                        break;
                    case "M":
                        $this->cMcaLevelResources = $this->m_adminLevelResources;
                        break;
                    case "G":
                        $this->cMcaLevelResources = $this->m_adminLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "apl":
                // 加载权限等级...
                $this->setAplAclResources();
 
                $this->cMcaRoleResources = $this->aplRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_aplLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_aplLevelResources;
                        break;
                    case "G":
                        $this->cMcaLevelResources = $this->m_aplLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "rc":
                // 加载权限等级...
                $this->setRcAclResources();
 
                $this->cMcaRoleResources = $this->rcRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_rcLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_rcLevelResources;
                        break;
                    case "G":
                        $this->cMcaLevelResources = $this->m_rcLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "tj":
                // 加载权限等级...
                $this->setTjAclResources();
 
                $this->cMcaRoleResources = $this->tjRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_tjLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_tjLevelResources;
                        break;
                    case "G":
                        $this->cMcaLevelResources = $this->m_tjLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "zav":
                // 加载权限等级...
                $this->setZavAclResources();
 
                $this->cMcaRoleResources = $this->zavRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_zavLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_zavLevelResources;
                        break;
                    case "G":
                        $this->cMcaLevelResources = $this->m_zavLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "zaw":
                // 加载权限等级...
                $this->setZawAclResources();
 
                $this->cMcaRoleResources = $this->zawRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_zawLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_zawLevelResources;
                        break;
                    case "G":
                        $this->cMcaLevelResources = $this->m_zawLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "zam":
                // 加载权限等级...
                $this->setZamAclResources();
 
                $this->cMcaRoleResources = $this->zamRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_zamLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_zamLevelResources;
                        break;
                    case "G":
                        $this->cMcaLevelResources = $this->m_zamLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "web":
                // 加载权限等级...
                $this->setWebAclResources();
 
                $this->cMcaRoleResources = $this->webRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_webLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_webLevelResources;
                        break;
                    case "G":
                        // TODO...
                        $this->cMcaLevelResources = $this->m_webLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "api":
                // 加载权限等级...
                $this->setApiAclResources();
 
                $this->cMcaRoleResources = $this->apiRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_apiLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_apiLevelResources;
                        break;
                    case "G":
                        // TODO...
                        $this->cMcaLevelResources = $this->m_apiLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "cli":
                // 加载权限等级...
                $this->setCliAclResources();
 
                $this->cMcaRoleResources = $this->cliRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_cliLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_cliLevelResources;
                        break;
                    case "G":
                        // TODO...
                        $this->cMcaLevelResources = $this->m_cliLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "open":
                // 加载权限等级...
                $this->setOpenAclResources();
 
                $this->cMcaRoleResources = $this->openRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_openLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_openLevelResources;
                        break;
                    case "G":
                        // TODO...
                        $this->cMcaLevelResources = $this->m_openLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            case "mail":
                // 加载权限等级...
                $this->setMailAclResources();
 
                $this->cMcaRoleResources = $this->mailRoleResources;
                // 过滤账户权限等级...
                switch ($as) {
                    case "A":
                        $this->cMcaLevelResources = $this->a_mailLevelResources;
                        break;
                    case "C":
                        $this->cMcaLevelResources = $this->c_mailLevelResources;
                        break;
                    case "G":
                        // TODO...
                        $this->cMcaLevelResources = $this->m_mailLevelResources;
                        break;
                    default:
                        Zz_Api::io(40004, "unknown [$ module: {$this->module}] [$ as: $as]...");
                        break;
                }
                break;
            default:
                exit("unknown module [$ module: {$this->module}]...");
                break;
        }
 
        // 加载 [Role|Level] Acl...
        parent::loadRoleAcl();
        parent::loadLevelAcl();
    }
 
    // 加载当前用户账户管理菜单权限...
    public $_conNavMenuLevel = null;
 
    public function loadConNavMenuLevel()
    {
        // 性能分析...
        //$sts = ManagerTools::microtime_float();
        //$ets = ManagerTools::microtime_float();
        //$_ts = $ets - $sts;
        //Zz_Api::io(40003, $_ts);
 
        // 防止重复加载...
        if ($this->_conNavMenuLevel != null) return $this->_conNavMenuLevel;
 
        $as = $this->acAs;
        $asTag = $this->acAsTag;
        $asId = $this->acAsId;
        $asLevel = $this->acAsLevel;
        // 设置菜单权限 - 过滤显示权限菜单
        $cnMlTag = "CNML:{$this->module}:{$as}:{$asLevel}";
 
        // 更新菜单权限后需手动清除缓存...
        //$this->redisDB->delete($cnMlTag);
        $this->_conNavMenuLevel = [];
        if (!$this->redisDB->exists($cnMlTag)) {
            switch ($this->module) {
                case "admin":
                    $this->_conNavMenuLevel = $this->adminNavMenuLevel;
                    break;
                default:
                    Zz_Api::io(40404, "unknown [module: {$this->module}] nav menu level");
                    break;
            }
            foreach ($this->_conNavMenuLevel as $i_key => &$i_menu) {
                $s_menu = &$this->_conNavMenuLevel;
                $s_level = "I";
                $this->af_conNavMenuLevel($s_menu, $i_key, $i_menu, $s_level);
            }
            // 使用 [\Phalcon\Config] 方法合并数组
            $this->_conNavMenuLevel = new \Phalcon\Config($this->_conNavMenuLevel);
            switch ($asTag) {
                case "AA":
                case "AF":
                case "AM":
                    // TODO...
                    break;
                case "SA":
                case "SF":
                case "SM":
                    // TODO...
                    //$this->_conNavMenuLevel->merge(new \Phalcon\Config($this->sNavMenuLevel));
                    break;
            }
 
            $this->_conNavMenuLevel = $this->_conNavMenuLevel->toArray();
 
            // 缓存一天
            $this->redisDB->set($cnMlTag, json_encode($this->_conNavMenuLevel, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT));
            $this->redisDB->setTimeout($cnMlTag, 86400);
        } else {
            $this->_conNavMenuLevel = $this->redisDB->get($cnMlTag);
            $this->_conNavMenuLevel = json_decode($this->_conNavMenuLevel, true);
        }
 
        return $this->_conNavMenuLevel;
    }
 
    /**
     * This action is executed before execute any action in the application
     * 先于 beforeDispatch 触发
     */
    public function beforeDispatch(Event $event, Dispatcher $dispatcher)
    {
        lg_info("... [" . $_SERVER["REQUEST_URI"] . "]  .............................................................................................POST...");
        lg_debug("$ _SERVER:");
        lg_debug($_SERVER);
        lg_info("$ _POST:");
        lg_info($_POST);
        lg_info("$ sAccountInfo:");
        $sAccountInfo = $this->session->get('sAccountInfo');
        lg_info($sAccountInfo);
        //lg_info("$ disAccountInfo:");
        //lg_info($this->disAccountInfo);
        lg_debug(".End............................................");
 
        //首先使用参数 $dispatcher 初始化
        $this->module = $this->router->getModuleName();
        $this->controller = $dispatcher->getControllerName();
        $this->action = $dispatcher->getActionName();
        $this->requestPathInterface = $this->module . '/' . $this->controller . '/' . $this->action;
 
        // 配置授权 module ...
        $this->atModuleList = ["web", "api", "admin"];
        //允许公开不校验的接口
        $this->unTokenRequestPathList = [
            # [api-account]
            # [api-ajax]
            //'api/ajax/runAreaInfo',
            //'api/ajax/areaLevelMap',
            # [api-cart]
            # [api-cloud]
            # [api-collect]
            # [api-comment]
            # [api-common]
            'api/common/loadInviteQrCode',
            //'api/common/loadBankList',
            //'api/common/loadBranchList',
            //'api/common/loadRcList',
            # [api-medicine]
            'api/medicine/siCate',
            'api/medicine/igCate',
            # [api-promotion]
            'api/promotion/showMpList',
            # [api-order]
            # [api-pay]
            'api/pay/updatePayState',
            'api/pay/mPayInfo',
            'api/pay/mPayGet',
            'api/pay/mPayReceive',
            # [api-service]a
            'api/service/loadAuthCodeVerifyImg',
            'api/service/requestToken',
            'api/service/verifyAuthCode',
            'api/service/checkAppUpdate',
            'api/service/loadAppLicense',
            # [api-shipper]
            # [api-doctor]
 
            # [admin-common]
            'admin/common/error',
            'admin/amApi/cr',
 
            # [web-common]
            'web/common/error',
            # [web-service]
            'web/service/loadAuthCodeVerifyImg',
            'web/service/requestToken',
            'web/service/verifyAuthCode',
        ];
        $this->onTokenRequestPathList = ["*"];
 
        // 接口访问控制...
        $accessRiInfo = $this->accessRequestInterface();
        $fo_info = $accessRiInfo->fo_info;
        $fo_data = $accessRiInfo->fo_data;
        if (!$fo_info->result) {
            // 返回错误跨域响应头...
            $this->responseStatusCorsHeader($fo_data->sc, $fo_data->st, $fo_data->ss);
            return false;
        }
 
        //@ 可随时关闭 token 安全校验...
        // 加载接口授权认证...
        $authRi = $this->authRequestInterface();
        $fo_info = $authRi->fo_info;
        $fo_data = $authRi->fo_data;
        if (!$fo_info->result) {
            // 返回错误跨域响应头...
            $this->responseStatusCorsHeader($fo_data->sc, $fo_data->st, $fo_data->ss);
            return false;
        }
 
        // 如果没有缓存配置,则创建判断权限,检索缓存...
        $this->authRequestInterfaceSession();
 
        // 加载[Role|Level]访问角色等级...
        $this->loadAclRls();
 
        // 加载[Role|Level]访问控制...
        $this->loadCommonAclResources();
 
        // 判断接口访问控制权限...
        $this->aclAllowed = $this->mcaAclAllowed($this->module, $this->controller, $this->action);
 
        // 调用基类验证方法 ...
        return parent::beforeDispatch($event, $dispatcher);
    }
 
    /**
     * This action is executed before execute any action in the application
     * 在执行控制器/动作方法前触发.此时,调度器已经初始化了控制器并知道动作是否存在.
     */
    public function beforeExecuteRoute(Event $event, Dispatcher $dispatcher)
    {
 
        //访问控制
        if ($this->aclAllowed != Acl::ALLOW) {
 
            // 输出权限验证调试结果...
//            Zz_Api::io(40887, "", [
//                "role" => $this->role,
//                "controller" => $this->controller,
//                "action" => $this->action,
//                "aclAllowed" => $this->aclAllowed,
//                "requestPathInterface" => $this->requestPathInterface,
//                "cMcaRoleResources" => $this->cMcaRoleResources,
//                "cMcaLevelResources" => $this->cMcaLevelResources,
//            ]);
 
            // 跳到登录界面
            switch ($this->module) {
                case "api":
                    $dispatcher->forward(array(
//                'namespace'  => 'Multiple\Api\Controllers',
                        "module" => $this->module,
                        'controller' => 'common',
                        'action' => 'error'
                    ));
//                    // 检测是否未登录,还是没有权限访问
//                    if (!$sAccountInfo) {
//                        $dispatcher->forward(array(
////                'namespace'  => 'Multiple\Api\Controllers',
//                            "module" => $this->module,
//                            'controller' => 'common',
//                            'action' => 'error'
//                        ));
//                    } else {
//                        // 如果已经登录,但是访问了没有权限访问的接口-则跳转到当前的页面地址-并提示
//                        $httpReferer = $this->request->getHTTPReferer();
//                        $REQUEST_URI = $this->request->getServer("REQUEST_URI");
//
//                        // 推送禁用权限消息...
//                        $load_notifyInfo["notify_way"] = "noPermissionsError";
//                        $load_notifyInfo["notify_type"] = "warning";
//                        $load_notifyInfo["notify_info"] = "抱歉,系统拒绝了您的请求,您的当前账号 [" . $sAccountInfo["asId"] . "] 没有此接口 [$REQUEST_URI] 的访问权限";
//
//                        $this->session->set("load_notifyInfo", $load_notifyInfo);
//
//                        // 回跳到之前页面并弹出动态提示框
//                        header("Location: $httpReferer");
//                        exit;
//                    }
                    break;
                case "admin":
                    // 检测是否未登录,还是没有权限访问
                    //$sAccountInfo = $this->session->get('sAccountInfo');
                    $as = $this->disAccountInfo["acAs"];
                    $asId = $this->disAccountInfo["acAsId"];
                    $lgAsList = ["admin" => ["A", "S"]][$this->module];
 
                    if ($this->request->isGet()) {
                        // 如果已经登录,但是访问了没有权限访问的接口-则跳转到当前的页面地址-并提示
                        $httpReferer = $this->request->getHTTPReferer();
                        $REQUEST_URI = $this->request->getServer("REQUEST_URI");
                        //Zz_Api::io(49876, "", $httpReferer);
 
                        // 如果是七牛回调 - 则返回无权限错误 ...
                        if ($this->controller == "cloud" && isset($_SERVER["HTTP_USER_AGENT"]) && strpos($_SERVER["HTTP_USER_AGENT"], "qiniu-callback") !== false)
                            Zz_Api::io(40888, "抱歉,当前登录用户[asId: {$asId}]无此云存储接口 [$REQUEST_URI] 操作权限,操作被拒绝...");
 
                        // 推送禁用权限消息...
                        $load_notifyInfo["notify_way"] = "noPermissionsError";
                        $load_notifyInfo["notify_type"] = "warning";
                        $load_notifyInfo["notify_info"] = "抱歉,系统拒绝了您的请求,您的当前账号 [" . $asId . "] 没有此接口 [$REQUEST_URI] 的访问权限";
 
                        $this->session->set("load_notifyInfo", $load_notifyInfo);
 
                        // 防止跳入死循环...
                        if (strpos($httpReferer, $REQUEST_URI) !== false) {
                            $dispatcher->forward(array(
                                //'namespace' => 'Multiple\Admin\Controllers',
                                "module" => $this->module,
                                'controller' => 'user',
                                'action' => 'login'
                            ));
                            return false;
                        }
 
                        // 回跳到之前页面并弹出动态提示框
                        if ($httpReferer) {
                            header("Location: $httpReferer");
                            exit;
                        }
                    }
 
                    if ($this->request->isGet()) {
                        if (!$this->disAccountInfo || !in_array($as, $lgAsList)) {
                            // 如果尚未登录,则跳转到登录界面
                            $dispatcher->forward(array(
                                //'namespace' => 'Multiple\Admin\Controllers',
                                "module" => $this->module,
                                'controller' => 'user',
                                'action' => 'login'
                            ));
                        } else {
                            // 如果已经登录,则跳转到个人账户中心
                            $dispatcher->forward(array(
                                //'namespace' => 'Multiple\Admin\Controllers',
                                "module" => $this->module,
                                'controller' => 'user',
                                'action' => 'profile'
                            ));
                        }
                    } else {
                        // 如果尚未登录,则跳转到登录界面
                        $dispatcher->forward(array(
                            //'namespace' => 'Multiple\Admin\Controllers',
                            "module" => $this->module,
                            'controller' => 'common',
                            'action' => 'error'
                        ));
                    }
 
                    break;
                case "web":
                    $dispatcher->forward(array(
//                'namespace'  => 'Multiple\Web\Controllers',
                        "module" => $this->module,
                        'controller' => 'common',
                        'action' => 'error'
                    ));
                    break;
                case "cli":
                    break;
                default:
                    break;
            }
 
            return false;
        } else {
            //如果是访问需要授权的页面,则进一步检查Token
            if ($this->role != "Customer" || $this->role == "Customer" /*&& $sAccountInfo["Token"] == $RequestAccessToken*/) {
                //如果请求对象是桌面客户端
                $this->view->setVar("LoadWay", "WebBrowser");
            } else {
                return false;
            }
        }
    }
 
    // 根据管理员权限递归检测过滤页面展示菜单
    public function af_conNavMenuLevel(&$s_menu, $i_key, &$i_menu, $s_level = "I")
    {
        $iPath = $i_menu["path"];
        // 去除首空字符并重建数组索引
        //list($m, $c, $a) = array_values(array_filter(explode("/", $iPath)));
        list($c, $a) = array_values(array_filter(explode("/", $iPath)));
        // 检测规则权限
        //$acl = $this->getAcl();
        //$allowed = $acl->isAllowed($this->role, $c, $a);
        $allowed = $this->mcaAclAllowed($this->module, $c, $a);
        $i_menu["allowed"] = $allowed;
 
        $ss_level = $s_level . "I";
        $_mLoopMenu = $ss_level . "_MenuList";
        if ($allowed && count($i_menu[$_mLoopMenu]) > 0) {
            foreach ($i_menu[$_mLoopMenu] as $ii_key => &$ii_value) {
                $ss_menu = &$s_menu[$i_key][$_mLoopMenu];
                $this->af_conNavMenuLevel($ss_menu, $ii_key, $ii_value, $ss_level);
            }
        }
 
        // 过滤掉不允许出现的菜单
        if (!$allowed) unset($s_menu[$i_key]);
    }
}
#6DiSecurity->__construct(Object(Phalcon\Di\FactoryDefault))
/data/home/yzhang/WebHospital/Manager/Applications/Common/di-services-web.php (7)
<?php
 
//use \BrowscapPHP\Browscap;
 
// * Loading routes from the routes.php file
$di->set('dis', function ()use ($di)  {
    $diSecurity = new DiSecurity($di);
    return $diSecurity;
});
 
// * We register the events manager
$di->setShared('dispatcher', function () use ($di) {
 
    $dispatcher = new Phalcon\Mvc\Dispatcher();
 
//    $security = new Security($di);
    $diSecurity = $di->getShared('dis');
//    // We listen for events in the dispatcher using the Security plugin
    $eventsManager = $di->getShared('eventsManager');
    $eventsManager->attach('dispatch', $diSecurity);
    $dispatcher->setEventsManager($eventsManager);
 
//    $dispatcher->setDefaultNamespace("Multiple\\Admin\\Controllers");
 
//    $dispatcher->setDefaultNamespace(
//        "Single\\user\\Controllers"
//    );
 
    return $dispatcher;
});
 
// * Loading routes from the routes.php file
$di->set('router', function () {
    return require_once COMMON_WEB_APP_DIR . '/Common/routes.php';
});
 
// * The URL component is used to generate all kind of urls in the application
$di->set('url', function () use ($config) {
    $url = new \Phalcon\Mvc\Url();
    $url->setBaseUri($config->application->baseUri);
    return $url;
});
 
// * Register the flash service with custom CSS classes
$di->set('mDetect', function () {
    //require_once(WEB_APP_DIR . '/plugins/MobileDetect/Mobile_Detect.php');
 
    $mDetect = new Mobile_Detect;
 
    //$deviceType = ($mDetect->isMobile() ? ($mDetect->isTablet() ? 'tablet' : 'phone') : 'computer');
    //Zz_Api::io(40002, "-", ["deviceType" => $deviceType]);
 
    return $mDetect;
});
#7Closure->{closure}()
#8Phalcon\Di\Service->resolve(null, Object(Phalcon\Di\FactoryDefault))
#9Phalcon\Di->get(dis, null)
#10Phalcon\Di->getShared(dis)
/data/home/yzhang/WebHospital/Manager/Applications/Common/di-services-web.php (17)
<?php
 
//use \BrowscapPHP\Browscap;
 
// * Loading routes from the routes.php file
$di->set('dis', function ()use ($di)  {
    $diSecurity = new DiSecurity($di);
    return $diSecurity;
});
 
// * We register the events manager
$di->setShared('dispatcher', function () use ($di) {
 
    $dispatcher = new Phalcon\Mvc\Dispatcher();
 
//    $security = new Security($di);
    $diSecurity = $di->getShared('dis');
//    // We listen for events in the dispatcher using the Security plugin
    $eventsManager = $di->getShared('eventsManager');
    $eventsManager->attach('dispatch', $diSecurity);
    $dispatcher->setEventsManager($eventsManager);
 
//    $dispatcher->setDefaultNamespace("Multiple\\Admin\\Controllers");
 
//    $dispatcher->setDefaultNamespace(
//        "Single\\user\\Controllers"
//    );
 
    return $dispatcher;
});
 
// * Loading routes from the routes.php file
$di->set('router', function () {
    return require_once COMMON_WEB_APP_DIR . '/Common/routes.php';
});
 
// * The URL component is used to generate all kind of urls in the application
$di->set('url', function () use ($config) {
    $url = new \Phalcon\Mvc\Url();
    $url->setBaseUri($config->application->baseUri);
    return $url;
});
 
// * Register the flash service with custom CSS classes
$di->set('mDetect', function () {
    //require_once(WEB_APP_DIR . '/plugins/MobileDetect/Mobile_Detect.php');
 
    $mDetect = new Mobile_Detect;
 
    //$deviceType = ($mDetect->isMobile() ? ($mDetect->isTablet() ? 'tablet' : 'phone') : 'computer');
    //Zz_Api::io(40002, "-", ["deviceType" => $deviceType]);
 
    return $mDetect;
});
#11Closure->{closure}()
#12Phalcon\Di\Service->resolve(null, Object(Phalcon\Di\FactoryDefault))
#13Phalcon\Di->get(dispatcher, null)
#14Phalcon\Di->getShared(dispatcher)
/data/home/yzhang/WebHospital/Manager/Applications/Utils/ModuleBase.php (41)
<?php
 
use Coam;
use Coam\App\Collections;
use Coam\App\Library;
use Coam\App\Models;
use Coam\App\Library\Zz_Api;
use \Phalcon\DiInterface;
use \Phalcon\Loader;
use \Phalcon\Mvc\View;
use \Phalcon\Mvc\ModuleDefinitionInterface;
 
class ModuleBase implements ModuleDefinitionInterface
{
    // 当期路由加载的模块...
    protected $load_module = null; // Admin
    protected $load_module_ns = null; // Multiple\Admin\Controllers
 
    // 配置[电脑/平板/手机]-适配视图
    protected $pc_view;
    protected $tablet_view;
    protected $mobile_view;
 
    /**
     * Registers an autoloader related to the module
     * @param DiInterface $di
     */
    public function registerAutoloaders(DiInterface $di = null)
    {
        // 首字母大写
        $this->load_module = ucfirst(RUN_SERVER_MODULE);
        $this->load_module_ns = 'Coam\\App\\Multiple\\' . $this->load_module . '\\Controllers';
 
        $loader = $di->getShared("loader");
 
        $loader->registerNamespaces(array(
            //'Phalcon' => COMMON_WEB_BASE_DIR . '/vendor/phalcon/incubator/Library/Phalcon/',
            $this->load_module_ns => WEB_APP_DIR . '/Multiple/' . ucfirst(RUN_SERVER_MODULE) . '/Controllers/',
        ))->register();
 
        $di->getShared("dispatcher")->setDefaultNamespace($this->load_module_ns);
    }
 
    /**
     * Registers services related to the module
     * @param DiInterface $di
     */
    public function registerServices(DiInterface $di)
    {
        // 根据当前访问的客户端自动适配不同的视图 view
        $mDetect = $di->getShared("mDetect");
        $web_view = null;
        if ($mDetect->isMobile()) {
            // 移动客户端
            $web_view = $this->mobile_view;
        } else if ($mDetect->isTablet()) {
            // 移动客户端
            $web_view = $this->tablet_view;
        } else {
            // PC 桌面浏览器
            $web_view = $this->pc_view;
        }
 
        // Registering the view component
        $di->set("view", function () use ($di, $web_view) {
            $view = new View();
 
//            $view->setViewsDir(WEB_APP_DIR . '/Multiple/' . RUN_SERVER_MODULE . '/views/');
            $view->setViewsDir(WEB_APP_DIR . '/Multiple/' . ucfirst(RUN_SERVER_MODULE) . '/' . $web_view . '/');
 
            $view->registerEngines(array(
                ".volt" => 'volt'
            ));
 
            //重新定义 Volt 全局引用变量
            $view->setVar("HostServer", HostServer);
            $view->setVar("AccessHostServer", AccessHostServer);
            $view->setVar("WsaHostServer", WsaHostServer);
            $view->setVar("MainServer", MainServer);
            $view->setVar("AccessMainServer", AccessMainServer);
            $view->setVar("WsaMainServer", WsaMainServer);
 
            // 云存储服务 ...
            $view->setVar("WsaMirrorSpace", WsaMirrorSpace);
            $view->setVar("WebMirrorSpace", WebMirrorSpace);
            $view->setVar("WamMirrorSpace", WamMirrorSpace);
            $view->setVar("WebCloudSpace", WebCloudSpace);
 
            // 通用网站全局展示配置信息
            $view->setVar("ConCompanyName", ConCompanyName);
            $view->setVar("ConCompanyTag", ConCompanyTag);
            $view->setVar("ConCompanySTag", ConCompanySTag);
 
            // 通用网站全局展示配置信息
            $view->setVar("ConHospitalAreaOne", ConHospitalAreaOne);
            $view->setVar("ConHospitalAreaLine", ConHospitalAreaLine);
            $view->setVar("ConHospitalAddress", ConHospitalAddress);
            $view->setVar("ConHospitalHotLine", ConHospitalHotLine);
 
            //医院常用联系方式
            $view->setVar("ConHospitalHotQQ1", ConHospitalHotQQ1);
            $view->setVar("ConHospitalHotQQ2", ConHospitalHotQQ2);
            $view->setVar("ConHospitalEmail", ConHospitalEmail);
 
            $eventsManager = $di->getShared("eventsManager");
 
            //监听视图渲染事件,其它事件{beforeRenderView}一次请求可能会触发多次
            $eventsManager->attach('view:beforeRender', function ($event, $view) use ($di) {
                lg_debug("Process view:beforeRender.....................................................");
 
                //设定搜索引擎不抓取指定域名的内容,防止分散权重
                $metaRobots = "all";
                //设定 meta 让搜索引擎不怕取测试页面
                if (in_array(AccessHostServer, ['t.yntongji.com'])) {
                    $metaRobots = "noindex,nofollow";
                }
                $view->setVar("MetaRobots", $metaRobots);
                ////////////////////////////////////////////////////////////////////////////////////////////
 
                // 通用文章动态目录
                // 通用 controller 加载目录
                $view->setVar("ConAttachedPath", "/assets/" . RUN_SERVER_MODULE . "/attached/");//可以有选择性的加载镜像存储
                //$view->setVar("ConAttachedPath", WamMirrorSpace.$ConAttachedPath);//可以有选择性的加载镜像存储
                // 通用 post 文章加载目录
                $view->setVar("PostAttachedPath", "/attached/post");//可以有选择性的加载镜像存储
                //$view->setVar("ConAttachedPath", WamMirrorSpace.$ConAttachedPath);//可以有选择性的加载镜像存储
 
                //文章动态目录
//        $Controller = $di->getShared("dispatcher")->getControllerName();
//        $ConAttachedPath = '/attached/'.$Controller;
 
//        $params = $this->dispatcher->getParams();
//        $postWay = null;
//        if($params[0] && in_array($params[0], array_keys($this->mainNavMapping))) $postWay = $this->mainNavMapping[$params[0]];
//        $ConAttachedPath = '/attached/'.$postWay;
 
                // 通用 controller 加载目录
                //$view->setVar("ConAttachedPath", $ConAttachedPath);//可以有选择性的加载镜像存储
                //$view->setVar("ConAttachedPath", WamMirrorSpace.$ConAttachedPath);//可以有选择性的加载镜像存储
 
                // 通用 post 文章加载目录
                //$view->setVar("PostAttachedPath", "/attached/post");//可以有选择性的加载镜像存储
                //$view->setVar("ConAttachedPath", WamMirrorSpace.$ConAttachedPath);//可以有选择性的加载镜像存储
 
                //lg_debug($view->getParamsToView()); // 'test_value' here OK
                //$ViewRenderLevel = $view->getRenderLevel();
 
                #1# LEVEL_MAIN_LAYOUT
                #2# LEVEL_AFTER_TEMPLATE
                #3# LEVEL_LAYOUT
                #4# LEVEL_BEFORE_TEMPLATE
                #5# LEVEL_ACTION_VIEW
                #6# LEVEL_NO_RENDER
                #7# CACHE_MODE_NONE
                #8# CACHE_MODE_INVERSE
 
                //判断是否已开启SESSION -- 这里实测已开启SessionInfo
                //从缓存获取浏览器信息 -- 由于每次请求,获取的浏览器信息都是一样的,然而获取浏览器接口特别耗用CPU性能,所以这里特别开启浏览器检测缓存
                // getShared 和 get 都返回当前已被实例化的 setShared ("session",function(){}) 实例,避免重复初始化 造成 {ini_set(): A session is active} 错误
//                $browserRenderInfo = $di->getShared("session")->get('browserRenderInfo');
//                if (!$browserRenderInfo) {
//                    //$BrowserInfo = @get_browser(null, true);
//                    //使用 https://github.com/browscap/browscap-php 代替 php.ini 提升速度
//                    $browserInfo = $di->get("browsCap")->getBrowser();
//
//                    //输出数组变量到视图
//                    $browserRenderInfo = \ManagerTools::browserRenderInfo($browserInfo);
//
//                    $di->getShared("session")->set('browserRenderInfo', $browserRenderInfo);
//                }
//
//                //向Browns Version 传值
//                $view->setVar("browserRenderInfo", $browserRenderInfo);
            });
 
            $eventsManager->attach('view:beforeRenderView', function ($event, $view) use ($di) {
                //lg("Process view:beforeRenderView.....................................................-".$di->getShared("dispatcher")->getControllerName());
                //$params = $di->getShared("dispatcher")->getParams();
                //lg("TTTTTTTTTTTTTT+++".$di->getShared("dispatcher")->getControllerName());
//        lga($params);
 
                $controller = $di->getShared("dispatcher")->getControllerName();
                if ($controller == "post") {
                    $params = $di->getShared("dispatcher")->getParams();
//            lg("TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT---" . $di->getShared("dispatcher")->getControllerName());
//            lga($params);
                    $controller = $params["postController"];
 
                    //Array
                    //(
                    //    [mainNav] => maleNXBY
                    //    [subNav] => m_JXJZZ
                    //    [postId] => 331
                    //    [postController] => medicalMale
                    //    [mainNavList] => []
                    //)
 
                    // 通过 postController 传递过来的参数依次渲染
                    $view->setVar("postController", $params["postController"]);
                    $view->setVar("postId", $params["postId"]);
                    $view->setVar("showMainCategory", $params["mainNav"]);
                    $view->setVar("showSubCategory", $params["subNav"]);
                    $view->setVar("mainNavList", $params["mainNavList"]);
 
                    $post_way = "";
                    $post_way_list = ["male" => 1, "women" => 2, "surgical" => 3, "traditional" => 4, "other" => 9, "demo" => 8];
                    foreach ($post_way_list as $_key => $_way) {
                        if (0 === strpos($params["mainNav"], $_key)) {
                            $post_way = $_key;
                            break;
                        }
                    }
 
                    // dispatcher->forward -> PostController 跳转再次设置-并设置之前的 文章动态目录
                    // 通用 controller 加载目录
                    $view->setVar("ConAttachedPath", "/assets/" . RUN_SERVER_MODULE . "/attached/");//可以有选择性的加载镜像存储
                    //$view->setVar("ConAttachedPath", WamMirrorSpace.$ConAttachedPath);//可以有选择性的加载镜像存储
                    // 通用 post 文章加载目录
                    $view->setVar("PostAttachedPath", "/attached/post/" . $post_way);//可以有选择性的加载镜像存储
                    //$view->setVar("ConAttachedPath", WamMirrorSpace.$ConAttachedPath);//可以有选择性的加载镜像存储
 
                }
 
            });
 
            //Bind the eventsManager to the view component
            $view->setEventsManager($eventsManager);
 
            return $view;
        });
    }
}
#15ModuleBase->registerAutoloaders(Object(Phalcon\Di\FactoryDefault))
/data/home/yzhang/WebHospital/Manager/Applications/Multiple/Web/Module.php (23)
<?php
namespace Coam\App\Multiple\Web;
 
use Phalcon\DiInterface;
use Phalcon\Loader;
use Phalcon\Mvc\View;
use Phalcon\Mvc\ModuleDefinitionInterface;
 
class Module extends \ModuleBase
{
    /**
     * Registers an autoloader related to the module
     * @param DiInterface $di
     */
    public function registerAutoloaders(DiInterface $di = null)
    {
        // 配置设备视图适配器
        $this->pc_view = "pc_views";
        $this->tablet_view = "pc_views";
        $this->mobile_view = "pc_views";
 
        // 执行父类通用函数
        parent::registerAutoloaders($di);
    }
}
 
 
#16Coam\App\Multiple\Web\Module->registerAutoloaders(Object(Phalcon\Di\FactoryDefault))
#17Phalcon\Mvc\Application->handle()
/data/home/yzhang/WebHospital/Manager/public/index.php (172)
<?php
 
# 获取定义用户 web 根目录 [/data/home/yzhang]
//define('HOME_DIR', dirname(__DIR__) . "/../../../..");
define('HOME_DIR', "/data/home/yzhang");
 
// 切换开发测试环境
define('ENV', 'dev');
 
// 开启 xhprof 性能分析...
define('DEBUG_ENV', false);
 
if (!defined('ENV')) {
    error_log('Error: The application ENV constant is not set.');
    exit(1);
}
 
// 开发测试环境配置
define('DEV_ENV', 'dev');
define('TEST_ENV', 'test');
define('UPGRADE_ENV', 'upgrade');
define('DIST_ENV', 'dist');
define('DEV_ING', ENV === DEV_ENV);
define('TEST_ING', ENV === TEST_ENV);
define('UPGRADE_ING', ENV === UPGRADE_ENV);
define('DIST_ING', ENV === DIST_ENV);
 
/*
 * Environment setup
 * Different environments will require different levels of error reporting.
*/
switch (ENV) {
    case DEV_ENV:
        //error_reporting(E_ALL);
        //ini_set("display_errors", 1);
        (new Phalcon\Debug)->listen();
        break;
    case TEST_ENV:
        //ini_set("display_errors", 0);
        //ini_set("log_errors", 1);
        //error_reporting(E_ALL);
        break;
    case UPGRADE_ENV:
        //ini_set("display_errors", 0);
        //ini_set("log_errors", 1);
        //error_reporting(E_ALL);
        break;
    case DIST_ENV:
        //ini_set("display_errors", 0);
        //ini_set("log_errors", 1);
        //error_reporting(E_ALL);
        break;
    default:
        error_log('Error: The application ENV constant is not set correctly.');
        exit(1);
}
 
// 开启 xhprof 性能分析...
if (DEBUG_ENV) xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
 
try {
 
    # 获取当前网站的根目录
    if (!defined('WEB_BASE_DIR')) define('WEB_BASE_DIR', dirname(__DIR__));
    if (!defined('WEB_APP_DIR')) define('WEB_APP_DIR', dirname(__DIR__) . '/Applications');
 
    // 加载主配置文件...
    include_once WEB_APP_DIR . '/Common/Config/config_common.php';
 
 
// pay.coam.co
//    //aliPay
//    //require_once(APP_DIR."/plugins/Pay/alipay/alipay.config.php");
//    //$aliPayConfig = include APP_DIR."/plugins/Pay/alipay/alipay.config.php";
//    require_once(WEB_APP_DIR . "/plugins/Pay/aliPay/lib/alipay_submit.class.php");
//    require_once(WEB_APP_DIR . "/plugins/Pay/aliPay/lib/alipay_notify.class.php");
//
//    //tenPay
//    require_once(WEB_APP_DIR . "/plugins/Pay/tenPay/InstantAccount/classes/RequestHandler.class.php");
//    //---------------------------------------------------------
//    //财付通即时到帐支付后台回调示例,商户按照此文档进行开发即可
//    //---------------------------------------------------------
//    require(WEB_APP_DIR . "/plugins/Pay/tenPay/InstantAccount/classes/ResponseHandler.class.php");
//    //require (COMMON_APP_DIR."/plugins/Pay/tenPay/InstantAccount/classes/RequestHandler.class.php");
//    require(WEB_APP_DIR . "/plugins/Pay/tenPay/InstantAccount/classes/client/ClientResponseHandler.class.php");
//    require(WEB_APP_DIR . "/plugins/Pay/tenPay/InstantAccount/classes/client/TenpayHttpClient.class.php");
 
 
    // *** Read auto-loader˜
    include_once WEB_APP_DIR . '/Common/loader.php';
 
    // *** Read auto-logger
    include_once WEB_APP_DIR . '/Common/logger.php';
 
    // 设置默认控制器工厂函数
    $di = new \Phalcon\DI\FactoryDefault();
 
    // *** setting di services
    include_once WEB_APP_DIR . '/Common/di-services-base.php';
    include_once WEB_APP_DIR . '/Common/di-services-common.php';
    include_once WEB_APP_DIR . '/Common/di-services-db.php';
    include_once WEB_APP_DIR . '/Common/di-services-web.php';
 
    //$application = new \Phalcon\Mvc\Application();
    //$application->setDI($di);
 
    $application = new \Phalcon\Mvc\Application($di);
    //Phalcon--debugbar第三方调试-打开500错误
 
//    $di['app'] = $application; //  Important
////    $di->set('app', $application);
//    (new Snowair\Debugbar\ServiceProvider())->start();
 
    // after start the debugbar, you can do noting but handle your app right now.
 
    // 注册模块
    $application->registerModules(
        [
            "admin" => [
                "className" => "Coam\\App\\Multiple\\Admin\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Admin/Module.php",
            ],
            "apl" => [
                "className" => "Coam\\App\\Multiple\\Apl\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Apl/Module.php",
            ],
            "rc" => [
                "className" => "Coam\\App\\Multiple\\Rc\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Rc/Module.php",
            ],
            "tj" => [
                "className" => "Coam\\App\\Multiple\\Tj\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Tj/Module.php",
            ],
            "zav" => [
                "className" => "Coam\\App\\Multiple\\Zav\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Zav/Module.php",
            ],
            "zaw" => [
                "className" => "Coam\\App\\Multiple\\Zaw\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Zaw/Module.php",
            ],
            "zam" => [
                "className" => "Coam\\App\\Multiple\\Zam\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Zam/Module.php",
            ],
 
            // Zs_Mall 项目移植...
            "api" => [
                "className" => "Coam\\App\\Multiple\\Api\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Api/Module.php",
            ],
            "cli" => [
                "className" => "Coam\\App\\Multiple\\Cli\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Cli/Module.php",
            ],
            "web" => [
                "className" => "Coam\\App\\Multiple\\Web\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Web/Module.php",
            ],
            "open" => [
                "className" => "Coam\\App\\Multiple\\Open\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Open/Module.php",
            ],
            "mail" => [
                "className" => "Coam\\App\\Multiple\\Mail\\Module",
                "path" => WEB_APP_DIR . "/Multiple/Mail/Module.php",
            ],
        ]
    );
 
    echo $application->handle()->getContent();
 
} catch (Phalcon\Exception $e) {
    echo $e->getMessage();
} catch (PDOException $e) {
    echo $e->getMessage();
}
 
# 是否开启 XhProf 调试日志 ...
if (DEBUG_ENV) Zz_Api::endXhProfDebug();
KeyValue
_url/web/
KeyValue
USERwww-data
HOME/var/www
HTTP_ACCEPT_ENCODINGgzip
HTTP_CONNECTIONKeep-Alive
HTTP_HOSTyyi.io
HTTP_IF_MODIFIED_SINCEMon, 23 Jul 2018 03:57:38 GMT
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
REDIRECT_STATUS200
SERVER_NAMEyyi.io
SERVER_PORT443
SERVER_ADDR10.10.10.101
REMOTE_PORT59664
REMOTE_ADDR54.227.76.180
SERVER_SOFTWAREnginx/1.14.0
GATEWAY_INTERFACECGI/1.1
REQUEST_SCHEMEhttps
SERVER_PROTOCOLHTTP/1.1
DOCUMENT_ROOT/data/home/yzhang/WebHospital/Manager/public/
DOCUMENT_URI/index.php
REQUEST_URI/
SCRIPT_NAME/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHODGET
QUERY_STRING_url=/web/
HTTPSon
SCRIPT_FILENAME/data/home/yzhang/WebHospital/Manager/public//index.php
FCGI_ROLERESPONDER
PHP_SELF/index.php
REQUEST_TIME_FLOAT1548329792.9292
REQUEST_TIME1548329792
#Path
0/data/home/yzhang/WebHospital/Manager/public/index.php
1/data/home/yzhang/WebHospital/Manager/Applications/Common/Config/config_common.php
2/data/home/yzhang/WebHospital/Manager/Applications/Common/loader.php
3/data/home/yzhang/WebHospital/Manager/vendor/autoload.php
4/data/home/yzhang/WebHospital/Manager/vendor/composer/autoload_real.php
5/data/home/yzhang/WebHospital/Manager/vendor/composer/ClassLoader.php
6/data/home/yzhang/WebHospital/Manager/vendor/composer/autoload_static.php
7/data/home/yzhang/WebHospital/Manager/vendor/guzzlehttp/psr7/src/functions_include.php
8/data/home/yzhang/WebHospital/Manager/vendor/guzzlehttp/psr7/src/functions.php
9/data/home/yzhang/WebHospital/Manager/vendor/clue/stream-filter/src/functions.php
10/data/home/yzhang/WebHospital/Manager/vendor/paragonie/random_compat/lib/random.php
11/data/home/yzhang/WebHospital/Manager/vendor/php-http/message/src/filters.php
12/data/home/yzhang/WebHospital/Manager/vendor/symfony/polyfill-php70/bootstrap.php
13/data/home/yzhang/WebHospital/Manager/vendor/symfony/polyfill-mbstring/bootstrap.php
14/data/home/yzhang/WebHospital/Manager/vendor/guzzlehttp/promises/src/functions_include.php
15/data/home/yzhang/WebHospital/Manager/vendor/guzzlehttp/promises/src/functions.php
16/data/home/yzhang/WebHospital/Manager/vendor/swiftmailer/swiftmailer/lib/swift_required.php
17/data/home/yzhang/WebHospital/Manager/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php
18/data/home/yzhang/WebHospital/Manager/vendor/guzzlehttp/guzzle/src/functions_include.php
19/data/home/yzhang/WebHospital/Manager/vendor/guzzlehttp/guzzle/src/functions.php
20/data/home/yzhang/WebHospital/Manager/vendor/khanamiryan/qrcode-detector-decoder/lib/common/customFunctions.php
21/data/home/yzhang/WebHospital/Manager/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
22/data/home/yzhang/WebHospital/Manager/vendor/overtrue/wechat/src/Payment/helpers.php
23/data/home/yzhang/WebHospital/Manager/vendor/qiniu/php-sdk/src/Qiniu/functions.php
24/data/home/yzhang/WebHospital/Manager/vendor/qiniu/php-sdk/src/Qiniu/Config.php
25/data/home/yzhang/WebHospital/Manager/vendor/tinify/tinify/lib/Tinify.php
26/data/home/yzhang/WebHospital/Manager/vendor/tinify/tinify/lib/Tinify/Exception.php
27/data/home/yzhang/WebHospital/Manager/vendor/xxtea/xxtea/xxtea.php
28/data/home/yzhang/WebHospital/Manager/Applications/Common/logger.php
29/data/home/yzhang/WebHospital/Manager/Applications/Common/di-services-base.php
30/data/home/yzhang/WebHospital/Manager/Applications/Common/di-services-common.php
31/data/home/yzhang/WebHospital/Manager/Applications/Common/di-services-db.php
32/data/home/yzhang/WebHospital/Manager/Applications/Common/di-services-web.php
33/data/home/yzhang/WebHospital/Manager/Applications/Common/routes.php
34/data/home/yzhang/WebHospital/Manager/Applications/Multiple/Web/Module.php
35/data/home/yzhang/WebHospital/Manager/Applications/Utils/ModuleBase.php
36/data/home/yzhang/WebHospital/Manager/Applications/Utils/DiSecurity.php
37/data/home/yzhang/WebHospital/Manager/Applications/Library/DiSecurityBase.php
Memory
Usage2097152