mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-05 05:19:21 +08:00
85 lines
2.5 KiB
PHP
85 lines
2.5 KiB
PHP
<?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\plugins\touristbuy;
|
|
|
|
use think\Controller;
|
|
use app\service\PluginsService;
|
|
|
|
/**
|
|
* 游客购买 - 管理
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 0.0.1
|
|
* @datetime 2016-12-01T21:51:08+0800
|
|
*/
|
|
class Admin extends Controller
|
|
{
|
|
/**
|
|
* 首页
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 1.0.0
|
|
* @datetime 2019-02-07T08:21:54+0800
|
|
* @param [array] $params [输入参数]
|
|
*/
|
|
public function index($params = [])
|
|
{
|
|
$ret = PluginsService::PluginsData('touristbuy');
|
|
if($ret['code'] == 0)
|
|
{
|
|
$this->assign('data', $ret['data']);
|
|
return $this->fetch('../../../plugins/view/touristbuy/admin/index');
|
|
} else {
|
|
return $ret['msg'];
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 编辑页面
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 1.0.0
|
|
* @datetime 2019-02-07T08:21:54+0800
|
|
* @param [array] $params [输入参数]
|
|
*/
|
|
public function saveinfo($params = [])
|
|
{
|
|
$ret = PluginsService::PluginsData('touristbuy');
|
|
if($ret['code'] == 0)
|
|
{
|
|
// 是否
|
|
$is_whether_list = [
|
|
0 => array('id' => 0, 'name' => '否', 'checked' => true),
|
|
1 => array('id' => 1, 'name' => '是'),
|
|
];
|
|
|
|
$this->assign('is_whether_list', $is_whether_list);
|
|
$this->assign('data', $ret['data']);
|
|
return $this->fetch('../../../plugins/view/touristbuy/admin/saveinfo');
|
|
} else {
|
|
return $ret['msg'];
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 数据保存
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 1.0.0
|
|
* @datetime 2019-02-07T08:21:54+0800
|
|
* @param [array] $params [输入参数]
|
|
*/
|
|
public function save($params = [])
|
|
{
|
|
return PluginsService::PluginsDataSave(['plugins'=>'touristbuy', 'data'=>$params]);
|
|
}
|
|
}
|
|
?>
|