mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-07-04 04:53:00 +08:00
优化 安装包生成
This commit is contained in:
55
Application/Api/Controller/IndexController.class.php
Executable file
55
Application/Api/Controller/IndexController.class.php
Executable file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace Api\Controller;
|
||||
|
||||
use Service\GoodsService;
|
||||
|
||||
/**
|
||||
* 首页
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class IndexController extends CommonController
|
||||
{
|
||||
/**
|
||||
* [_initialize 前置操作-继承公共前置方法]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-03T12:39:08+0800
|
||||
*/
|
||||
public function _initialize()
|
||||
{
|
||||
// 调用父类前置方法
|
||||
parent::_initialize();
|
||||
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->ajaxReturn(L('common_unauthorized_access'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* [Index 首页入口]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2018-05-25T11:03:59+0800
|
||||
*/
|
||||
public function Index()
|
||||
{
|
||||
$result = [
|
||||
'data_list' => GoodsService::HomeFloorList(),
|
||||
'common_shop_notice' => MyC('common_shop_notice', null, true),
|
||||
'common_app_is_enable_search' => (int) MyC('common_app_is_enable_search', 1),
|
||||
'common_app_is_enable_answer' => (int) MyC('common_app_is_enable_answer', 1),
|
||||
];
|
||||
|
||||
// 返回数据
|
||||
$this->ajaxReturn(L('common_operation_success'), 0, $result);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user