初始版本
This commit is contained in:
38
server/app/adminapi/validate/channel/H5SettingValidate.php
Executable file
38
server/app/adminapi/validate/channel/H5SettingValidate.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?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\validate\channel;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* H5设置验证器
|
||||
* Class HFiveSettingValidate
|
||||
* @package app\adminapi\validate\settings\h5
|
||||
*/
|
||||
class H5SettingValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'status' => 'require|in:0,1'
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'status.require' => '请选择启用状态',
|
||||
'status.in' => '启用状态值有误',
|
||||
];
|
||||
}
|
||||
36
server/app/adminapi/validate/channel/MnpSettingsValidate.php
Executable file
36
server/app/adminapi/validate/channel/MnpSettingsValidate.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?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\channel;
|
||||
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* 小程序设置
|
||||
* Class MnpSettingsValidate
|
||||
* @package app\adminapi\validate\channel
|
||||
*/
|
||||
class MnpSettingsValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'app_id' => 'require',
|
||||
'app_secret' => 'require',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'app_id.require' => '请填写AppID',
|
||||
'app_secret.require' => '请填写AppSecret',
|
||||
];
|
||||
}
|
||||
39
server/app/adminapi/validate/channel/OfficialAccountMenuValidate.php
Executable file
39
server/app/adminapi/validate/channel/OfficialAccountMenuValidate.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?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\validate\channel;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* 微信公众号菜单验证器
|
||||
* Class OfficialAccountMenuValidate
|
||||
* @package app\adminapi\validate\wechat
|
||||
*/
|
||||
class OfficialAccountMenuValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'menu' => 'require|array'
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'menu.require' => '请先设置菜单',
|
||||
'menu.array' => '菜单须为数组格式'
|
||||
];
|
||||
}
|
||||
72
server/app/adminapi/validate/channel/OfficialAccountReplyValidate.php
Executable file
72
server/app/adminapi/validate/channel/OfficialAccountReplyValidate.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* 微信公众号回复验证器
|
||||
* Class OfficialAccountReplyValidate
|
||||
* @package app\adminapi\validate\channel
|
||||
*/
|
||||
class OfficialAccountReplyValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'id' => 'require|integer',
|
||||
'reply_type' => 'require|in:1,2,3',
|
||||
'name' => 'require',
|
||||
'content_type' => 'require|in:1',
|
||||
'content' => 'require',
|
||||
'status' => 'require|in:0,1',
|
||||
'keyword' => 'requireIf:reply_type,2',
|
||||
'matching_type' => 'requireIf:reply_type,2|in:1,2',
|
||||
'sort' => 'requireIf:reply_type,2',
|
||||
'reply_num' => 'requireIf:reply_type,2|in:1',
|
||||
'new_sort' => 'require|integer|egt:0',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'reply_type.require' => '请输入回复类型',
|
||||
'reply_type.in' => '回复类型状态值错误',
|
||||
'name.require' => '请输入规则名称',
|
||||
'content_type.require' => '请选择内容类型',
|
||||
'content_type.in' => '内容类型状态值有误',
|
||||
'content.require' => '请输入回复内容',
|
||||
'status.require' => '请选择启用状态',
|
||||
'status.in' => '启用状态值错误',
|
||||
'keyword.requireIf' => '请输入关键词',
|
||||
'matching_type.requireIf' => '请选择匹配类型',
|
||||
'matching_type.in' => '匹配类型状态值错误',
|
||||
'sort.requireIf' => '请输入排序值',
|
||||
'sort.integer' => '排序值须为整型',
|
||||
'sort.egt' => '排序值须大于或等于0',
|
||||
'reply_num.requireIf' => '请选择回复数量',
|
||||
'reply_num.in' => '回复数量状态值错误',
|
||||
'id.require' => '参数缺失',
|
||||
'id.integer' => '参数格式错误',
|
||||
'new_sort.require' => '请输入新排序值',
|
||||
'new_sort.integer' => '新排序值须为整型',
|
||||
'new_sort.egt' => '新排序值须大于或等于0',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'add' => ['reply_type', 'name', 'content_type', 'content', 'status', 'keyword', 'matching_type', 'sort', 'reply_num'],
|
||||
'detail' => ['id'],
|
||||
'delete' => ['id'],
|
||||
'sort' => ['id', 'new_sort'],
|
||||
'status' => ['id'],
|
||||
'edit' => ['id', 'reply_type', 'name', 'content_type', 'content', 'status','keyword', 'matching_type', 'sort', 'reply_num']
|
||||
];
|
||||
}
|
||||
38
server/app/adminapi/validate/channel/OfficialAccountSettingValidate.php
Executable file
38
server/app/adminapi/validate/channel/OfficialAccountSettingValidate.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\validate\channel;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* 公众号设置
|
||||
* Class OfficialAccountSettingValidate
|
||||
* @package app\adminapi\validate\channel
|
||||
*/
|
||||
class OfficialAccountSettingValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'app_id' => 'require',
|
||||
'app_secret' => 'require',
|
||||
'encryption_type' => 'require|in:1,2,3',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'app_id.require' => '请填写AppID',
|
||||
'app_secret.require' => '请填写AppSecret',
|
||||
'encryption_type.require' => '请选择消息加密方式',
|
||||
'encryption_type.in' => '消息加密方式状态值错误',
|
||||
];
|
||||
}
|
||||
33
server/app/adminapi/validate/channel/WebPageSettingValidate.php
Executable file
33
server/app/adminapi/validate/channel/WebPageSettingValidate.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\common\validate\BaseValidate;
|
||||
|
||||
/**
|
||||
* H5设置验证器
|
||||
* Class HFiveSettingValidate
|
||||
* @package app\adminapi\validate\settings\h5
|
||||
*/
|
||||
class WebPageSettingValidate extends BaseValidate
|
||||
{
|
||||
protected $rule = [
|
||||
'status' => 'require|in:0,1'
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'status.require' => '请选择启用状态',
|
||||
'status.in' => '启用状态值有误',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user