提交 43f5e154 编写于 作者: D Devil

底层框架升级到tp6

上级 9df90138

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -2,7 +2,7 @@
.DS_Store
.ide
*.log
*.lock
.env
.tea
.idea
.htaccess
......
MIT License
Copyright (c) 2020 ShopXO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2020 ShopXO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
......@@ -13,7 +13,7 @@
namespace think;
// 加载基础文件
require __DIR__ . '/thinkphp/base.php';
require __DIR__ . '/vendor/autoload.php';
// 根目录入口
define('IS_ROOT_ACCESS', true);
......@@ -21,6 +21,9 @@ define('IS_ROOT_ACCESS', true);
// 引入公共入口文件
require __DIR__.'/public/core.php';
// 执行应用并响应
Container::get('app')->bind('admin')->run()->send();
// 执行HTTP应用并响应
$http = (new App())->http;
$response = $http->name('admin')->run();
$response->send();
$http->end($response);
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
// [ API入口文件 ]
define('IS_ROOT_ACCESS', true);
// 引入公共入口文件
require './public/api.php';
?>
\ No newline at end of file
event.php
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
declare (strict_types = 1);
namespace app;
use think\Service;
/**
* 应用服务类
*/
class AppService extends Service
{
public function register()
{
// 服务注册
}
public function boot()
{
// 服务启动
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
declare (strict_types = 1);
namespace app;
use think\App;
use think\exception\ValidateException;
use think\Validate;
/**
* 控制器基础类
*/
abstract class BaseController
{
/**
* Request实例
* @var \think\Request
*/
protected $request;
/**
* 应用实例
* @var \think\App
*/
protected $app;
/**
* 是否批量验证
* @var bool
*/
protected $batchValidate = false;
/**
* 控制器中间件
* @var array
*/
protected $middleware = [];
/**
* 构造方法
* @access public
* @param App $app 应用对象
*/
public function __construct(App $app)
{
$this->app = $app;
$this->request = $this->app->request;
// 控制器初始化
$this->initialize();
}
// 初始化
protected function initialize()
{}
/**
* 验证数据
* @access protected
* @param array $data 数据
* @param string|array $validate 验证器名或者验证规则数组
* @param array $message 提示信息
* @param bool $batch 是否批量验证
* @return array|string|true
* @throws ValidateException
*/
protected function validate(array $data, $validate, array $message = [], bool $batch = false)
{
if (is_array($validate)) {
$v = new Validate();
$v->rule($validate);
} else {
if (strpos($validate, '.')) {
// 支持场景
[$validate, $scene] = explode('.', $validate);
}
$class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate);
$v = new $class();
if (!empty($scene)) {
$v->scene($scene);
}
}
$v->message($message);
// 是否批量验证
if ($batch || $this->batchValidate) {
$v->batch(true);
}
return $v->failException(true)->check($data);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\exception\Handle;
use think\exception\HttpException;
use think\exception\HttpResponseException;
use think\exception\ValidateException;
use think\Response;
use Throwable;
/**
* 应用异常处理类
*/
class ExceptionHandle extends Handle
{
/**
* 不需要记录信息(日志)的异常类列表
* @var array
*/
protected $ignoreReport = [
HttpException::class,
HttpResponseException::class,
ModelNotFoundException::class,
DataNotFoundException::class,
ValidateException::class,
];
/**
* 记录异常信息(包括日志或者其它方式记录)
*
* @access public
* @param Throwable $exception
* @return void
*/
public function report(Throwable $exception): void
{
// 使用内置的方式记录异常日志
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @access public
* @param \think\Request $request
* @param Throwable $e
* @return Response
*/
public function render($request, Throwable $e): Response
{
// 添加自定义异常处理机制
if(IS_AJAX)
{
// 参数验证错误
if($e instanceof ValidateException)
{
$msg = $e->getError();
$code = -422;
}
// 请求异常
if($e instanceof HttpException && request()->isAjax())
{
$msg = $e->getMessage();
$code = $e->getStatusCode();
}
if(!isset($code))
{
$code = -500;
}
if(empty($msg))
{
if(method_exists($e, 'getMessage'))
{
$msg = $e->getMessage();
} else {
$msg = '服务器错误';
}
}
exit(json_encode(DataReturn($msg, $code)));
}
// 其他错误交给系统处理
return parent::render($request, $e);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app;
// 应用请求对象类
class Request extends \think\Request
{
}
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// | 模板设置
// +----------------------------------------------------------------------
return [
// 模板引擎类型使用Think
'type' => 'Think',
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
'auto_rule' => 1,
// 模板目录名
'view_dir_name' => 'view'.DS.'default',
// 模板后缀
'view_suffix' => 'html',
// 模板文件名分隔符
'view_depr' => DIRECTORY_SEPARATOR,
// 模板引擎普通标签开始标记
'tpl_begin' => '{{',
// 模板引擎普通标签结束标记
'tpl_end' => '}}',
// 标签库标签开始标记
'taglib_begin' => '{{',
// 标签库标签结束标记
'taglib_end' => '}}',
];
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\AdminService;
use app\service\SystemBaseService;
/**
* 管理员
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Admin extends Common
{
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function __construct()
{
// 调用父类前置方法
parent::__construct();
}
/**
* 管理员列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function Index()
{
// 登录校验
$this->IsLogin();
// 权限校验
$this->IsPower();
// 总数
$total = AdminService::AdminTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/admin/index'),
];
$page = new \base\Page($page_params);
// 获取数据列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
];
$ret = AdminService::AdminList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = AdminService::AdminList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* 管理员添加/编辑页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function SaveInfo()
{
// 登录校验
$this->IsLogin();
// 参数
$params = $this->data_request;
// 不是操作自己的情况下
if(!isset($params['id']) || $params['id'] != $this->admin['id'])
{
// 权限校验
$this->IsPower();
}
// 管理员编辑
$data = [];
if(!empty($params['id']))
{
$data_params = [
'where' => ['id'=>$params['id']],
'm' => 0,
'n' => 1,
];
$ret = AdminService::AdminList($data_params);
if(empty($ret['data'][0]))
{
return $this->error('管理员信息不存在', MyUrl('admin/index/index'));
}
$data = $ret['data'][0];
}
// 角色
$role_params = [
'where' => ['is_enable'=>1],
'field' => 'id,name',
];
$role = AdminService::RoleList($role_params);
MyViewAssign('role_list', $role['data']);
MyViewAssign('id', isset($params['id']) ? $params['id'] : 0);
MyViewAssign('common_gender_list', lang('common_gender_list'));
MyViewAssign('common_admin_status_list', lang('common_admin_status_list'));
// 管理员编辑页面钩子
$hook_name = 'plugins_view_admin_admin_save';
MyViewAssign($hook_name.'_data', MyEventTrigger($hook_name,
[
'hook_name' => $hook_name,
'is_backend' => true,
'admin_id' => isset($params['id']) ? $params['id'] : 0,
'data' => &$data,
'params' => &$params,
]));
// 数据
unset($params['id']);
MyViewAssign('data', $data);
MyViewAssign('params', $params);
return MyView();
}
/**
* 管理员添加/编辑
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function Save()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 登录校验
$this->IsLogin();
// 参数
$params = $this->data_post;
// 不是操作自己的情况下
if(!isset($params['id']) || $params['id'] != $this->admin['id'])
{
// 权限校验
$this->IsPower();
}
// 开始操作
$params['admin'] = $this->admin;
return AdminService::AdminSave($params);
}
/**
* 管理员删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function Delete()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 登录校验
$this->IsLogin();
// 权限校验
$this->IsPower();
// 开始操作
$params = $this->data_post;
$params['admin'] = $this->admin;
return AdminService::AdminDelete($params);
}
/**
* 登录页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function LoginInfo()
{
// 是否已登录
if(AdminService::LoginInfo() !== null)
{
return MyRedirect(MyUrl('admin/index/index'));
}
// 登录方式
MyViewAssign('admin_login_type', MyC('admin_login_type', [], true));
// 背景图片
$host = SystemBaseService::AttachmentHost();
$bg_images_list = [
$host.'/static/admin/default/images/login/1.jpg',
$host.'/static/admin/default/images/login/2.jpg',
$host.'/static/admin/default/images/login/3.jpg',
$host.'/static/admin/default/images/login/4.jpg',
$host.'/static/admin/default/images/login/5.jpg',
$host.'/static/admin/default/images/login/6.jpg',
$host.'/static/admin/default/images/login/7.jpg',
$host.'/static/admin/default/images/login/8.jpg',
$host.'/static/admin/default/images/login/9.jpg',
$host.'/static/admin/default/images/login/10.jpg',
$host.'/static/admin/default/images/login/11.jpg',
$host.'/static/admin/default/images/login/12.jpg',
$host.'/static/admin/default/images/login/13.jpg',
$host.'/static/admin/default/images/login/14.jpg',
$host.'/static/admin/default/images/login/15.jpg',
];
MyViewAssign('bg_images_list', $bg_images_list);
// 管理员登录页面钩子
$hook_name = 'plugins_view_admin_login_info';
MyViewAssign($hook_name.'_data', MyEventTrigger($hook_name,
[
'hook_name' => $hook_name,
'is_backend' => true,
]));
return MyView();
}
/**
* 管理员登录
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function Login()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
$params = $this->data_post;
return AdminService::Login($params);
}
/**
* 验证码显示
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function AdminVerifyEntry()
{
$params = [
'width' => 100,
'height' => 28,
'key_prefix' => 'admin_login',
];
$verify = new \base\Verify($params);
$verify->Entry();
}
/**
* 登录验证码发送
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function LoginVerifySend()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 调用服务层
return AdminService::LoginVerifySend($this->data_post);
}
/**
* 退出
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-03
* @desc description
*/
public function Logout()
{
AdminService::LoginLogout();
return MyRedirect(MyUrl('admin/admin/logininfo'));
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\ConfigService;
use app\service\ResourcesService;
/**
* 协议管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Agreement 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 1.0.0
* @date 2019-05-16
* @desc description
*/
public function Index()
{
// 配置信息
MyViewAssign('data', ConfigService::ConfigList());
// 编辑器文件存放地址
MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('agreement'));
// 导航数据
$nav_data = [
[
'name' => '用户注册协议',
'type' => 'register',
],
[
'name' => '用户隐私政策',
'type' => 'privacy',
]
];
MyViewAssign('nav_data', $nav_data);
// 导航/视图
$nav_type = input('nav_type', 'register');
MyViewAssign('nav_type', $nav_type);
return MyView($nav_type);
}
/**
* 配置数据保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-05-16
* @desc description
*/
public function Save()
{
return ConfigService::ConfigSave($_POST);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\AnswerService;
/**
* 问答管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Answer 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()
{
// 总数
$total = AnswerService::AnswerTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/answer/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
'is_public' => 0,
];
$ret = AnswerService::AnswerList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
'is_public' => 0,
];
$ret = AnswerService::AnswerList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 参数
$params = $this->data_request;
// 数据
$data = [];
if(!empty($params['id']))
{
// 获取列表
$data_params = array(
'm' => 0,
'n' => 1,
'where' => ['id'=>intval($params['id'])],
'field' => '*',
'is_public' => 0,
);
$ret = AnswerService::AnswerList($data_params);
// 内容
if(!empty($ret['data'][0]['content']))
{
$ret['data'][0]['content'] = str_replace('<br />', "\n", $ret['data'][0]['content']);
}
// 回复内容
if(!empty($ret['data'][0]['reply']))
{
$ret['data'][0]['reply'] = str_replace('<br />', "\n", $ret['data'][0]['reply']);
}
$data = empty($ret['data'][0]) ? [] : $ret['data'][0];
}
MyViewAssign('data', $data);
// 静态数据
MyViewAssign('common_is_show_list', lang('common_is_show_list'));
MyViewAssign('common_is_text_list', lang('common_is_text_list'));
// 参数
unset($params['id']);
MyViewAssign('params', $params);
return MyView();
}
/**
* [Save 保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return AnswerService::AnswerSave($params);
}
/**
* 问答删除
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return AnswerService::AnswerDelete($params);
}
/**
* 问答回复处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-03-28T15:07:17+0800
*/
public function Reply()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return AnswerService::AnswerReply($params);
}
/**
* 状态更新
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return AnswerService::AnswerStatusUpdate($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\AppCenterNavService;
use app\service\ResourcesService;
/**
* 手机管理-用户中心导航管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class AppCenterNav 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();
}
/**
* [Index 手机管理-首页导航列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 总数
$total = AppCenterNavService::AppCenterNavTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/appcenternav/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
];
$ret = AppCenterNavService::AppCenterNavList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-08-05T08:21:54+0800
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = AppCenterNavService::AppCenterNavList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 参数
$params = $this->data_request;
// 数据
$data = [];
if(!empty($params['id']))
{
// 获取列表
$data_params = array(
'm' => 0,
'n' => 1,
'where' => ['id'=>intval($params['id'])],
'field' => '*',
);
$ret = AppCenterNavService::AppCenterNavList($data_params);
$data = empty($ret['data'][0]) ? [] : $ret['data'][0];
}
// 静态数据
MyViewAssign('common_platform_type', lang('common_platform_type'));
MyViewAssign('common_app_event_type', lang('common_app_event_type'));
// 编辑器文件存放地址
MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('app_center_nav'));
// 数据
unset($params['id']);
MyViewAssign('params', $params);
MyViewAssign('data', $data);
return MyView();
}
/**
* [Save 手机管理-首页导航添加/编辑]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return AppCenterNavService::AppCenterNavSave($params);
}
/**
* [Delete 手机管理-首页导航删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return AppCenterNavService::AppCenterNavDelete($params);
}
/**
* [StatusUpdate 状态更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return AppCenterNavService::AppCenterNavStatusUpdate($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | 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 AppConfig 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();
}
/**
* [Index 配置列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 配置信息
MyViewAssign('data', ConfigService::ConfigList());
// 是否
MyViewAssign('common_is_text_list', lang('common_is_text_list'));
// 导航/视图
$nav_type = input('nav_type', 'base');
MyViewAssign('nav_type', $nav_type);
return MyView($nav_type);
}
/**
* [Save 配置数据保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-02T23:08:19+0800
*/
public function Save()
{
return ConfigService::ConfigSave($_POST);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\AppHomeNavService;
use app\service\ResourcesService;
/**
* 手机管理-首页导航管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class AppHomeNav 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();
}
/**
* [Index 手机管理-首页导航列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 总数
$total = AppHomeNavService::AppHomeNavTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/apphomenav/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
];
$ret = AppHomeNavService::AppHomeNavList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-08-05T08:21:54+0800
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = AppHomeNavService::AppHomeNavList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 参数
$params = $this->data_request;
// 数据
$data = [];
if(!empty($params['id']))
{
// 获取列表
$data_params = array(
'm' => 0,
'n' => 1,
'where' => ['id'=>intval($params['id'])],
'field' => '*',
);
$ret = AppHomeNavService::AppHomeNavList($data_params);
$data = empty($ret['data'][0]) ? [] : $ret['data'][0];
}
// 静态数据
MyViewAssign('common_platform_type', lang('common_platform_type'));
MyViewAssign('common_app_event_type', lang('common_app_event_type'));
// 编辑器文件存放地址
MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('app_nav'));
// 数据
unset($params['id']);
MyViewAssign('params', $params);
MyViewAssign('data', $data);
return MyView();
}
/**
* [Save 手机管理-首页导航添加/编辑]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return AppHomeNavService::AppHomeNavSave($params);
}
/**
* [Delete 手机管理-首页导航删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return AppHomeNavService::AppHomeNavDelete($params);
}
/**
* [StatusUpdate 状态更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return AppHomeNavService::AppHomeNavStatusUpdate($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\AppMiniService;
use app\service\ConfigService;
use app\service\StoreService;
/**
* 小程序管理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-13
* @desc description
*/
class Appmini extends Common
{
private $params;
private $application_name;
private $old_path;
private $new_path;
private $view_type;
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-13
* @desc description
*/
public function __construct()
{
// 调用父类前置方法
parent::__construct();
// 登录校验
$this->IsLogin();
// 权限校验
$this->IsPower();
// 参数
$this->params = $this->data_request;
$this->params['application_name'] = empty($this->data_request['nav_type']) ? 'weixin' : trim($this->data_request['nav_type']);
// 小导航
$this->view_type = input('view_type', 'index');
}
/**
* 列表
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-13
* @desc description
*/
public function Index()
{
// 公共视图
$this->CurrentViewInit();
switch($this->view_type)
{
// 首页
case 'index' :
// 默认主题
MyViewAssign('theme', AppMiniService::DefaultTheme());
// 获取主题列表
$data = AppMiniService::ThemeList($this->params);
MyViewAssign('data_list', $data);
// 插件更新信息
$upgrade = AppMiniService::AppMiniUpgradeInfo(['terminal'=>$this->params['application_name'], 'data'=>$data]);
MyViewAssign('upgrade_info', $upgrade['data']);
break;
// 源码包列表
case 'package' :
$this->Package();
break;
}
return MyView($this->view_type);
}
/**
* 小程序包列表页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-13
* @desc description
*/
public function Package()
{
$host = MyConfig('shopxo.website_url');
$nav_dev_tips = [
// 微信
'weixin' => [
'msg' => '右上角 -> 详情 -> 不校验合法域名、web-view(业务域名)、TLS 版本以及 HTTPS 证书(勾选改选项即可进行小程序开发调试)。',
'url' => $host.'weixin.html',
],
// 支付宝
'alipay' => [
'msg' => '右上角 -> 详情 -> 域名信息下 -> 忽略 httpRequest 域名合法性检查(仅限调试时,且支付宝 10.1.35 版本以上)(勾选改选项即可进行小程序开发调试)。',
'url' => $host.'alipay.html',
],
// 百度
'baidu' => [
'msg' => '顶部导航 -> 校验域名(关闭即可)。',
'url' => $host.'baidu.html',
],
// 头条
'toutiao' => [
'msg' => '顶部导航 -> 详情 -> 不校验合法域名、web-view(业务域名)TLS版本以及HTTPS证书(勾选改选项即可进行小程序开发调试)。',
'url' => $host.'zijietiaodong.html',
],
// QQ
'qq' => [
'msg' => '顶部导航 -> 详情 -> 不校验合法域名、web-view(业务域名)TLS版本以及HTTPS证书(勾选改选项即可进行小程序开发调试)。',
'url' => $host.'qq.html',
],
];
MyViewAssign('nav_dev_tips', $nav_dev_tips);
// 源码包列表
$ret = AppMiniService::DownloadDataList($this->params);
MyViewAssign('data_list', $ret['data']);
}
/**
* 公共视图
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-11-21
* @desc description
*/
public function CurrentViewInit()
{
// 操作导航类型
MyViewAssign('nav_type', $this->params['application_name']);
// 操作页面类型
MyViewAssign('view_type', $this->view_type);
// 应用商店
MyViewAssign('store_theme_url', StoreService::StoreThemeUrl());
// 小程序平台
MyViewAssign('common_appmini_type', lang('common_appmini_type'));
// 是否
MyViewAssign('common_is_text_list', lang('common_is_text_list'));
// 基础导航
$base_nav = [
[
'view_type' => 'index',
'name' => '当前主题',
],
[
'view_type' => 'upload',
'name' => '主题安装',
],
[
'view_type' => 'package',
'name' => '源码包下载',
],
];
MyViewAssign('base_nav', $base_nav);
}
/**
* 主题上传安装
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-11-21
* @desc description
*/
public function ThemeUpload()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
return AppMiniService::ThemeUpload($this->params);
}
/**
* 主题切换保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-12-19T00:58:47+0800
*/
public function ThemeSave()
{
$key = AppMiniService::DefaultThemeKey($this->params);
$params[$key] = empty($this->data_request['theme']) ? 'default' : $this->data_request['theme'];
$ret = ConfigService::ConfigSave($params);
if($ret['code'] == 0)
{
$ret['msg'] = '切换成功';
}
return $ret;
}
/**
* 主题打包下载
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-12-19T00:58:47+0800
*/
public function ThemeDownload()
{
$params = array_merge($this->params, $this->data_request);
$ret = AppMiniService::ThemeDownload($params);
if(isset($ret['code']) && $ret['code'] != 0)
{
MyViewAssign('msg', $ret['msg']);
return MyView('public/tips_error');
} else {
return $ret;
}
}
/**
* 主题删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-11-21
* @desc description
*/
public function ThemeDelete()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = array_merge($this->params, $this->data_request);
return AppMiniService::ThemeDelete($params);
}
/**
* 配置
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-13
* @desc description
*/
public function Config()
{
// 公共视图
$this->CurrentViewInit();
// 配置信息
MyViewAssign('data', ConfigService::ConfigList());
return MyView();
}
/**
* 生成
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-13
* @desc description
*/
public function Created()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return AppMiniService::Created($this->params);
}
/**
* 配置保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-13
* @desc description
*/
public function Save()
{
return ConfigService::ConfigSave($_POST);
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-07-13
* @desc description
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return AppMiniService::Delete($this->params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\ArticleService;
use app\service\ResourcesService;
/**
* 文章管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Article 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();
}
/**
* [Index 文章列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 总数
$total = ArticleService::ArticleTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/article/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
];
$ret = ArticleService::ArticleList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-08-05T08:21:54+0800
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = ArticleService::ArticleList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* [SaveInfo 文章添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 参数
$params = $this->data_request;
// 数据
$data = [];
if(!empty($params['id']))
{
// 获取列表
$data_params = array(
'm' => 0,
'n' => 1,
'where' => ['id'=>intval($params['id'])],
);
$ret = ArticleService::ArticleList($data_params);
$data = empty($ret['data'][0]) ? [] : $ret['data'][0];
}
// 文章分类
$article_category = ArticleService::ArticleCategoryList(['field'=>'id,name']);
MyViewAssign('article_category_list', $article_category['data']);
// 文章编辑页面钩子
$hook_name = 'plugins_view_admin_article_save';
MyViewAssign($hook_name.'_data', MyEventTrigger($hook_name,
[
'hook_name' => $hook_name,
'is_backend' => true,
'article_id' => isset($params['id']) ? $params['id'] : 0,
'data' => &$data,
'params' => &$params,
]));
// 编辑器文件存放地址
MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('article'));
// 数据
unset($params['id']);
MyViewAssign('data', $data);
MyViewAssign('params', $params);
return MyView();
}
/**
* [Save 文章添加/编辑]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return ArticleService::ArticleSave($params);
}
/**
* [Delete 文章删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['admin'] = $this->admin;
return ArticleService::ArticleDelete($params);
}
/**
* [StatusUpdate 状态更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['admin'] = $this->admin;
return ArticleService::ArticleStatusUpdate($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\ArticleService;
/**
* 文章分类管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class ArticleCategory 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();
}
/**
* [Index 文章分类列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 是否启用
MyViewAssign('common_is_enable_list', lang('common_is_enable_list'));
return MyView();
}
/**
* [GetNodeSon 获取节点子列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T15:19:45+0800
*/
public function GetNodeSon()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return ArticleService::ArticleCategoryNodeSon($this->data_request);
}
/**
* [Save 文章分类保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return ArticleService::ArticleCategorySave($this->data_request);
}
/**
* [Delete 文章分类删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Delete()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
$params = $this->data_post;
$params['admin'] = $this->admin;
return ArticleService::ArticleCategoryDelete($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\BrandService;
use app\service\BrandCategoryService;
use app\service\ResourcesService;
/**
* 品牌管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Brand 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();
}
/**
* [Index 品牌列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 总数
$total = BrandService::BrandTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/brand/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
];
$ret = BrandService::BrandList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-08-05T08:21:54+0800
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = BrandService::BrandList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 参数
$params = $this->data_request;
// 数据
$data = [];
if(!empty($params['id']))
{
// 获取列表
$data_params = array(
'm' => 0,
'n' => 1,
'where' => ['id'=>intval($params['id'])],
'field' => '*',
);
$ret = BrandService::BrandList($data_params);
$data = empty($ret['data'][0]) ? [] : $ret['data'][0];
}
// 是否启用
MyViewAssign('common_is_enable_list', lang('common_is_enable_list'));
// 品牌分类
$brand_category = BrandCategoryService::BrandCategoryList(['field'=>'id,name']);
MyViewAssign('brand_category', $brand_category['data']);
// 编辑页面钩子
$hook_name = 'plugins_view_admin_brand_save';
MyViewAssign($hook_name.'_data', MyEventTrigger($hook_name,
[
'hook_name' => $hook_name,
'is_backend' => true,
'data_id' => isset($params['id']) ? $params['id'] : 0,
'data' => &$data,
'params' => &$params,
]));
// 编辑器文件存放地址
MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('brand'));
// 数据
unset($params['id']);
MyViewAssign('data', $data);
MyViewAssign('params', $params);
return MyView();
}
/**
* [Save 品牌保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return BrandService::BrandSave($params);
}
/**
* [Delete 品牌删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return BrandService::BrandDelete($params);
}
/**
* [StatusUpdate 状态更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return BrandService::BrandStatusUpdate($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\BrandCategoryService;
/**
* 品牌分类管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class BrandCategory 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();
}
/**
* [Index 品牌分类列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 是否启用
MyViewAssign('common_is_enable_list', lang('common_is_enable_list'));
return MyView();
}
/**
* [GetNodeSon 获取节点子列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T15:19:45+0800
*/
public function GetNodeSon()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return BrandCategoryService::BrandCategoryNodeSon($this->data_request);
}
/**
* [Save 品牌分类保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return BrandCategoryService::BrandCategorySave($this->data_request);
}
/**
* [Delete 品牌分类删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Delete()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
$params = $this->data_post;
$params['admin'] = $this->admin;
return BrandCategoryService::BrandCategoryDelete($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\CacheService;
/**
* 缓存管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Cache 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();
}
/**
* [Index 首页]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-02-26T19:13:29+0800
*/
public function Index()
{
// 缓存类型
MyViewAssign('cache_type_list', CacheService::AdminCacheTypeList());
return MyView();
}
/**
* [StatusUpdate 站点缓存更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-02-26T19:53:14+0800
*/
public function StatusUpdate()
{
// 模板 cache
// 系统配置缓存 data
// 模板数据 temp
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'cache');
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'data');
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'admin'.DS.'temp');
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'index'.DS.'temp');
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'api'.DS.'temp');
// 缓存操作清除
\think\facade\Cache::clear();
return $this->success('更新成功');
}
/**
* [TemplateUpdate 模板缓存更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-02-26T19:53:14+0800
*/
public function TemplateUpdate()
{
// 模板 cache
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'admin'.DS.'temp');
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'index'.DS.'temp');
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'api'.DS.'temp');
return $this->success('更新成功');
}
/**
* [ModuleUpdate 模块缓存更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-02-26T19:53:14+0800
*/
public function ModuleUpdate()
{
return $this->success('更新成功');
}
/**
* [LogDelete 日志删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-02-26T19:53:14+0800
*/
public function LogDelete()
{
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'admin'.DS.'log');
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'index'.DS.'log');
\base\FileUtil::UnlinkDir(ROOT.'runtime'.DS.'api'.DS.'log');
return $this->success('更新成功');
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\BaseController;
use app\module\FormHandleModule;
use app\service\SystemService;
use app\service\SystemBaseService;
use app\service\AdminService;
use app\service\AdminPowerService;
use app\service\ConfigService;
use app\service\ResourcesService;
use app\service\StoreService;
/**
* 管理员公共控制器
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Common extends BaseController
{
// 管理员
protected $admin;
// 左边权限菜单
protected $left_menu;
// 当前操作名称
protected $module_name;
protected $controller_name;
protected $action_name;
// 输入参数 post|get|request
protected $data_post;
protected $data_get;
protected $data_request;
// 分页信息
protected $page;
protected $page_size;
// 动态表格
protected $form_table;
protected $form_where;
protected $form_params;
protected $form_md5_key;
protected $form_user_fields;
protected $form_order_by;
protected $form_error;
/**
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
public function __construct()
{
// 检测是否是新安装
SystemService::SystemInstallCheck();
// 输入参数
$this->data_post = input('post.');
$this->data_get = input('get.');
$this->data_request = input();
// 系统初始化
$this->SystemInit();
// 管理员信息
$this->admin = AdminService::LoginInfo();
// 权限菜单
AdminPowerService::PowerMenuInit();
$this->left_menu = AdminPowerService::MenuData();
// 视图初始化
$this->ViewInit();
// 动态表格初始化
$this->FormTableInit();
// 公共钩子初始化
$this->CommonPluginsInit();
}
/**
* 系统初始化
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-12-07
* @desc description
*/
private function SystemInit()
{
// 配置信息初始化
ConfigService::ConfigInit();
}
/**
* [IsLogin 登录校验]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:42:35+0800
*/
protected function IsLogin()
{
if($this->admin === null)
{
if(IS_AJAX)
{
exit(json_encode(DataReturn('登录失效,请重新登录', -400)));
} else {
die('<script type="text/javascript">if(self.frameElement && self.frameElement.tagName == "IFRAME"){parent.location.reload();}else{window.location.href="'.MyUrl('admin/admin/logininfo').'";}</script>');
}
}
}
/**
* [ViewInit 视图初始化]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:30:06+0800
*/
public function ViewInit()
{
// 主题
$default_theme = 'default';
MyViewAssign('default_theme', $default_theme);
// 当前操作名称
$this->module_name = RequestModule();
$this->controller_name = RequestController();
$this->action_name = RequestAction();
// 当前操作名称
MyViewAssign('module_name', $this->module_name);
MyViewAssign('controller_name', $this->controller_name);
MyViewAssign('action_name', $this->action_name);
// 管理员
MyViewAssign('admin', $this->admin);
// 权限菜单
MyViewAssign('left_menu', $this->left_menu);
// 分页信息
$this->page = max(1, isset($this->data_request['page']) ? intval($this->data_request['page']) : 1);
$this->page_size = MyC('common_page_size', 10, true);
MyViewAssign('page', $this->page);
MyViewAssign('page_size', $this->page_size);
// 货币符号
MyViewAssign('currency_symbol', ResourcesService::CurrencyDataSymbol());
// 控制器静态文件状态css,js
$module_css = $this->module_name.DS.$default_theme.DS.'css'.DS.$this->controller_name;
$module_css .= file_exists(ROOT_PATH.'static'.DS.$module_css.'.'.$this->action_name.'.css') ? '.'.$this->action_name.'.css' : '.css';
MyViewAssign('module_css', file_exists(ROOT_PATH.'static'.DS.$module_css) ? $module_css : '');
$module_js = $this->module_name.DS.$default_theme.DS.'js'.DS.$this->controller_name;
$module_js .= file_exists(ROOT_PATH.'static'.DS.$module_js.'.'.$this->action_name.'.js') ? '.'.$this->action_name.'.js' : '.js';
MyViewAssign('module_js', file_exists(ROOT_PATH.'static'.DS.$module_js) ? $module_js : '');
// 价格正则
MyViewAssign('default_price_regex', lang('common_regex_price'));
// 附件host地址
MyViewAssign('attachment_host', SystemBaseService::AttachmentHost());
// css/js引入host地址
MyViewAssign('public_host', MyConfig('shopxo.public_host'));
// 当前url地址
MyViewAssign('my_url', __MY_URL__);
// 项目public目录URL地址
MyViewAssign('my_public_url', __MY_PUBLIC_URL__);
// 当前http类型
MyViewAssign('my_http', __MY_HTTP__);
// 开发模式
MyViewAssign('shopxo_is_develop', MyConfig('shopxo.is_develop'));
// 默认不加载百度地图api
MyViewAssign('is_load_baidu_map_api', 0);
// 布局样式+管理
MyViewAssign('is_load_layout', 0);
MyViewAssign('is_load_layout_admin', 0);
// 是否加载附件组件
MyViewAssign('is_load_upload_editor', !empty($this->admin) ? 1 : 0);
// 站点名称
MyViewAssign('admin_theme_site_name', MyC('admin_theme_site_name', 'ShopXO', true));
// 站点商店信息
$site_store_info = StoreService::SiteStoreInfo();
if(empty($site_store_info))
{
$res = StoreService::SiteStoreAccountsBindHandle();
if(!empty($res) && isset($res['code']) && $res['code'] == 0)
{
$site_store_info = StoreService::SiteStoreInfo();
}
}
MyViewAssign('site_store_info', $site_store_info);
// 系统基础信息
$is_system_show_base = (empty($site_store_info) || empty($site_store_info['vip']) || !isset($site_store_info['vip']['status']) || $site_store_info['vip']['status'] == 0 || ($site_store_info['vip']['status'] == 1 && (AdminIsPower('index', 'storeaccountsbind') || AdminIsPower('index', 'inspectupgrade')))) ? 1 : 0;
MyViewAssign('is_system_show_base', $is_system_show_base);
}
/**
* 动态表格初始化
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-02
* @desc description
*/
public function FormTableInit()
{
// 获取表格模型
$module = FormModulePath($this->data_request);
if(!empty($module))
{
// 调用表格处理
$params = $this->data_request;
$params['system_admin'] = $this->admin;
$ret = (new FormHandleModule())->Run($module['module'], $module['action'], $params);
if($ret['code'] == 0)
{
$this->form_table = $ret['data']['table'];
$this->form_where = $ret['data']['where'];
$this->form_params = $ret['data']['params'];
$this->form_md5_key = $ret['data']['md5_key'];
$this->form_user_fields = $ret['data']['user_fields'];
$this->form_order_by = $ret['data']['order_by'];
MyViewAssign('form_table', $this->form_table);
MyViewAssign('form_params', $this->form_params);
MyViewAssign('form_md5_key', $this->form_md5_key);
MyViewAssign('form_user_fields', $this->form_user_fields);
MyViewAssign('form_order_by', $this->form_order_by);
} else {
$this->form_error = $ret['msg'];
MyViewAssign('form_error', $this->form_error);
}
}
}
/**
* [IsPower 是否有权限]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-20T19:18:29+0800
*/
protected function IsPower()
{
// 不需要校验权限的方法
$unwanted_power = ['getnodeson'];
if(!AdminIsPower(null, null, $unwanted_power))
{
if(IS_AJAX)
{
exit(json_encode(DataReturn('无权限', -1000)));
} else {
return $this->error('无权限');
}
}
}
/**
* 成功提示
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-07-15
* @desc description
* @param [string] $msg [提示信息、默认(操作成功)]
*/
public function success($msg)
{
if(IS_AJAX)
{
return DataReturn($msg, 0);
} else {
MyViewAssign('msg', $msg);
return MyView('public/jump_success');
}
}
/**
* 错误提示
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-07-15
* @desc description
* @param [string] $msg [提示信息、默认(操作失败)]
*/
public function error($msg)
{
if(IS_AJAX)
{
return DataReturn($msg, -1);
} else {
MyViewAssign('msg', $msg);
return MyView('public/jump_error');
}
}
/**
* 空方法响应
* @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/tips_error');
}
}
/**
* 公共钩子初始化
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-12-07
* @desc description
*/
private function CommonPluginsInit()
{
// css钩子
MyViewAssign('plugins_admin_css_data', MyEventTrigger('plugins_admin_css', ['hook_name'=>'plugins_admin_css', 'is_backend'=>true]));
// js钩子
MyViewAssign('plugins_admin_js_data', MyEventTrigger('plugins_admin_js', ['hook_name'=>'plugins_admin_js', 'is_backend'=>true]));
// 公共header内钩子
MyViewAssign('plugins_admin_common_header_data', MyEventTrigger('plugins_admin_common_header', ['hook_name'=>'plugins_admin_common_header', 'is_backend'=>true, 'admin'=>$this->admin]));
// 公共页面底部钩子
MyViewAssign('plugins_admin_common_page_bottom_data', MyEventTrigger('plugins_admin_common_page_bottom', ['hook_name'=>'plugins_admin_common_page_bottom', 'is_backend'=>true, 'admin'=>$this->admin]));
// 公共顶部钩子
MyViewAssign('plugins_admin_view_common_top_data', MyEventTrigger('plugins_admin_view_common_top', ['hook_name'=>'plugins_admin_view_common_top', 'is_backend'=>true, 'admin'=>$this->admin]));
// 公共底部钩子
MyViewAssign('plugins_admin_view_common_bottom_data', MyEventTrigger('plugins_admin_view_common_bottom', ['hook_name'=>'plugins_admin_view_common_bottom', 'is_backend'=>true, 'admin'=>$this->admin]));
// 公共表格钩子名称动态处理
$current = 'plugins_view_admin_'.$this->controller_name;
// 是否插件默认下
if($this->controller_name == 'plugins')
{
if(!empty($this->data_request['pluginsname']))
{
$current .= '_'.trim($this->data_request['pluginsname']);
}
}
// 内容外部顶部
MyViewAssign('hook_name_content_top', $current.'_content_top');
// 内容外部底部
MyViewAssign('hook_name_content_bottom', $current.'_content_bottom');
// 内容内部顶部
MyViewAssign('hook_name_content_inside_top', $current.'_content_inside_top');
// 内容内部底部
MyViewAssign('hook_name_content_inside_bottom', $current.'_content_inside_bottom');
// 表格列表顶部操作
MyViewAssign('hook_name_form_top_operate', $current.'_top_operate');
// 表格列表底部操作
MyViewAssign('hook_name_form_bottom_operate', $current.'_bottom_operate');
// 表格列表后面操作栏
MyViewAssign('hook_name_form_list_operate', $current.'_list_operate');
// 公共详情页面钩子名称动态处理
// 内容外部顶部
MyViewAssign('hook_name_detail_top', $current.'_detail_top');
// 内容外部底部
MyViewAssign('hook_name_detail_bottom', $current.'_detail_bottom');
// 内容内部顶部
MyViewAssign('hook_name_detail_inside_top', $current.'_detail_inside_top');
// 内容内部底部
MyViewAssign('hook_name_detail_inside_bottom', $current.'_detail_inside_bottom');
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | 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()
{
// 静态数据
MyViewAssign('common_excel_charset_list', lang('common_excel_charset_list'));
MyViewAssign('common_is_enable_list', lang('common_is_enable_list'));
MyViewAssign('common_login_type_list', lang('common_login_type_list'));
MyViewAssign('common_close_open_list', lang('common_close_open_list'));
// 配置信息
MyViewAssign('data', ConfigService::ConfigList());
MyViewAssign('view_type', 'index');
return MyView();
}
/**
* 商店信息
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Store()
{
// 配置信息
MyViewAssign('data', ConfigService::ConfigList());
MyViewAssign('view_type', 'store');
return MyView();
}
/**
* 配置数据保存
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-02T23:08:19+0800
*/
public function Save()
{
// 参数
$params = $_POST;
// 字段不存在赋值
$empty_value_field_list = [];
// 页面类型
$view_type = empty($this->data_request['view_type']) ? 'index' : $this->data_request['view_type'];
switch($view_type)
{
case 'store' :
$empty_value_field_list['common_customer_store_qrcode'] = '';
break;
}
// 空字段处理
if(!empty($empty_value_field_list))
{
foreach($empty_value_field_list as $fk=>$fv)
{
if(!isset($params[$fk]))
{
$params[$fk] = $fv;
}
}
}
// 默认值字段处理
$default_value_field_list = [
'admin_login_type'=>'username',
];
if(!empty($default_value_field_list))
{
foreach($default_value_field_list as $fk=>$fv)
{
if(empty($params[$fk]))
{
$params[$fk] = $fv;
}
}
}
// 保存
return ConfigService::ConfigSave($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\CustomViewService;
/**
* 自定义页面管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class CustomView 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();
}
/**
* [Index 列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 总数
$total = CustomViewService::CustomViewTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/customview/index'),
];
$page = new \base\Page($page_params);
// 获取数据列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
];
$ret = CustomViewService::CustomViewList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-08-05T08:21:54+0800
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = CustomViewService::CustomViewList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 参数
$params = $this->data_request;
// 数据
$data = [];
if(!empty($params['id']))
{
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => ['id'=>intval($params['id'])],
'field' => '*',
];
$ret = CustomViewService::CustomViewList($data_params);
$data = empty($ret['data'][0]) ? [] : $ret['data'][0];
}
unset($params['id']);
MyViewAssign('data', $data);
MyViewAssign('params', $params);
return MyView();
}
/**
* [Save 添加/编辑]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return CustomViewService::CustomViewSave($params);
}
/**
* [Delete 删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return CustomViewService::CustomViewDelete($params);
}
/**
* [StatusUpdate 状态更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return CustomViewService::CustomViewStatusUpdate($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\DesignService;
use app\service\GoodsService;
use app\service\BrandService;
use app\layout\service\BaseLayout;
/**
* 页面设计管理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-10
* @desc description
*/
class Design 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 1.0.0
* @date 2020-09-10
* @desc description
*/
public function Index()
{
// 总数
$total = DesignService::DesignTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/design/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'where' => $this->form_where,
'order_by' => $this->form_order_by['data'],
];
$ret = DesignService::DesignList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 编辑页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-10
* @desc description
*/
public function SaveInfo()
{
// 是否指定id、不存在则增加数据
if(empty($this->data_request['id']))
{
$ret = DesignService::DesignSave();
if($ret['code'] == 0)
{
return MyRedirect(MyUrl('admin/design/saveinfo', ['id'=>$ret['data']]));
} else {
MyViewAssign('msg', $ret['msg']);
return MyView('public/tips_error');
}
}
// 获取数据
$data_params = [
'where' => [
'id' => intval($this->data_request['id']),
],
'm' => 0,
'n' => 1,
];
$ret = DesignService::DesignList($data_params);
if(empty($ret['data']) || empty($ret['data'][0]))
{
MyViewAssign('to_title', '去添加 >>');
MyViewAssign('to_url', MyUrl('admin/design/saveinfo'));
MyViewAssign('msg', '编辑数据为空、请重新添加');
return MyView('public/tips_error');
}
$data = $ret['data'][0];
// 配置处理
$layout_data = BaseLayout::ConfigAdminHandle($data['config']);
MyViewAssign('layout_data', $layout_data);
MyViewAssign('data', $data);
unset($data['config']);
// 页面列表
$pages_list = BaseLayout::PagesList();
MyViewAssign('pages_list', $pages_list);
// 商品分类
$goods_category = GoodsService::GoodsCategoryAll();
MyViewAssign('goods_category_list', $goods_category);
// 商品搜索分类(分类)
MyViewAssign('layout_goods_category', $goods_category);
MyViewAssign('layout_goods_category_field', 'gci.category_id');
// 品牌
MyViewAssign('brand_list', BrandService::CategoryBrand());
// 静态数据
MyViewAssign('border_style_type_list', BaseLayout::$border_style_type_list);
MyViewAssign('goods_view_list_show_style', BaseLayout::$goods_view_list_show_style);
MyViewAssign('many_images_view_list_show_style', BaseLayout::$many_images_view_list_show_style);
// 首页商品排序规则
MyViewAssign('goods_order_by_type_list', lang('goods_order_by_type_list'));
MyViewAssign('goods_order_by_rule_list', lang('goods_order_by_rule_list'));
// 加载布局样式+管理
MyViewAssign('is_load_layout', 1);
MyViewAssign('is_load_layout_admin', 1);
// 编辑器文件存放地址定义
MyViewAssign('editor_path_type', DesignService::AttachmentPathTypeValue($data['id']));
return MyView();
}
/**
* 保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-09-29
* @desc description
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
return DesignService::DesignSave($this->data_post);
}
/**
* 状态更新
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-31
* @desc description
*/
public function StatusUpdate()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
return DesignService::DesignStatusUpdate($this->data_post);
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2021-03-31
* @desc description
*/
public function Delete()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
return DesignService::DesignDelete($this->data_post);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | 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 Email 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();
}
/**
* [Index 配置列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 配置信息
MyViewAssign('data', ConfigService::ConfigList());
$type = input('type', 'email');
// 静态数据
MyViewAssign('common_is_text_list', lang('common_is_text_list'));
// 导航
MyViewAssign('nav_type', $type);
if($type == 'email')
{
return MyView('index');
} else {
return MyView('message');
}
}
/**
* [Save 配置数据保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-02T23:08:19+0800
*/
public function Save()
{
return ConfigService::ConfigSave($_POST);
}
/**
* [EmailTest 邮件测试]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-03-10T15:30:10+0800
*/
public function EmailTest()
{
// 验证码公共基础参数
$verify_param = array(
'expire_time' => MyC('common_verify_expire_time'),
'interval_time' => MyC('common_verify_interval_time'),
);
$obj = new \base\Email($verify_param);
$email_param = array(
'email' => isset($this->data_request['email']) ? $this->data_request['email'] : '',
'content' => '邮件配置-发送测试内容',
'title' => MyC('home_site_name').' - '.'测试',
);
// 发送
if($obj->SendHtml($email_param))
{
return DataReturn('发送成功');
}
return DataReturn('发送失败'.'['.$obj->error.']', -100);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
/**
* 空控制器响应
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-11-30
* @desc description
*/
class Error extends Common
{
/**
* 空控制器响应
* @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(RequestController().' 控制器不存在', -1000);
} else {
MyViewAssign('msg', RequestController().' 控制器不存在');
return MyView('public/tips_error');
}
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\ExpressService;
use app\service\ResourcesService;
/**
* 快递管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Express 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();
}
/**
* [Index 快递列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 是否启用
MyViewAssign('common_is_enable_list', lang('common_is_enable_list'));
// 编辑器文件存放地址
MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('express'));
return MyView();
}
/**
* [GetNodeSon 获取节点子列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T15:19:45+0800
*/
public function GetNodeSon()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return ExpressService::ExpressNodeSon($this->data_request);
}
/**
* [Save 快递保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return ExpressService::ExpressSave($this->data_request);
}
/**
* [Delete 快递删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Delete()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
$params = $this->data_post;
$params['admin'] = $this->admin;
return ExpressService::ExpressDelete($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\SystemBaseService;
use app\service\GoodsService;
use app\service\RegionService;
use app\service\BrandService;
use app\service\GoodsParamsService;
use app\service\ResourcesService;
/**
* 商品管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Goods 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();
}
/**
* [Index 商品列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 总数
$total = GoodsService::GoodsTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/goods/index'),
];
$page = new \base\Page($page_params);
// 获取数据列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
'is_category' => 1,
];
$ret = GoodsService::GoodsList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-08-05T08:21:54+0800
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['is_delete_time', '=', 0],
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
'is_photo' => 1,
'is_content_app' => 1,
'is_category' => 1,
];
$ret = GoodsService::GoodsList($data_params);
$data = [];
if(!empty($ret['data']) && !empty($ret['data'][0]))
{
$data = $ret['data'][0];
// 获取商品编辑规格
$specifications = GoodsService::GoodsEditSpecifications($data['id']);
MyViewAssign('specifications', $specifications);
// 获取商品编辑参数
$parameters = GoodsService::GoodsEditParameters($data['id']);
// 商品参数类型
MyViewAssign('common_goods_parameters_type_list', lang('common_goods_parameters_type_list'));
MyViewAssign('parameters', $parameters);
}
MyViewAssign('data', $data);
}
return MyView();
}
/**
* [SaveInfo 商品添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 参数
$params = $this->data_request;
// 商品信息
$data = [];
if(!empty($params['id']))
{
// 条件
$where = [
['is_delete_time', '=', 0],
['id', '=', intval($params['id'])],
];
// 获取数据
$data_params = [
'where' => $where,
'm' => 0,
'n' => 1,
'is_photo' => 1,
'is_content_app' => 1,
'is_category' => 1,
];
$ret = GoodsService::GoodsList($data_params);
if(empty($ret['data'][0]))
{
return $this->error('商品信息不存在', MyUrl('admin/goods/index'));
}
$data = $ret['data'][0];
// 获取商品编辑规格
$specifications = GoodsService::GoodsEditSpecifications($data['id']);
MyViewAssign('specifications', $specifications);
// 获取商品编辑参数
$parameters = GoodsService::GoodsEditParameters($data['id']);
MyViewAssign('parameters', $parameters);
}
// 地区信息
MyViewAssign('region_province_list', RegionService::RegionItems(['pid'=>0]));
// 商品分类
MyViewAssign('goods_category_list', GoodsService::GoodsCategoryAll());
// 品牌
MyViewAssign('brand_list', BrandService::CategoryBrand());
// 规格扩展数据
$goods_spec_extends = GoodsService::GoodsSpecificationsExtends($params);
MyViewAssign('goods_specifications_extends', $goods_spec_extends['data']);
// 站点类型
MyViewAssign('common_site_type_list', lang('common_site_type_list'));
// 当前系统设置的站点类型
MyViewAssign('common_site_type', SystemBaseService::SiteTypeValue());
// 商品参数类型
MyViewAssign('common_goods_parameters_type_list', lang('common_goods_parameters_type_list'));
// 商品参数模板
$data_params = array(
'm' => 0,
'n' => 0,
'where' => [
['is_enable', '=', 1],
['config_count', '>', 0],
],
'field' => 'id,name',
);
$template = GoodsParamsService::GoodsParamsTemplateList($data_params);
MyViewAssign('goods_template_list', $template['data']);
// 是否拷贝
MyViewAssign('is_copy', (isset($params['is_copy']) && $params['is_copy'] == 1) ? 1 : 0);
// 商品编辑页面钩子
$hook_name = 'plugins_view_admin_goods_save';
MyViewAssign($hook_name.'_data', MyEventTrigger($hook_name,
[
'hook_name' => $hook_name,
'is_backend' => true,
'goods_id' => isset($params['id']) ? $params['id'] : 0,
'data' => &$data,
'params' => &$params,
]));
// 编辑器文件存放地址
MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('goods'));
// 数据
unset($params['id'], $params['is_copy']);
MyViewAssign('data', $data);
MyViewAssign('params', $params);
return MyView();
}
/**
* [Save 商品添加/编辑]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function Save()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
$params = $this->data_post;
$params['admin'] = $this->admin;
return GoodsService::GoodsSave($params);
}
/**
* [Delete 商品删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function Delete()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
$params = $this->data_post;
$params['admin'] = $this->admin;
return GoodsService::GoodsDelete($params);
}
/**
* 状态更新
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
$params = $this->data_post;
$params['admin'] = $this->admin;
return GoodsService::GoodsStatusUpdate($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\GoodsBrowseService;
/**
* 商品浏览管理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class GoodsBrowse 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 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Index()
{
// 总数
$total = GoodsBrowseService::GoodsBrowseTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/goodsbrowse/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
'is_public' => 0,
'user_type' => 'admin',
];
$ret = GoodsBrowseService::GoodsBrowseList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['b.id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
'is_public' => 0,
'user_type' => 'admin',
];
$ret = GoodsBrowseService::GoodsBrowseList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return GoodsBrowseService::GoodsBrowseDelete($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\GoodsService;
use app\service\ResourcesService;
/**
* 分类管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class GoodsCategory 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();
}
/**
* [Index 分类列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public function Index()
{
// 静态数据
MyViewAssign('common_is_text_list', lang('common_is_text_list'));
// 商品分类
MyViewAssign('goods_category_list', GoodsService::GoodsCategoryAll());
// 编辑器文件存放地址
MyViewAssign('editor_path_type', ResourcesService::EditorPathTypeValue('goods_category'));
return MyView();
}
/**
* [GetNodeSon 获取节点子列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T15:19:45+0800
*/
public function GetNodeSon()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return GoodsService::GoodsCategoryNodeSon($this->data_request);
}
/**
* [Save 分类保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
$this->error('非法访问');
}
// 开始操作
return GoodsService::GoodsCategorySave($this->data_request);
}
/**
* [Delete 分类删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Delete()
{
// 是否ajax
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始操作
$params = $this->data_post;
$params['admin'] = $this->admin;
return GoodsService::GoodsCategoryDelete($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\GoodsCommentsService;
/**
* 商品评论管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Goodscomments 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()
{
// 总数
$total = GoodsCommentsService::GoodsCommentsTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/goodscomments/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
'is_public' => 0,
];
$ret = GoodsCommentsService::GoodsCommentsList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-08-05T08:21:54+0800
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
];
$ret = GoodsCommentsService::GoodsCommentsList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
MyViewAssign('common_goods_comments_rating_list', lang('common_goods_comments_rating_list'));
}
return MyView();
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SaveInfo()
{
// 参数
$params = $this->data_request;
// 数据
$data = [];
if(!empty($params['id']))
{
// 获取列表
$data_params = array(
'm' => 0,
'n' => 1,
'where' => ['id'=>intval($params['id'])],
'is_public' => 0,
);
$ret = GoodsCommentsService::GoodsCommentsList($data_params);
$data = empty($ret['data'][0]) ? [] : $ret['data'][0];
}
MyViewAssign('data', $data);
// 静态数据
MyViewAssign('common_is_show_list', lang('common_is_show_list'));
MyViewAssign('common_is_text_list', lang('common_is_text_list'));
MyViewAssign('common_goods_comments_rating_list', lang('common_goods_comments_rating_list'));
MyViewAssign('common_goods_comments_business_type_list', lang('common_goods_comments_business_type_list'));
// 参数
unset($params['id']);
MyViewAssign('params', $params);
return MyView();
}
/**
* [Save 保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Save()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return GoodsCommentsService::GoodsCommentsSave($params);
}
/**
* 问答删除
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-15T11:03:30+0800
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return GoodsCommentsService::GoodsCommentsDelete($params);
}
/**
* 问答回复处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2018-03-28T15:07:17+0800
*/
public function Reply()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return GoodsCommentsService::GoodsCommentsReply($params);
}
/**
* 状态更新
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
return GoodsCommentsService::GoodsCommentsStatusUpdate($params);
}
}
?>
\ No newline at end of file
<?php
// +----------------------------------------------------------------------
// | ShopXO 国内领先企业级B2C免费开源电商系统
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2099 http://shopxo.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://opensource.org/licenses/mit-license.php )
// +----------------------------------------------------------------------
// | Author: Devil
// +----------------------------------------------------------------------
namespace app\admin\controller;
use app\service\GoodsFavorService;
/**
* 商品收藏管理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
class Goodsfavor 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 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Index()
{
// 总数
$total = GoodsFavorService::GoodsFavorTotal($this->form_where);
// 分页
$page_params = [
'number' => $this->page_size,
'total' => $total,
'where' => $this->data_request,
'page' => $this->page,
'url' => MyUrl('admin/goodsfavor/index'),
];
$page = new \base\Page($page_params);
// 获取列表
$data_params = [
'where' => $this->form_where,
'm' => $page->GetPageStarNumber(),
'n' => $this->page_size,
'order_by' => $this->form_order_by['data'],
'is_public' => 0,
'user_type' => 'admin',
];
$ret = GoodsFavorService::GoodsFavorList($data_params);
// 基础参数赋值
MyViewAssign('params', $this->data_request);
MyViewAssign('page_html', $page->GetPageHtml());
MyViewAssign('data_list', $ret['data']);
return MyView();
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Detail()
{
if(!empty($this->data_request['id']))
{
// 条件
$where = [
['f.id', '=', intval($this->data_request['id'])],
];
// 获取列表
$data_params = [
'm' => 0,
'n' => 1,
'where' => $where,
'is_public' => 0,
'user_type' => 'admin',
];
$ret = GoodsFavorService::GoodsFavorList($data_params);
$data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0];
MyViewAssign('data', $data);
}
return MyView();
}
/**
* 删除
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2020-06-30
* @desc description
*/
public function Delete()
{
// 是否ajax请求
if(!IS_AJAX)
{
return $this->error('非法访问');
}
// 开始处理
$params = $this->data_request;
$params['user_type'] = 'admin';
return GoodsFavorService::GoodsFavorDelete($params);
}
}
?>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
文件模式从 100755 更改为 100644
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册