diff --git a/README.md b/README.md index 6aaed99..c32b66d 100644 --- a/README.md +++ b/README.md @@ -1 +1,844 @@ -### TOP-Framework \ No newline at end of file +# TOP-Framework +*这是一个部分代码源自三年前毕业设计中的代码集合,后经过一系列重构,形成的一套框架。在此准备写一个文档。* + +## 模块 +### 创建模块 +1. 手动创建 +在application(可更改)目录下创建home目录,再创建config、controller(必须)、model、view目录 +2. 命令行自动创建 +命令格式([]为可选参数): +``` +php create.php 目录 模块名 [入口文件] +``` + +进入framework/create/目录,执行以下命令: +``` +php create.php application home index +``` + +至此,已经通过简单的命令创建了home模块,浏览器输入127.0.0.1即可访问home模块(系统默认模块为home模块,可在入口文件中指定),亦可命令行访问home模块。 + +## 控制器 +### 创建控制器 +一个典型的控制器(Index.php) +``` +view(); +} +``` +调用基础控制器中的view方法、并return出去,完成模板的展示。 +### 模板传值 +1. view方法 +``` +public function index() +{ + return $this->view(null, [ + 'param' => 'Hello world!' + ]); +} +``` +2. 直接return数组 +``` +public function index() +{ + return [ + 'param' => 'Hello world!' + ]; +} +``` +以上两种方式等效。 +### 控制器方法的前置、后置操作 +``` +public function before_index() +{ +} + +public function after_index() +{ +} + +public function index() +{ + return [ + 'param' => 'Hello world!' + ]; +} +``` +命名规范:before_方法名(前置)、after_方法名(后置),执行index方法之前会先执行before_index方法(如果存在),执行完index方法后会执行after_index方法(如果存在)。当前置方法return的值为空字符串、null、true时才会继续执行,否则前置方法的return等效于index方法的return。 + +## 模型 +### 创建模型 +一个典型的模型(Users.php) +``` +update([ + 'username' => 'TOP糯米' +], 1); +``` +除此之外,提供另一种方式,传递更多条件或更复杂的条件 +``` +$this->update([ + 'username' => 'TOP糯米' +], function ($model) { + $model->where('id', 1); +}); +``` +当然,也可以使用连贯操作 +``` +$this->where('id', 1)->update([ + 'username' => 'TOP糯米' +]); +``` + +成功返回受影响的记录数,失败抛出DatabaseException异常。 + +5. find($param = false, $notRaw = true) +查找一条记录 + +可传入第一个参数为主键,第二个参数为是否按指定的规则(outReplace属性)进行处理。 + +一般调用 +``` +$this->find(1); +``` +匿名函数 +``` +$this->find(function ($model) { + $model->where('id', 1); +}); +``` +连贯操作 +``` +$this->where('id', 1)->find(); +``` + +成功返回一个一维数组,失败抛出DatabaseException异常。 + +6. select($param = false, $notRaw = true) +查找多条记录 + +使用方法同find + +成功返回一个二维数组,失败抛出DatabaseException异常。 + +7. delete +删除记录 + +直接传入主键 +``` +$this->delete(1); +``` +匿名函数 +``` +$this->delete(function () { + $model->where('id', 1); +}); +``` +连贯操作 +``` +$this->where('id', 1)->delete(); +``` + +成功返回受影响的记录数,失败抛出DatabaseException异常。 + +8. count +返回记录数 + +一般调用 +``` +$this->count(); +``` +第一个参数同样可以为匿名函数、并且同样支持连贯操作 + +成功返回记录数,失败抛出DatabaseException异常。 + +9. avg +计算平均值 + +接收一个参数,当没有使用field方法指定字段时,可直接传入字段名,以计算平均值。 +``` +$this->avg('score'); +``` +使用field方法指定字段 +``` +$this->field('score')->avg(); +``` +匿名函数中指定字段或条件 +``` +$this->avg(function ($model) { + $model->where('score', '>=', 60); + $model->field('score'); +}); +``` +成功返回平均值,失败抛出DatabaseException异常。 + +10. max +计算最大值 + +同avg方法 + +11. min +计算最小值 + +同avg方法 + +12. sum +求和 + +同avg方法 + +13. _sql +返回最后执行的SQL语句 + +14. tableDesc +返回表结构 + +接收参数为一个完整表名。 + +成功返回表结构,失败抛出DatabaseException异常。 + +15. distinct +过滤记录中的重复值 + +接收一个为字段名称的参数 + +调用 +``` +$this->distinct('sex')->select(); +``` + +失败抛出DatabaseException异常。 + +16. effect +删除时指定表(别)名 + +接收一个参数,可以为字符串或数组,参数为表名或表别名 + +调用 +``` +$this->delete(function ($model) { + $model->effect('s,this'); + $model->join('left', 'score', 's')->on('s.uid = this.id'); + $model->where(['this.id' => 3]); +}); +``` + +17. field +指定字段 + +可传入字符串或数组 + +18. where +指定条件 + +最多可接收三个参数 + +仅传入一个参数时,可传入字符串或数组 +``` +$where = ['id' => ['>', 10], 'sex' => 1]; +$where = 'id > 10 and sex = 1'; +$this->where($where)->select(); +``` +两个参数,解析为“字段=值” +``` +$this->where('sex', 1)->select(); +``` +三个参数,指定字段与字段值的连接符 +``` +$this->where('sex', '>', 1)->select(); +``` + +19. order +对结果进行排序 + +``` +$this->order('id desc')->select(); +``` +也可以使用匿名函数调用order方法 + +20. limit +查询范围 + +接收一个参数,可以是字符串或数组 + +一般调用 +``` +$this->limit('0, 5')->select(); +$this->limit([0, 5])->select(); +``` +两种方式等效 + +21. join +加入多表进行查询,通常情况下与on方法同时使用 + +接收三个参数,第一个参数为连接方式(空、left、right、full),第二个参数为表名(不包含前缀),第三个参数为别名(当前表会自动将”this“作为别名)。 + +一般调用 +``` +$this->select(function ($model) { + $model->join('left', 'score', 's')->on('s.uid = this.id'); +}); +``` +同样也可以使用连贯操作 + +22. on +表字段连接关系 + +见join方法 + +#### 属性: +1. $table +指定当前模型的表名(优先于模型名称) + +``` +protected $table = 'users'; +``` + +2. $pk +指定当前模型的主键(如果不指定,程序将自动查询以当前模型命名的表的主键) + +``` +protected $pk = 'id'; +``` + +3. $map +指定传入数据的键与数据库字段名称的映射关系 + +``` +protected $map = [ + 'name' => 'username' +]; +``` + +4. $inReplace +入库时替换值 + +数据入库时自动格式化时间为unix时间戳 +``` +protected $inReplace = [ + 'create_time' => ['formatTime', true] +]; + +protected function formatTime($time) +{ + return strtotime($time); +} +``` +至此,在数据在被写入数据库之前会先调用inReplace中设定的函数、方法,并将return的值作为新的值写入数据库。 + +注意:当以字段为键名的数组的值为一个字符串时,则该字符串为即将调用的函数,如果值为一个数组,且无第二个值或第二个值为false、空,则该数组第一个值为即将调用的函数,如第二个值为true,则表示当前调用的方法存在于本类或父类中。 + +5. $outReplace +出库时替换值 + +``` +protected $outReplace = [ + 'sex' => ['outFormatSex', true] +]; + +protected function outFormatSex($sex) +{ + switch ($sex) { + case 1: + return '男'; + break; + case 2: + return '女'; + break; + default: + return '未知'; + } +} +``` + +注意:当以字段为键名的数组的值为一个字符串时,则该字符串为即将调用的函数,如果值为一个数组,且无第二个值或第二个值为false、空,则该数组第一个值为即将调用的函数,如第二个值为true,则表示当前调用的方法存在于本类或父类中。 + +6. $updateReplace +数据更新时替换值 + +基本类似于inReplace,但仅当执行更新操作时执行。 + +7. $validate +自动验证 + +验证不为空 +``` +protected $validate = [ + 'username' => ['notNull', '用户名不能为空'], +]; +``` +验证不等于 +``` +protected $validate = [ + 'username' => ['notEqual', '0', '用户名不能为0'], +]; +``` +多条件(用户名不为空且不为0) +``` +protected $validate = [ + 'username' => [ + ['notNull', '用户名不能为空'], + ['notEqual', '0', '用户名不能为0'], + ], +]; +``` +自定义函数验证,新建函数demo到函数库 +``` +function demo($name, $n1, $n2) +{ + if ($name == $n1 || $name == $n2) { + return false; + } + return true; +} +``` +添加到自动验证 +``` +protected $validate = [ + 'username' => [ + ['notNull', '用户名不能为空'], + ['notEqual', '0', '用户名不能为0'], + ['demo', 'TOP糯米', '张三', '用户名不能为TOP糯米或张三'], + ], +]; +``` + +### 调用模型 +调用模型有两种方式: +1. model函数(推荐) +model函数会返回一个模型的单例,使用方式与直接new无差别。 +``` +$object = model(模型); +``` +2. new 模型 +``` +$object = new 模型(); +``` + +## 模板 +### 模板继承 +模板继承通过extend标签与block标签配合使用实现。 +一个最简单的继承 +``` +// Base/layout.html(父级模板) + + + + + + Title + + + + + + +// Index/index.html + + + +

