mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-03 04:19:37 +08:00
105 lines
2.4 KiB
PHP
Executable File
105 lines
2.4 KiB
PHP
Executable File
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
// +----------------------------------------------------------------------
|
|
// | Author: Devil
|
|
// +----------------------------------------------------------------------
|
|
namespace app\admin\controller;
|
|
|
|
use app\service\ConfigService;
|
|
|
|
/**
|
|
* 配置设置
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 0.0.1
|
|
* @datetime 2016-12-01T21:51:08+0800
|
|
*/
|
|
class Config extends Common
|
|
{
|
|
/**
|
|
* 构造方法
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 0.0.1
|
|
* @datetime 2016-12-03T12:39:08+0800
|
|
*/
|
|
public function __construct()
|
|
{
|
|
// 调用父类前置方法
|
|
parent::__construct();
|
|
|
|
// 登录校验
|
|
$this->IsLogin();
|
|
|
|
// 权限校验
|
|
$this->IsPower();
|
|
}
|
|
|
|
/**
|
|
* 后台配置
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 0.0.1
|
|
* @datetime 2016-12-06T21:31:53+0800
|
|
*/
|
|
public function Index()
|
|
{
|
|
// csv
|
|
$this->assign('common_excel_charset_list', lang('common_excel_charset_list'));
|
|
|
|
// 扣除库存规则
|
|
$this->assign('common_deduction_inventory_rules_list', lang('common_deduction_inventory_rules_list'));
|
|
|
|
// 是否
|
|
$this->assign('common_is_text_list', lang('common_is_text_list'));
|
|
|
|
// 热门搜索关键字
|
|
$this->assign('common_search_keywords_type_list', lang('common_search_keywords_type_list'));
|
|
|
|
// 配置信息
|
|
$this->assign('data', ConfigService::ConfigList());
|
|
|
|
return $this->fetch();
|
|
}
|
|
|
|
/**
|
|
* 商店信息
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 0.0.1
|
|
* @datetime 2016-12-06T21:31:53+0800
|
|
*/
|
|
public function Store()
|
|
{
|
|
// 配置信息
|
|
$this->assign('data', ConfigService::ConfigList());
|
|
|
|
return $this->fetch();
|
|
}
|
|
|
|
/**
|
|
* 配置数据保存
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 0.0.1
|
|
* @datetime 2017-01-02T23:08:19+0800
|
|
*/
|
|
public function Save()
|
|
{
|
|
// 数据处理
|
|
// 商店二维码
|
|
if(!isset($_POST['common_customer_store_qrcode']))
|
|
{
|
|
$_POST['common_customer_store_qrcode'] = '';
|
|
}
|
|
|
|
// 保存
|
|
return ConfigService::ConfigSave($_POST);
|
|
}
|
|
}
|
|
?>
|