初始版本
This commit is contained in:
56
server/app/adminapi/controller/setting/AdminController.php
Executable file
56
server/app/adminapi/controller/setting/AdminController.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\AdminLogic;
|
||||
use app\adminapi\validate\setting\AdminValidate;
|
||||
|
||||
class AdminController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取个人资料
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/4/18 2:36 下午
|
||||
*/
|
||||
public function getAdmin()
|
||||
{
|
||||
$result = AdminLogic::getAdmin($this->adminId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置个人资料
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/4/18 2:58 下午
|
||||
*/
|
||||
public function setAdmin()
|
||||
{
|
||||
$params = (new AdminValidate())->post()->goCheck('setAdmin',['admin_id'=>$this->adminId]);
|
||||
AdminLogic::setAdmin($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
42
server/app/adminapi/controller/setting/BaseController.php
Executable file
42
server/app/adminapi/controller/setting/BaseController.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\BaseLogic;
|
||||
|
||||
/**
|
||||
* 获取基础配置
|
||||
* Class BaseController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class BaseController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取基础配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 13:20
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$data = (new BaseLogic())->getConfig();
|
||||
return $this->success('',$data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 13:21
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
(new BaseLogic())->setConfig($params);
|
||||
return $this->success('设置成功',[],1,1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
124
server/app/adminapi/controller/setting/CityController.php
Executable file
124
server/app/adminapi/controller/setting/CityController.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\CityLogic;
|
||||
use app\adminapi\validate\setting\CityValidate;
|
||||
|
||||
/**
|
||||
* 城市设置控制器类
|
||||
* Class CityController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class CityController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 查看服务分类列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 3:52 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取省市城市列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/6 16:51
|
||||
*/
|
||||
public function getCityLists()
|
||||
{
|
||||
$result = (new CityLogic())->getCityLists();
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取省市区城市列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/6 16:51
|
||||
*/
|
||||
public function getRegionLists()
|
||||
{
|
||||
$result = (new CityLogic())->getRegionLists();
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:03 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new CityValidate())->post()->goCheck('add');
|
||||
(new CityLogic())->add($params);
|
||||
return $this->success('操作成功', [],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看服务分类详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:21 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new CityValidate())->get()->goCheck('id');
|
||||
$result = (new CityLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:26 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new CityValidate())->post()->goCheck();
|
||||
(new CityLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:34 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new CityValidate())->post()->goCheck('id');
|
||||
(new CityLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
}
|
||||
52
server/app/adminapi/controller/setting/CustomerServiceController.php
Executable file
52
server/app/adminapi/controller/setting/CustomerServiceController.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\CustomerServiceLogic;
|
||||
|
||||
class CustomerServiceController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取客服设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 12:05 下午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = CustomerServiceLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置客服设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 12:11 下午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
CustomerServiceLogic::setConfig($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
56
server/app/adminapi/controller/setting/HotSearchController.php
Executable file
56
server/app/adminapi/controller/setting/HotSearchController.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\HotSearchLogic;
|
||||
|
||||
/**
|
||||
* 热门搜索设置
|
||||
* Class HotSearchController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class HotSearchController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取热门搜索
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/5 19:00
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = HotSearchLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置热门搜索
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/5 19:00
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = HotSearchLogic::setConfig($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(HotSearchLogic::getError() ?: '系统错误');
|
||||
}
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
107
server/app/adminapi/controller/setting/MapKeyController.php
Executable file
107
server/app/adminapi/controller/setting/MapKeyController.php
Executable file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\MapKeyLists;
|
||||
use app\adminapi\logic\setting\MapKeyLogic;
|
||||
use app\adminapi\validate\setting\MapKeyValidate;
|
||||
|
||||
class MapKeyController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 地图key列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午1:55
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new MapKeyLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 公共列表
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午1:57
|
||||
*/
|
||||
public function commonLists()
|
||||
{
|
||||
$result = (new MapKeyLogic())->commonLists();
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 新增key
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午2:05
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new MapKeyValidate())->post()->goCheck('add');
|
||||
(new MapKeyLogic())->add($params);
|
||||
return $this->success('操作成功', [],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午2:07
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new MapKeyValidate())->get()->goCheck('detail');
|
||||
$result = (new MapKeyLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午2:21
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new MapKeyValidate())->post()->goCheck('edit');
|
||||
(new MapKeyLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午2:21
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new MapKeyValidate())->post()->goCheck('del');
|
||||
(new MapKeyLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
86
server/app/adminapi/controller/setting/StorageController.php
Executable file
86
server/app/adminapi/controller/setting/StorageController.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\StorageLogic;
|
||||
use app\adminapi\validate\setting\StorageValidate;
|
||||
use think\response\Json;
|
||||
|
||||
|
||||
/**
|
||||
* 存储设置控制器
|
||||
* Class StorageController
|
||||
* @package app\adminapi\controller\settings\shop
|
||||
*/
|
||||
class StorageController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取存储引擎列表
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:13
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->success('获取成功', StorageLogic::lists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 存储配置信息
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:19
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$param = (new StorageValidate())->get()->goCheck('detail');
|
||||
return $this->success('获取成功', StorageLogic::detail($param));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置存储参数
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:19
|
||||
*/
|
||||
public function setup()
|
||||
{
|
||||
$params = (new StorageValidate())->post()->goCheck('setup');
|
||||
$result = StorageLogic::setup($params);
|
||||
if (true === $result) {
|
||||
return $this->success('配置成功', [], 1, 1);
|
||||
}
|
||||
return $this->success($result, [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 切换存储引擎
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:19
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$params = (new StorageValidate())->post()->goCheck('change');
|
||||
StorageLogic::change($params);
|
||||
return $this->success('切换成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
67
server/app/adminapi/controller/setting/TextController.php
Executable file
67
server/app/adminapi/controller/setting/TextController.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\TextLogic;
|
||||
use app\adminapi\validate\setting\TextValidate;
|
||||
|
||||
class TextController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 10:17
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 10:17
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new TextValidate())->post()->goCheck('add');
|
||||
(new TextLogic())->add($params);
|
||||
return $this->success('添加成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 10:19
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new TextValidate())->post()->goCheck();
|
||||
(new TextLogic())->edit($params);
|
||||
return $this->success('编辑成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 10:21
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new TextValidate())->post()->goCheck('id');
|
||||
$result = (new TextLogic())->del($params['id']);
|
||||
if(true === $result){
|
||||
return $this->success('删除成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
}
|
||||
53
server/app/adminapi/controller/setting/TransactionSettingsController.php
Executable file
53
server/app/adminapi/controller/setting/TransactionSettingsController.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\TransactionSettingsLogic;
|
||||
use app\adminapi\validate\setting\TransactionSettingsValidate;
|
||||
|
||||
class TransactionSettingsController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取交易设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 11:40 上午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = TransactionSettingsLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置交易设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 11:50 上午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new TransactionSettingsValidate())->post()->goCheck('setConfig');
|
||||
TransactionSettingsLogic::setConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
99
server/app/adminapi/controller/setting/dict/DictDataController.php
Executable file
99
server/app/adminapi/controller/setting/dict/DictDataController.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\dict;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\dict\DictDataLists;
|
||||
use app\adminapi\logic\setting\dict\DictDataLogic;
|
||||
use app\adminapi\validate\dict\DictDataValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 字典数据
|
||||
* Class DictDataController
|
||||
* @package app\adminapi\controller\dictionary
|
||||
*/
|
||||
class DictDataController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取字典数据列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:35
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new DictDataLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加字典数据
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 17:13
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new DictDataValidate())->post()->goCheck('add');
|
||||
DictDataLogic::save($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑字典数据
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 17:13
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new DictDataValidate())->post()->goCheck('edit');
|
||||
DictDataLogic::save($params);
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除字典数据
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 17:13
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new DictDataValidate())->post()->goCheck('id');
|
||||
DictDataLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取字典详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 17:14
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new DictDataValidate())->goCheck('id');
|
||||
$result = DictDataLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
99
server/app/adminapi/controller/setting/dict/DictTypeController.php
Executable file
99
server/app/adminapi/controller/setting/dict/DictTypeController.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\dict;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\dict\DictTypeLists;
|
||||
use app\adminapi\logic\setting\dict\DictTypeLogic;
|
||||
use app\adminapi\validate\dict\DictTypeValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
* Class DictTypeController
|
||||
* @package app\adminapi\controller\dict
|
||||
*/
|
||||
class DictTypeController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取字典类型列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 15:50
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new DictTypeLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加字典类型
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:24
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new DictTypeValidate())->post()->goCheck('add');
|
||||
DictTypeLogic::add($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑字典类型
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:25
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new DictTypeValidate())->post()->goCheck('edit');
|
||||
DictTypeLogic::edit($params);
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除字典类型
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:25
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new DictTypeValidate())->post()->goCheck('delete');
|
||||
DictTypeLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取字典详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:25
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new DictTypeValidate())->goCheck('detail');
|
||||
$result = DictTypeLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
72
server/app/adminapi/controller/setting/pay/PayConfigController.php
Executable file
72
server/app/adminapi/controller/setting/pay/PayConfigController.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\pay;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\pay\PayConfigLogic;
|
||||
use app\adminapi\validate\setting\PayConfigValidate;
|
||||
|
||||
class PayConfigController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看支付配置列表
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/2/15 6:03 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$result = (new PayConfigLogic())->lists();
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑支付配置
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/2/15 6:13 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new PayConfigValidate())->post()->goCheck('edit');
|
||||
(new PayConfigLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 支付配置详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 6:28 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
$result = (new PayConfigLogic())->detail($id);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
}
|
||||
59
server/app/adminapi/controller/setting/pay/PayWayController.php
Executable file
59
server/app/adminapi/controller/setting/pay/PayWayController.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\pay;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\pay\PayWayLogic;
|
||||
|
||||
class PayWayController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取支付方式
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/2/15 6:52 下午
|
||||
*/
|
||||
public function getPayWay()
|
||||
{
|
||||
$result = (new PayWayLogic())->getPayWay();
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置支付方式
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
* @author ljj
|
||||
* @date 2022/2/15 7:02 下午
|
||||
*/
|
||||
public function setPayWay()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = (new PayWayLogic())->setPayWay($params);
|
||||
if (true !== $result) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
39
server/app/adminapi/controller/setting/system/CacheController.php
Executable file
39
server/app/adminapi/controller/setting/system/CacheController.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\system;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\system\CacheLogic;
|
||||
|
||||
/**
|
||||
* 系统缓存
|
||||
* Class CacheController
|
||||
* @package app\adminapi\controller\settings\system
|
||||
*/
|
||||
class CacheController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 清除系统缓存
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/8 16:34
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
CacheLogic::clear();
|
||||
return $this->success('清除成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
38
server/app/adminapi/controller/setting/system/LogController.php
Executable file
38
server/app/adminapi/controller/setting/system/LogController.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\system;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\system\LogLists;
|
||||
|
||||
/**
|
||||
* 系统日志
|
||||
* Class LogController
|
||||
* @package app\adminapi\controller\setting\system
|
||||
*/
|
||||
class LogController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看系统日志列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2021/8/3 4:25 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new LogLists());
|
||||
}
|
||||
}
|
||||
70
server/app/adminapi/controller/setting/system/SystemController.php
Executable file
70
server/app/adminapi/controller/setting/system/SystemController.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\system;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\system\SystemLogic;
|
||||
|
||||
|
||||
/**
|
||||
* 系统维护
|
||||
* Class SystemController
|
||||
* @package app\adminapi\controller\setting\system
|
||||
*/
|
||||
class SystemController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取系统环境信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/28 18:36
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
$result = SystemLogic::getInfo();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 通用设置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/27 16:32
|
||||
*/
|
||||
public function getGeneralSetting()
|
||||
{
|
||||
$result = SystemLogic::getGeneralSetting();
|
||||
return $this->data($result);
|
||||
}
|
||||
/**
|
||||
* @notes 通用设置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/27 16:32
|
||||
*/
|
||||
public function setGeneralSetting()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
SystemLogic::setGeneralSetting($params);
|
||||
return $this->success('设置成功',[],1,1);
|
||||
}
|
||||
|
||||
}
|
||||
85
server/app/adminapi/controller/setting/system/UpgradeController.php
Executable file
85
server/app/adminapi/controller/setting/system/UpgradeController.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\adminapi\controller\setting\system;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\system\UpgradeLists;
|
||||
use app\adminapi\logic\setting\system\UpgradeLogic;
|
||||
use app\adminapi\validate\setting\upgrade\downloadPkgValidate;
|
||||
use app\adminapi\validate\setting\upgrade\UpgradeValidate;
|
||||
|
||||
/**
|
||||
* 系统更新
|
||||
* Class UpgradeController
|
||||
* @package app\adminapi\controller\settings\system
|
||||
*/
|
||||
class UpgradeController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看系统更新列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/8/14 17:17
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new UpgradeLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 执行系统更新
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/8/14 16:51
|
||||
*/
|
||||
public function upgrade()
|
||||
{
|
||||
$params = (new UpgradeValidate())->post()->goCheck();
|
||||
$params['update_type'] = 1;//一键更新类型
|
||||
if (true === UpgradeLogic::upgrade($params)) {
|
||||
return $this->success('更新成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail('更新失败:'. UpgradeLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 下载更新包
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/10/8 14:23
|
||||
*/
|
||||
public function downloadPkg()
|
||||
{
|
||||
$params = (new downloadPkgValidate())->post()->goCheck();
|
||||
$result = UpgradeLogic::getPkgLine($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(UpgradeLogic::getError());
|
||||
}
|
||||
return $this->success('', $result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
111
server/app/adminapi/controller/setting/user/UserController.php
Executable file
111
server/app/adminapi/controller/setting/user/UserController.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\adminapi\controller\setting\user;
|
||||
use app\adminapi\{
|
||||
controller\BaseAdminController,
|
||||
logic\setting\user\UserLogic,
|
||||
validate\setting\UserConfigValidate
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 设置-用户设置控制器
|
||||
* Class UserController
|
||||
* @package app\adminapi\controller\config
|
||||
*/
|
||||
class UserController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取用户设置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2021/7/27 17:29
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = (new UserLogic())->getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置用户设置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2021/7/27 17:59
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new UserConfigValidate())->post()->goCheck('user');
|
||||
(new UserLogic())->setConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取注册配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2021/9/14 17:11
|
||||
*/
|
||||
public function getRegisterConfig()
|
||||
{
|
||||
$result = (new UserLogic())->getRegisterConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置注册配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2021/9/14 17:29
|
||||
*/
|
||||
public function setRegisterConfig()
|
||||
{
|
||||
$params = (new UserConfigValidate())->post()->goCheck('register');
|
||||
(new UserLogic())->setRegisterConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取提现配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/27 17:56
|
||||
*/
|
||||
public function getWithdrawConfig()
|
||||
{
|
||||
$result = (new UserLogic())->getWithdrawConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置提现配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/27 17:56
|
||||
*/
|
||||
public function setWithdrawConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
(new UserLogic())->setWithdrawConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
}
|
||||
143
server/app/adminapi/controller/setting/web/WebSettingController.php
Executable file
143
server/app/adminapi/controller/setting/web/WebSettingController.php
Executable file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\web;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\web\WebSettingLogic;
|
||||
use app\adminapi\validate\setting\WebSettingValidate;
|
||||
|
||||
/**
|
||||
* 网站设置
|
||||
* Class WebSettingController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class WebSettingController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取网站信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/28 15:44
|
||||
*/
|
||||
public function getWebsite()
|
||||
{
|
||||
$result = WebSettingLogic::getWebsiteInfo();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置网站信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/28 15:45
|
||||
*/
|
||||
public function setWebsite()
|
||||
{
|
||||
$params = (new WebSettingValidate())->post()->goCheck('website');
|
||||
WebSettingLogic::setWebsiteInfo($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取备案信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/28 16:10
|
||||
*/
|
||||
public function getCopyright()
|
||||
{
|
||||
$result = WebSettingLogic::getCopyright();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置备案信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/28 16:10
|
||||
*/
|
||||
public function setCopyright()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = WebSettingLogic::setCopyright($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(WebSettingLogic::getError() ?: '操作失败');
|
||||
}
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置政策协议
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 11:00 上午
|
||||
*/
|
||||
public function setAgreement()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
WebSettingLogic::setAgreement($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取政策协议
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 11:16 上午
|
||||
*/
|
||||
public function getAgreement()
|
||||
{
|
||||
$result = WebSettingLogic::getAgreement();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置地图钥匙
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/3/10 5:12 下午
|
||||
*/
|
||||
public function setMapKey()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
WebSettingLogic::setMapKey($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取地图钥匙
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/3/10 5:12 下午
|
||||
*/
|
||||
public function getMapKey()
|
||||
{
|
||||
$result = WebSettingLogic::getMapKey();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user