<?php
namespace app\install\controller;
use app\BaseController;
use app\service\SystemService;
use app\service\SystemBaseService;
use app\service\MultilingualService;
* 安装程序-公共
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
class Common extends BaseController
{
protected $data_request;
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
public function __construct()
{
$this->data_request = input();
SystemService::SystemBegin($this->data_request);
$assign = [
'action' => RequestAction(),
'system_type' => SystemService::SystemTypeValue(),
'env_max_input_vars_count' => SystemService::EnvMaxInputVarsCount(),
'is_load_map_api' => 0,
'load_map_type' => MyC('common_map_type', 'baidu', true),
'lang_data' => SystemService::PageViewLangData(),
'multilingual_default_code' => MultilingualService::GetUserMultilingualValue(),
'attachment_host' => SystemBaseService::AttachmentHost(),
'public_host' => MyConfig('shopxo.public_host'),
'my_domain' => __MY_DOMAIN__,
'my_host' => __MY_HOST__,
'my_url' => __MY_URL__,
'my_view_url' => __MY_VIEW_URL__,
'my_public_url' => __MY_PUBLIC_URL__,
'my_http' => __MY_HTTP__,
];
MyViewAssign($assign);
}
* 析构函数
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-03-18
* @desc description
*/
public function __destruct()
{
SystemService::SystemEnd($this->data_request);
}
* 空方法响应
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
* @param [string] $method [方法名称]
* @param [array] $args [参数]
*/
public function __call($method, $args)
{
if(IS_AJAX)
{
return DataReturn($method.' 非法访问', -1000);
} else {
MyViewAssign('msg', $method.' 非法访问');
return MyView('public/error');
}
}
}
?>