功能更新

This commit is contained in:
2020-03-30 21:16:28 +08:00
parent b16e4ab920
commit f31f3b99fa
23 changed files with 464 additions and 230 deletions

View File

@@ -14,18 +14,18 @@ namespace app\model;
*/
class SeoRule extends \think\Model {
public $keyList = array(
array('name' => 'id', 'title' => '标识', 'type' => 'hidden'),
array('name' => 'title', 'title' => '规则名称', 'type' => 'text', 'option' => '', 'help' => '规则名称,方便记忆'),
array('name' => 'app', 'title' => '模块名', 'type' => 'select', 'option' => array('*' => '-所有模块-', 'index' => '前台模块', 'user' => '用户中心'), 'help' => '不选表示所有模块'),
array('name' => 'controller', 'title' => '控制器', 'type' => 'text', 'option' => '', 'help' => '不填表示所有控制器'),
array('name' => 'action', 'title' => '方法', 'type' => 'text', 'option' => '', 'help' => '不填表示所有方法'),
array('name' => 'seo_title', 'title' => 'SEO标题', 'type' => 'text', 'option' => '', 'help' => '不填表示使用默认'),
array('name' => 'seo_keywords', 'title' => 'SEO关键字', 'type' => 'text', 'option' => '', 'help' => '不填表示使用默认'),
array('name' => 'seo_description', 'title' => 'SEO描述', 'type' => 'text', 'option' => '', 'help' => '不填表示使用默认'),
array('name' => 'status', 'title' => '状态', 'type' => 'select', 'option' => array('0' => '禁用', '1' => '启用'), 'help' => ''),
array('name' => 'sort', 'title' => '排序', 'type' => 'text', 'option' => '', 'help' => ''),
);
public static $keyList = [
['name' => 'id', 'title' => '标识', 'type' => 'hidden'],
['name' => 'title', 'title' => '规则名称', 'type' => 'text', 'option' => '', 'help' => '规则名称,方便记忆'],
['name' => 'app', 'title' => '模块名', 'type' => 'select', 'option' => [['key'=>'*', 'label' => '-所有模块-'], ['key'=>'index', 'label' => '前台模块'], ['key'=>'user', 'label' => '用户中心']], 'help' => '不选表示所有模块'],
['name' => 'controller', 'title' => '控制器', 'type' => 'text', 'option' => '', 'help' => '不填表示所有控制器'],
['name' => 'action', 'title' => '方法', 'type' => 'text', 'option' => '', 'help' => '不填表示所有方法'],
['name' => 'seo_title', 'title' => 'SEO标题', 'type' => 'text', 'option' => '', 'help' => '不填表示使用默认'],
['name' => 'seo_keywords', 'title' => 'SEO关键字', 'type' => 'text', 'option' => '', 'help' => '不填表示使用默认'],
['name' => 'seo_description', 'title' => 'SEO描述', 'type' => 'text', 'option' => '', 'help' => '不填表示使用默认'],
['name' => 'status', 'title' => '状态', 'type' => 'select', 'option' => [['key'=>'0', 'label' => '禁用'], ['key'=>'1', 'label' => '启用']], 'help' => ''],
['name' => 'sort', 'title' => '排序', 'type' => 'text', 'option' => '', 'help' => ''],
];
protected function setAppAttr($value) {
return $value ? $value : '*';