内容主体

+
+``` +### 模板标签 +内置一些常用标签 +1. php + +php标签。此标签为闭合标签,标签内的内容将被解析为原生php代码执行。 + +``` + + echo '你好'; + +``` + +2. if + +if标签。此标签为闭合标签,condition属性为if的条件,属性列表:condition。 + +``` + + // do something... + +``` + +3. else + +else标签。此标签为自闭合标签,可选属性condition,存在condition属性则被解析为elseif,属性列表:condition(可选)。 + +``` + + // do something... + + // do something... + + + + // do something... + + // do something... + +``` + +4. volist + +循环标签。此标签为闭合标签,属性列表:name、id、key(可选)。 + +``` + + {$item['id']} + + + + {$i}、{$item['id']} + +``` + +5. assign + +赋值标签,在模板中创建新的php变量。此标签为自闭合标签,属性列表:name、value。 + +``` + +``` + +6. raw + +该标签为闭合标签。raw标签中的内容不会被编译。 + +``` + + + {$item['id']} + + +``` +上例,volist标签会被原样输出。 + +7. 变量、函数输出 +``` +// 变量输出 +{$username} + +// 调用函数,左定界符后加上:表示调用函数 +{:mb_substr($username, 0, 3, 'utf8')} +``` + +### 自定义标签 +新建自定义标签库类文件/application/home/taglib/Extend.php,目录及文件名称没有要求。 +#### 闭合标签 +``` +namespace app\home\taglib; + +class Extend +{ + public $tags = [ + 'test' => ['attr' => 'start,length,id', 'close' => 1] + ]; + + public function _test($tag, $content) + { + $parse = ''; + $parse .= $content; + $parse .= ''; + return $parse; + } +} +``` +类创建完成后,到配置文件config.php的view下的tagLib中添加Extend类 +``` +'view' => [ + 'tagLib' => [ + \app\home\taglib\Extend::class + ] + ], +``` +添加完成后即可在模板中使用 +``` + + {$test} + +``` +#### 自闭合标签 +添加一个描述 +``` +'say' => ['attr' => 'what', 'close' => 0] +``` +新建_say方法 +``` +public function _say($tag) +{ + return ""; +} +``` +模板调用 +``` + +``` + +## 自定义路由 +路由配置文件位于 application 下,文件名:route.php +现有News控制器中的detail方法 +``` +public function detail($id) +{ + return [ + 'id' => (int) $id + ]; +} +``` +假设访问地址为: http://127.0.0.3/home/news/detail/id/1.html 。 +### 必须参数 +添加如下规则 +``` +'detail' => [ + '[id]', + 'home/news/detail' +] +``` +完成后,可使用 http://127.0.0.3/detail/1.html 访问到对应位置。 +### 可选参数 +修改detail方法 +``` +public function detail($id = 0) +{ + return [ + 'id' => (int) $id + ]; +} +``` +添加路由规则 +``` +'detail' => [ + '[:id]', + 'home/news/detail' +] +``` +完成后,可使用 http://127.0.0.3/detail.html 访问到对应位置,如果没传递id,则使用默认值。 +### 多个参数 +``` +'detail' => [ + '[id][:type]', + 'home/news/detail' +] +``` + +## 其他 +### Request类 +获取实例 +1. instance方法获取单例 +``` +Request::instance(); +``` +2. request函数获取单例 +``` +request(); +``` + +#### 供调用的方法 +1. isPost + +判断是否是POST请求 + +2. isGet + +判断是否是GET请求 + +3. isPut + +判断是否是PUT请求 + +4. isDelete + +判断是否是DELETE请求 + +5. isHead + +判断是否是HEAD请求 + +6. isPatch + +判断是否是PATCH请求 + +7. isOptions + +判断是否是OPTIONS请求 + +8. isAjax + +判断是否是AJAX请求 + +9. create + +创建一个HTTP请求 + +原型:create($url, $data = [], $header = []) + +第一个参数为请求的链接,第二个参数为将要POST的数据,第三个参数为指定Header参数 + +10. ip + +返回客户端IP地址 + +11. module + +当前请求的模型名称 + +12. classname + +当前请求的完整控制器名称 + +13. controller + +当前请求的不包含命名空间的控制器名称 + +14. method + +当前请求的方法名称 + +15. params + +当前请求所带的参数 + +16. get + +获取get数据 + +原型:get($name = '*', $except = [], $filter = 'filter') + +第一个参数为将要获取的变量名称(' * ' 为全部),第二个参数为过滤的变量,第三个参数为指定的过滤函数(可以为自定义函数名称或匿名函数)。 + +函数名称: +``` +request()->get('id', ['type'], 'filter'); +``` +匿名函数: +``` +request()->get('id', ['type'], function ($value) { + return (int) $value; +}); +``` + +17. post + +获取post数据 + +使用同get方法 + +18. except + +指定过滤的变量 + +取出全部get数据,但不包括type +``` +request()->except('type')->get(); +``` + +### 面向控制器的前置、后置方法(请求拦截) +创建application/home/filter/Auth.php测试文件 +``` +namespace app\home\filter; + +use top\middleware\ifs\MiddlewareIfs; + +class Auth implements MiddlewareIfs +{ + public function before() + { + return '拒绝请求'; + } + + public function after($data) + { + // TODO: Implement after() method. + } +} +``` +创建完成后,加入配置 +``` +'middleware' => [ + \app\home\filter\Auth::class +], +``` +现在,访问项目则会得到 ' 拒绝请求 ' 结果。仅当before方法return的值为true时,程序才会继续执行,否则return等效于控制器方法的return。 \ No newline at end of file diff --git a/application/home/config/config.php b/application/home/config/config.php deleted file mode 100644 index 15d1c08..0000000 --- a/application/home/config/config.php +++ /dev/null @@ -1,9 +0,0 @@ - [ - 'port' => 3306 - ], - 'middleware' => [ - \app\home\middleware\Test::class - ], -]; \ No newline at end of file diff --git a/application/home/config/index.html b/application/home/config/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/application/home/controller/Common.php b/application/home/controller/Common.php deleted file mode 100644 index 352bad6..0000000 --- a/application/home/controller/Common.php +++ /dev/null @@ -1,10 +0,0 @@ -view(); - return []; - } -} diff --git a/application/home/controller/index.html b/application/home/controller/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/application/home/functions.php b/application/home/functions.php deleted file mode 100644 index b3d9bbc..0000000 --- a/application/home/functions.php +++ /dev/null @@ -1 +0,0 @@ - 'user_type' - ]; - - protected $insertHandle = [ - '' => 'time', - '' => ['getIntTime', true] - ]; - - protected $updateHandle = [ - '' => ['getIntTime', true] - ]; - - // 出库 - protected $outHandle = [ - '' => [ - 1 => '一', - ] - ]; - - // 数据验证 - protected $validate = [ - '' => [ - ['notEqual', 0, 'tips'], - ['notNull', 'tips'] - ], - '' => ['notNull', 'tips'] - ]; - - /** - * 将字符串时间格式化为unix时间戳 - * @param $param - * @return false|int - */ - public function getIntTime($param) - { - return strtotime($param); - } - -} \ No newline at end of file diff --git a/application/home/model/Users.php b/application/home/model/Users.php deleted file mode 100644 index ce15f51..0000000 --- a/application/home/model/Users.php +++ /dev/null @@ -1,10 +0,0 @@ - ['attr' => 'what', 'close' => 0], - 'lists' => ['attr' => 'name', 'close' => 1] - ]; - - public function _say($tag) - { - return ''; - } - - public function _lists($tag, $content) - { - $parse = ""; - $parse .= $content; - $parse .= ""; - return $parse; - } - -} diff --git a/application/home/taglib/index.html b/application/home/taglib/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/application/home/view/Base/a.html b/application/home/view/Base/a.html deleted file mode 100644 index ba073a4..0000000 --- a/application/home/view/Base/a.html +++ /dev/null @@ -1,2 +0,0 @@ -a.html - \ No newline at end of file diff --git a/application/home/view/Base/b.html b/application/home/view/Base/b.html deleted file mode 100644 index a34cd0f..0000000 --- a/application/home/view/Base/b.html +++ /dev/null @@ -1 +0,0 @@ -b.html \ No newline at end of file diff --git a/application/home/view/Base/common.html b/application/home/view/Base/common.html deleted file mode 100644 index 2ef3515..0000000 --- a/application/home/view/Base/common.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Title - - -父级模板 - - - \ No newline at end of file diff --git a/application/home/view/Index/index.html b/application/home/view/Index/index.html deleted file mode 100644 index 0905015..0000000 --- a/application/home/view/Index/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - BODY - - - - {$a} - - {$b} - - - - {:date('Y-m-d H:i:s', time())} - - - cut - - content - - content - - content - - - - \ No newline at end of file diff --git a/application/home/view/index.html b/application/home/view/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/application/route.php b/application/route.php deleted file mode 100644 index bd83500..0000000 --- a/application/route.php +++ /dev/null @@ -1,17 +0,0 @@ - [ - null, - 'home/example/login' - ], - 'example-detail' => [ - '[id]', - 'home/example/detail' - ], - 'example' => [ - '[:type]', - 'home/example/index' - ], -]; \ No newline at end of file diff --git a/framework/config/config.php b/framework/config/config.php index c859d5e..033d71b 100644 --- a/framework/config/config.php +++ b/framework/config/config.php @@ -26,9 +26,7 @@ return [ ], 'view' => [ 'engine' => 'Top', - 'tagLib' => [ - \app\home\taglib\Extend::class - ], + 'tagLib' => [], 'ext' => 'html', 'dir' => '', 'cacheDir' => '', diff --git a/framework/create/create.php b/framework/create/create.php index e53d79f..9251eef 100644 --- a/framework/create/create.php +++ b/framework/create/create.php @@ -123,7 +123,7 @@ class Create { $file = $this->projectPath . '../route.php'; if (!file_exists($file)) { - if (!file_put_contents($file, file_get_contents($this->dir . 'route.tpl'))) { + if (!file_put_contents($file, file_get_contents($this->dir . 'tpl/route.tpl'))) { exit('-8'); } } diff --git a/framework/create/tpl/model/demo.tpl b/framework/create/tpl/model/demo.tpl index 2bc1361..780b72b 100644 --- a/framework/create/tpl/model/demo.tpl +++ b/framework/create/tpl/model/demo.tpl @@ -12,6 +12,6 @@ class Demo extends Model public function get() { - return 'Hello'; + return '模块{name}正在运行...'; } } diff --git a/framework/create/tpl/view/index.tpl b/framework/create/tpl/view/index.tpl index e0050d0..f1d584d 100644 --- a/framework/create/tpl/view/index.tpl +++ b/framework/create/tpl/view/index.tpl @@ -8,6 +8,8 @@ Document -{$hello} +

