first commit
This commit is contained in:
100
app/adminapi/validate/setting/LanguagePagValidate.php
Normal file
100
app/adminapi/validate/setting/LanguagePagValidate.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?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\validate\setting;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 语言包验证器
|
||||
* Class LanguagePagValidate
|
||||
* @package app\adminapi\validate\setting
|
||||
*/
|
||||
class LanguagePagValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'type' => 'require',
|
||||
'name' => 'require',
|
||||
'value' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'type' => '类型',
|
||||
'name' => '名称',
|
||||
'value' => '值',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return LanguagePagValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['type','name']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return LanguagePagValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','type','name']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return LanguagePagValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return LanguagePagValidate
|
||||
* @author likeadmin
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
}
|
||||
115
app/adminapi/validate/setting/LanguageValidate.php
Normal file
115
app/adminapi/validate/setting/LanguageValidate.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?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\validate\setting;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 语言包验证器
|
||||
* Class LanguageValidate
|
||||
* @package app\adminapi\validate\setting
|
||||
*/
|
||||
class LanguageValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'name' => 'require',
|
||||
'name_loc' => 'require',
|
||||
'symbol' => 'require',
|
||||
'precision' => 'require',
|
||||
'is_show' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'name' => '语言名称',
|
||||
'name_loc' => '语言名称',
|
||||
'symbol' => '语言标识',
|
||||
'precision' => '显示精度',
|
||||
'is_show' => '是否显示',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return LanguageValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['name','name_loc','symbol','precision','is_show']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return LanguageValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','name','name_loc','symbol','precision','is_show']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return LanguageValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return LanguageValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 更改状态场景
|
||||
* @return ArticleValidate
|
||||
* @author heshihu
|
||||
* @date 2022/2/22 10:18
|
||||
*/
|
||||
public function sceneStatus()
|
||||
{
|
||||
return $this->only(['id', 'is_show']);
|
||||
}
|
||||
|
||||
}
|
||||
38
app/adminapi/validate/setting/OperationLogValidate.php
Normal file
38
app/adminapi/validate/setting/OperationLogValidate.php
Normal 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\validate\setting;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
use think\facade\Db;
|
||||
|
||||
|
||||
/**
|
||||
* 代码生成选择表验证
|
||||
* Class OperationLogValidate
|
||||
* @package app\adminapi\validate\setting
|
||||
*/
|
||||
class OperationLogValidate extends BaseValidate
|
||||
{
|
||||
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'id.require' => '参数缺失',
|
||||
];
|
||||
|
||||
}
|
||||
130
app/adminapi/validate/setting/RechargeMethodValidate.php
Normal file
130
app/adminapi/validate/setting/RechargeMethodValidate.php
Normal file
@@ -0,0 +1,130 @@
|
||||
<?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\validate\setting;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 充值方式验证器
|
||||
* Class RechargeMethodValidate
|
||||
* @package app\adminapi\validate\setting
|
||||
*/
|
||||
class RechargeMethodValidate extends BaseValidate
|
||||
{
|
||||
|
||||
/**
|
||||
* 设置校验规则
|
||||
* @var string[]
|
||||
*/
|
||||
protected $rule = [
|
||||
'id' => 'require',
|
||||
'lang_id' => 'require',
|
||||
'type' => 'require',
|
||||
'name' => 'require',
|
||||
'rate' => 'require',
|
||||
'is_show' => 'require',
|
||||
|
||||
'money' => 'require',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 参数描述
|
||||
* @var string[]
|
||||
*/
|
||||
protected $field = [
|
||||
'id' => 'id',
|
||||
'lang_id' => '所属语言ID',
|
||||
'type' => '类型1USDT2扫码3银行卡4在线',
|
||||
'name' => '名称',
|
||||
'rate' => '汇率',
|
||||
'is_show' => '是否显示:1-是.0-否',
|
||||
|
||||
'money' => '请输入常用金额',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加场景
|
||||
* @return RechargeMethodValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function sceneAdd()
|
||||
{
|
||||
return $this->only(['lang_id','type','name','rate','is_show']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑场景
|
||||
* @return RechargeMethodValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function sceneEdit()
|
||||
{
|
||||
return $this->only(['id','lang_id','type','name','rate','is_show']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除场景
|
||||
* @return RechargeMethodValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function sceneDelete()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情场景
|
||||
* @return RechargeMethodValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 更改状态场景
|
||||
* @return ArticleValidate
|
||||
* @author heshihu
|
||||
* @date 2022/2/22 10:18
|
||||
*/
|
||||
public function sceneStatus()
|
||||
{
|
||||
return $this->only(['id', 'is_show']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 常用金额场景
|
||||
* @return RechargeMethodValidate
|
||||
* @author likeadmin
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function sceneMoney()
|
||||
{
|
||||
return $this->only(['money']);
|
||||
}
|
||||
|
||||
}
|
||||
70
app/adminapi/validate/setting/StorageValidate.php
Normal file
70
app/adminapi/validate/setting/StorageValidate.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?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\validate\setting;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 存储引擎验证
|
||||
* Class StorageValidate
|
||||
* @package app\adminapi\validate\setting
|
||||
*/
|
||||
class StorageValidate extends BaseValidate
|
||||
{
|
||||
|
||||
protected $rule = [
|
||||
'engine' => 'require',
|
||||
'status' => 'require',
|
||||
];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置存储引擎参数场景
|
||||
* @return StorageValidate
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:18
|
||||
*/
|
||||
public function sceneSetup()
|
||||
{
|
||||
return $this->only(['engine', 'status']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取配置参数信息场景
|
||||
* @return StorageValidate
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:18
|
||||
*/
|
||||
public function sceneDetail()
|
||||
{
|
||||
return $this->only(['engine']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 切换存储引擎场景
|
||||
* @return StorageValidate
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:18
|
||||
*/
|
||||
public function sceneChange()
|
||||
{
|
||||
return $this->only(['engine']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?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\validate\setting;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* 交易设置验证
|
||||
* Class TransactionSettingsValidate
|
||||
* @package app\adminapi\validate\setting
|
||||
*/
|
||||
class TransactionSettingsValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'cancel_unpaid_orders' => 'require|in:0,1',
|
||||
'cancel_unpaid_orders_times' => 'requireIf:cancel_unpaid_orders,1|integer|gt:0',
|
||||
'verification_orders' => 'require|in:0,1',
|
||||
'verification_orders_times' => 'requireIf:verification_orders,1|integer|gt:0',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'cancel_unpaid_orders.require' => '请选择系统取消待付款订单方式',
|
||||
'cancel_unpaid_orders.in' => '系统取消待付款订单状态值有误',
|
||||
'cancel_unpaid_orders_times.requireIf' => '系统取消待付款订单时间未填写',
|
||||
'cancel_unpaid_orders_times.integer' => '系统取消待付款订单时间须为整型',
|
||||
'cancel_unpaid_orders_times.gt' => '系统取消待付款订单时间须大于0',
|
||||
|
||||
'verification_orders.require' => '请选择系统自动核销订单方式',
|
||||
'verification_orders.in' => '系统自动核销订单状态值有误',
|
||||
'verification_orders_times.requireIf' => '系统自动核销订单时间未填写',
|
||||
'verification_orders_times.integer' => '系统自动核销订单时间须为整型',
|
||||
'verification_orders_times.gt' => '系统自动核销订单时间须大于0',
|
||||
];
|
||||
|
||||
public function sceneSetConfig()
|
||||
{
|
||||
return $this->only(['cancel_unpaid_orders','cancel_unpaid_orders_times','verification_orders','verification_orders_times']);
|
||||
}
|
||||
}
|
||||
62
app/adminapi/validate/setting/UserConfigValidate.php
Normal file
62
app/adminapi/validate/setting/UserConfigValidate.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?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\validate\setting;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* 用户设置验证
|
||||
* Class UserConfigValidate
|
||||
* @package app\adminapi\validate\setting
|
||||
*/
|
||||
class UserConfigValidate extends BaseValidate
|
||||
{
|
||||
|
||||
protected $rule = [
|
||||
'login_way' => 'requireIf:scene,register|array',
|
||||
'coerce_mobile' => 'requireIf:scene,register|in:0,1',
|
||||
'login_agreement' => 'in:0,1',
|
||||
'third_auth' => 'in:0,1',
|
||||
'wechat_auth' => 'in:0,1',
|
||||
'default_avatar' => 'require',
|
||||
'password_pay' => 'require|length:6|integer',
|
||||
];
|
||||
|
||||
|
||||
protected $message = [
|
||||
'default_avatar.require' => '请上传用户默认头像',
|
||||
'login_way.requireIf' => '请选择登录方式',
|
||||
'login_way.array' => '登录方式值错误',
|
||||
'coerce_mobile.requireIf' => '请选择注册强制绑定手机',
|
||||
'coerce_mobile.in' => '注册强制绑定手机值错误',
|
||||
'wechat_auth.in' => '公众号微信授权登录值错误',
|
||||
'third_auth.in' => '第三方登录值错误',
|
||||
'login_agreement.in' => '政策协议值错误',
|
||||
'password_pay.require' => '请输入初始支付密码',
|
||||
'password_pay.length' => '初始支付密码为6位数字',
|
||||
'password_pay.integer' => '初始支付密码为6位数字',
|
||||
];
|
||||
|
||||
//用户设置验证
|
||||
public function sceneUser()
|
||||
{
|
||||
return $this->only(['default_avatar']);
|
||||
}
|
||||
|
||||
//注册验证
|
||||
public function sceneRegister()
|
||||
{
|
||||
return $this->only(['login_way', 'coerce_mobile', 'login_agreement', 'third_auth', 'wechat_auth', 'password_pay']);
|
||||
}
|
||||
}
|
||||
50
app/adminapi/validate/setting/WebSettingValidate.php
Normal file
50
app/adminapi/validate/setting/WebSettingValidate.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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\validate\setting;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* 网站设置验证器
|
||||
* Class WebSettingValidate
|
||||
* @package app\adminapi\validate\setting
|
||||
*/
|
||||
class WebSettingValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'name' => 'require|max:30',
|
||||
'web_favicon' => 'require',
|
||||
'web_logo' => 'require',
|
||||
'login_image' => 'require',
|
||||
'shop_name' => 'require',
|
||||
'shop_logo' => 'require',
|
||||
'pc_logo' => 'require',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'name.require' => '请填写网站名称',
|
||||
'name.max' => '网站名称最长为12个字符',
|
||||
'web_favicon.require' => '请上传网站图标',
|
||||
'web_logo.require' => '请上传网站logo',
|
||||
'login_image.require' => '请上传登录页广告图',
|
||||
'shop_name.require' => '请填写前台名称',
|
||||
'shop_logo.require' => '请上传前台logo',
|
||||
'pc_logo.require' => '请上传PC端logo',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'website' => ['name', 'web_favicon', 'web_logo', 'login_image', 'shop_name', 'shop_logo', 'pc_logo'],
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user