vr-shopxo-source/app/install/controller/Common.php

90 lines
2.6 KiB
PHP
Raw Normal View History

2018-12-28 10:58:37 +00:00
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
2021-03-16 02:34:52 +00:00
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
2018-12-28 10:58:37 +00:00
// +----------------------------------------------------------------------
2021-03-16 02:34:52 +00:00
// | Licensed ( https://opensource.org/licenses/mit-license.php )
2018-12-28 10:58:37 +00:00
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\install\controller;
2021-07-18 15:42:10 +00:00
use app\BaseController;
2022-04-24 06:50:38 +00:00
use app\service\SystemService;
2018-12-28 10:58:37 +00:00
/**
* 安装程序-公共
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
2021-07-18 15:42:10 +00:00
class Common extends BaseController
2018-12-28 10:58:37 +00:00
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
public function __construct()
{
2022-08-21 09:11:09 +00:00
// 模板数据
$assign = [
// 当前方法
'action' => RequestAction(),
2022-04-24 06:50:38 +00:00
2022-08-21 09:11:09 +00:00
// 系统类型
'system_type' => SystemService::SystemTypeValue(),
2022-05-20 04:53:32 +00:00
2022-08-21 09:11:09 +00:00
// 系统环境参数最大数
'env_max_input_vars_count' => SystemService::EnvMaxInputVarsCount(),
2022-08-21 09:11:09 +00:00
// 默认不加载地图api、类型默认百度地图
'is_load_map_api' => 0,
'load_map_type' => MyC('common_map_type', 'baidu', true),
];
// 页面语言
$lang_common = MyLang('page_common');
if(empty($lang_common) || !is_array($lang_common))
{
$lang_common = [];
}
$lang_page = MyLang('page_'.RequestController());
if(empty($lang_page) || !is_array($lang_page))
{
$lang_page = [];
}
$assign['lang_data'] = array_merge($lang_common, $lang_page);
// 模板赋值
MyViewAssign($assign);
2018-12-28 10:58:37 +00:00
}
/**
2021-07-18 15:42:10 +00:00
* 空方法响应
2018-12-28 10:58:37 +00:00
* @author Devil
2021-07-18 15:42:10 +00:00
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
* @param [string] $method [方法名称]
* @param [array] $args [参数]
2018-12-28 10:58:37 +00:00
*/
2021-07-18 15:42:10 +00:00
public function __call($method, $args)
2018-12-28 10:58:37 +00:00
{
2021-07-18 15:42:10 +00:00
if(IS_AJAX)
{
return DataReturn($method.' 非法访问', -1000);
} else {
MyViewAssign('msg', $method.' 非法访问');
return MyView('public/error');
}
2018-12-28 10:58:37 +00:00
}
2018-12-29 05:13:09 +00:00
}
?>