{$hello}

+
+

TOP-Framework

\ No newline at end of file diff --git a/framework/library/Database.php b/framework/library/Database.php index a40bc47..ab0bd39 100644 --- a/framework/library/Database.php +++ b/framework/library/Database.php @@ -231,7 +231,7 @@ class Database /** * 查询一条记录 * @param bool $param - * @return object + * @return mixed */ public function find($param = false) { @@ -246,7 +246,7 @@ class Database $this->where([$field => $param]); $result = self::$driver->find($this->table, $this->distinct, $this->field, $this->join, $this->on, $this->where, $this->order); $this->_reset(); - return (object)$result; + return $result; } /** @@ -269,7 +269,7 @@ class Database $result = self::$driver->select($this->table, $this->distinct, $this->field, $this->join, $this->on, $this->where, $this->order, $this->limit); $this->_reset(); foreach ($result as $k => $v) - $result[$k] = (object)$v; + $result[$k] = $v; return $result; } diff --git a/framework/library/Model.php b/framework/library/Model.php index e213ca7..d97d736 100644 --- a/framework/library/Model.php +++ b/framework/library/Model.php @@ -22,13 +22,13 @@ class Model protected $map = []; // insert值映射 - protected $insertHandle = []; + protected $inReplace = []; // update值映射 - protected $updateHandle = []; + protected $updateReplace = []; // 出库值映射 - protected $outHandle = []; + protected $outReplace = []; // 模型消息(请注意:在方法中赋值会覆盖掉数据验证的message) protected $message = ''; @@ -327,7 +327,8 @@ class Model return $mapData; } else { $data = []; - $tableDesc = $this->tableDesc(); + $prefix = Config::instance()->get('db')['prefix']; + $tableDesc = $this->tableDesc($prefix . $this->table); foreach ($tableDesc as $value) { if (array_key_exists($value['Field'], $mapData)) { // 如果表单值为空则赋值为数据库字段默认值 @@ -399,7 +400,7 @@ class Model */ private function inHandle($data) { - $replace = ($this->isInsert) ? $this->insertHandle : $this->updateHandle; + $replace = ($this->isInsert) ? $this->inReplace : $this->updateReplace; foreach ($replace as $key => $value) { $fieldValue = ''; if (!array_key_exists($key, $data)) { @@ -440,19 +441,15 @@ class Model */ private function outHandle($data) { - foreach ($this->outHandle as $key => $value) { + foreach ($this->outReplace as $key => $value) { if (count($data) == count($data, 1)) { if (array_key_exists($key, $data)) { - if (array_key_exists($data[$key], $value)) { - $data[$key] = $value[$data[$key]]; - } + $data[$key] = $this->callOutReplaceFunction($data[$key], $value); } } else { foreach ($data as $k => $v) { if (array_key_exists($key, $v)) { - if (array_key_exists($v[$key], $value)) { - $data[$k][$key] = $value[$v[$key]]; - } + $data[$k][$key] = $this->callOutReplaceFunction($data[$k][$key], $value); } } } @@ -460,6 +457,27 @@ class Model return $data; } + /** + * 调用函数、方法替换值 + * @param $value + * @param $function + * @return mixed + */ + private function callOutReplaceFunction($value, $function) + { + if (is_array($function) && (isset($function[1]) && $function[1] === true)) { + $value = $this->{$function[0]}($value); + } else { + if (is_array($function)) { + $function = $function[0]; + } + if (function_exists($function)) { + $value = $function($value); + } + } + return $value; + } + /** * 验证表单 * @param $data diff --git a/framework/library/functions/functions.php b/framework/library/functions/functions.php index 8ce8368..f2703f0 100644 --- a/framework/library/functions/functions.php +++ b/framework/library/functions/functions.php @@ -3,17 +3,16 @@ /** * 过滤数组 * @param array $array - * @param array $except * @param string $filter * @param array $result */ -function filterArray($array = [], $except = [], $filter = 'filter', &$result = []) +function filterArray($array = [], $filter = 'filter', &$result = []) { foreach ($array as $key => $value) { if (is_array($value)) { - $this->processArray($value, $result[$key]); + filterArray($value, $result[$key]); } else { - $result[$key] = (in_array($key, $except) || !$filter) ? $value : $filter($value); + $result[$key] = (!$filter) ? $value : $filter($value); } } } diff --git a/framework/library/http/Request.php b/framework/library/http/Request.php index 2abf492..201bc91 100644 --- a/framework/library/http/Request.php +++ b/framework/library/http/Request.php @@ -230,7 +230,7 @@ class Request public function except($field = null) { if (is_array($field)) { - $this->except = array_merge($field, $this->except); + $this->except = array_merge($this->except, $field); } elseif ($field) { $this->except[] = $field; } @@ -244,7 +244,7 @@ class Request * @param string $filter * @return null */ - public function get($name = null, $except = [], $filter = 'filter') + public function get($name = '*', $except = [], $filter = 'filter') { return $this->requestData('get', $name, $except, $filter); } @@ -256,7 +256,7 @@ class Request * @param string $filter * @return null */ - public function post($name = null, $except = [], $filter = 'filter') + public function post($name = '*', $except = [], $filter = 'filter') { return $this->requestData('post', $name, $except, $filter); } @@ -274,12 +274,11 @@ class Request $data = ($type == 'get') ? $_GET : $_POST; $name = ($name == '*') ? null : $name; - // 过滤数组 if (!is_array($except)) { - $except = [$except]; + $except = explode(',', $except); } - filterArray($data, $except, $filter, $data); + $this->except = array_merge($this->except, $except); // 移除指定的值 foreach ($this->except as $key => $value) { if (isset($data[$value])) { @@ -290,6 +289,8 @@ class Request // 重置except的值 $this->except = []; + filterArray($data, $filter, $data); + if ($name) { if (isset($data[$name])) { return $data[$name]; @@ -415,7 +416,7 @@ class Request $beforeReturnData = $object->{$beforeMethod}(); } - if ($beforeReturnData === null || $beforeReturnData === '') { + if ($beforeReturnData === null || $beforeReturnData === '' || $beforeReturnData === true) { $reflectionMethod = new \ReflectionMethod($ctrl, $method); $data = $reflectionMethod->invokeArgs($object, $params); diff --git a/framework/library/route/driver/Pathinfo.php b/framework/library/route/driver/Pathinfo.php index 6118ab5..31f76fd 100644 --- a/framework/library/route/driver/Pathinfo.php +++ b/framework/library/route/driver/Pathinfo.php @@ -127,7 +127,7 @@ class Pathinfo implements RouteIfs $params = []; for ($i = 0; $i < count($this->uriArray); $i = $i + 2) { if (isset($this->uriArray[$i + 1]) && $this->uriArray[$i + 1] != '') { - // $_GET[$this->uriArray[$i]] = $this->uriArray[$i + 1]; + $_GET[$this->uriArray[$i]] = $this->uriArray[$i + 1]; if (isset($paramNameArray[$this->uriArray[$i]])) { $params[$this->uriArray[$i]] = $this->uriArray[$i + 1]; } diff --git a/framework/library/template/driver/tags/Engine.php b/framework/library/template/driver/tags/Engine.php index 77a5fce..f7f1256 100644 --- a/framework/library/template/driver/tags/Engine.php +++ b/framework/library/template/driver/tags/Engine.php @@ -278,6 +278,10 @@ class Engine $attr = $item['attr'] ? $this->getAttr($node['start_str'], explode(',', $item['attr'])) : []; // 得到准备替换的值 $replace = explode($cut, $this->getTagParseResult($method, $attr, $cut)); + $replace = [ + (isset($replace[0])) ? $replace[0] : [], + (isset($replace[1])) ? $replace[1] : [], + ]; while ($startArray) { $begin = end($startArray); // 如果当前结束位置大于最后一个开始标签的位置,则跳过,直接去替换这个结束标签 diff --git a/public/resource/layer/index.html b/public/resource/layer/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/public/resource/layer/layer.js b/public/resource/layer/layer.js deleted file mode 100644 index 12cb6b5..0000000 --- a/public/resource/layer/layer.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */ - ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
'+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'
':"",'
'+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
'+e+"
"}():"")+(r.resize?'':"")+"
"],u,i('
')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
    '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
  • '+(t[0].content||"no content")+"
  • ";i'+(t[i].content||"no content")+"";return a}()+"
",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
'+(u.length>1?'':"")+'
'+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); \ No newline at end of file diff --git a/public/resource/layer/mobile/index.html b/public/resource/layer/mobile/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/public/resource/layer/mobile/layer.js b/public/resource/layer/mobile/layer.js deleted file mode 100644 index f9cf693..0000000 --- a/public/resource/layer/mobile/layer.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */ - ;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'

'+(e?n.title[0]:n.title)+"

":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e=''+n.btn[0]+"",2===t&&(e=''+n.btn[1]+""+e),'
'+e+"
"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='

'+(n.content||"")+"

"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"
':"")+'
"+l+'
'+n.content+"
"+c+"
",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;odiv{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} \ No newline at end of file diff --git a/public/resource/layer/theme/default/icon-ext.png b/public/resource/layer/theme/default/icon-ext.png deleted file mode 100644 index bbbb669..0000000 Binary files a/public/resource/layer/theme/default/icon-ext.png and /dev/null differ diff --git a/public/resource/layer/theme/default/icon.png b/public/resource/layer/theme/default/icon.png deleted file mode 100644 index 3e17da8..0000000 Binary files a/public/resource/layer/theme/default/icon.png and /dev/null differ diff --git a/public/resource/layer/theme/default/index.html b/public/resource/layer/theme/default/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/public/resource/layer/theme/default/layer.css b/public/resource/layer/theme/default/layer.css deleted file mode 100644 index 78f4959..0000000 --- a/public/resource/layer/theme/default/layer.css +++ /dev/null @@ -1 +0,0 @@ -.layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{/*padding:0 80px 0 20px;*/height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:13px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0; width: 100%; text-align: center;}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none; font-size: 12px;}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:12px;overflow-x:hidden;overflow-y:auto; color: #666666;}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} \ No newline at end of file diff --git a/public/resource/layer/theme/default/loading-0.gif b/public/resource/layer/theme/default/loading-0.gif deleted file mode 100644 index 6f3c953..0000000 Binary files a/public/resource/layer/theme/default/loading-0.gif and /dev/null differ diff --git a/public/resource/layer/theme/default/loading-1.gif b/public/resource/layer/theme/default/loading-1.gif deleted file mode 100644 index db3a483..0000000 Binary files a/public/resource/layer/theme/default/loading-1.gif and /dev/null differ diff --git a/public/resource/layer/theme/default/loading-2.gif b/public/resource/layer/theme/default/loading-2.gif deleted file mode 100644 index 5bb90fd..0000000 Binary files a/public/resource/layer/theme/default/loading-2.gif and /dev/null differ diff --git a/public/resource/layer/theme/index.html b/public/resource/layer/theme/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/public/resource/layer_mobile/index.html b/public/resource/layer_mobile/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/public/resource/layer_mobile/layer.js b/public/resource/layer_mobile/layer.js deleted file mode 100644 index 2eb3e28..0000000 --- a/public/resource/layer_mobile/layer.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! layer mobile-v2.0 弹层组件移动版 License LGPL http://layer.layui.com/mobile By 贤心 */ -;!function(a){"use strict";var b=document,c="querySelectorAll",d="getElementsByClassName",e=function(a){return b[c](a)},f={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},g={extend:function(a){var b=JSON.parse(JSON.stringify(f));for(var c in a)b[c]=a[c];return b},timer:{},end:{}};g.touch=function(a,b){a.addEventListener("click",function(a){b.call(this,a)},!1)};var h=0,i=["layui-m-layer"],j=function(a){var b=this;b.config=g.extend(a),b.view()};j.prototype.view=function(){var a=this,c=a.config,f=b.createElement("div");a.id=f.id=i[0]+h,f.setAttribute("class",i[0]+" "+i[0]+(c.type||0)),f.setAttribute("index",h);var g=function(){var a="object"==typeof c.title;return c.title?'

'+(a?c.title[0]:c.title)+"

":""}(),j=function(){"string"==typeof c.btn&&(c.btn=[c.btn]);var a,b=(c.btn||[]).length;return 0!==b&&c.btn?(a=''+c.btn[0]+"",2===b&&(a=''+c.btn[1]+""+a),'
'+a+"
"):""}();if(c.fixed||(c.top=c.hasOwnProperty("top")?c.top:100,c.style=c.style||"",c.style+=" top:"+(b.body.scrollTop+c.top)+"px"),2===c.type&&(c.content='

'+(c.content||"")+"

"),c.skin&&(c.anim="up"),"msg"===c.skin&&(c.shade=!1),f.innerHTML=(c.shade?"
':"")+'
"+g+'
'+c.content+"
"+j+"
",!c.type||2===c.type){var k=b[d](i[0]+c.type),l=k.length;l>=1&&layer.close(k[0].getAttribute("index"))}document.body.appendChild(f);var m=a.elem=e("#"+a.id)[0];c.success&&c.success(m),a.index=h++,a.action(c,m)},j.prototype.action=function(a,b){var c=this;a.time&&(g.timer[c.index]=setTimeout(function(){layer.close(c.index)},1e3*a.time));var e=function(){var b=this.getAttribute("type");0==b?(a.no&&a.no(),layer.close(c.index)):a.yes?a.yes(c.index):layer.close(c.index)};if(a.btn)for(var f=b[d]("layui-m-layerbtn")[0].children,h=f.length,i=0;h>i;i++)g.touch(f[i],e);if(a.shade&&a.shadeClose){var j=b[d]("layui-m-layershade")[0];g.touch(j,function(){layer.close(c.index,a.end)})}a.end&&(g.end[c.index]=a.end)},a.layer={v:"2.0",index:h,open:function(a){var b=new j(a||{});return b.index},close:function(a){var c=e("#"+i[0]+a)[0];c&&(c.innerHTML="",b.body.removeChild(c),clearTimeout(g.timer[a]),delete g.timer[a],"function"==typeof g.end[a]&&g.end[a](),delete g.end[a])},closeAll:function(){for(var a=b[d](i[0]),c=0,e=a.length;e>c;c++)layer.close(0|a[0].getAttribute("index"))}},"function"==typeof define?define(function(){return layer}):function(){var a=document.scripts,c=a[a.length-1],d=c.src,e=d.substring(0,d.lastIndexOf("/")+1);c.getAttribute("merge")||document.head.appendChild(function(){var a=b.createElement("link");return a.href=e+"need/layer.css?2.0",a.type="text/css",a.rel="styleSheet",a.id="layermcss",a}())}()}(window); \ No newline at end of file diff --git a/public/resource/layer_mobile/need/index.html b/public/resource/layer_mobile/need/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/public/resource/layer_mobile/need/layer.css b/public/resource/layer_mobile/need/layer.css deleted file mode 100644 index b9dbf20..0000000 --- a/public/resource/layer_mobile/need/layer.css +++ /dev/null @@ -1 +0,0 @@ -.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} \ No newline at end of file diff --git a/public/runtime/compile/application/home/8b6903ea105d9a35bb03114244786eb8.php b/public/runtime/compile/application/home/8b6903ea105d9a35bb03114244786eb8.php deleted file mode 100644 index 04c8706..0000000 --- a/public/runtime/compile/application/home/8b6903ea105d9a35bb03114244786eb8.php +++ /dev/null @@ -1,34 +0,0 @@ - - - - - Title - - -父级模板 - - BODY - - - - {$a} - - {$b} - - - - - a.html -b.html - - cut - - content - - content - - content - - - - \ No newline at end of file diff --git a/public/runtime/session/sess_an31i19gctv7qc8ehmhm25qihh b/public/runtime/session/sess_an31i19gctv7qc8ehmhm25qihh deleted file mode 100644 index e69de29..0000000