测试发布版
This commit is contained in:
parent
b8cabb072b
commit
49bd26b8f2
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
/.idea
|
/.idea
|
||||||
/.vscode
|
/.vscode
|
||||||
*.log
|
*.log
|
||||||
|
*.sql
|
||||||
.env
|
.env
|
@ -53,5 +53,15 @@ class Login
|
|||||||
return View::fetch('reg');
|
return View::fetch('reg');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//忘记密码
|
||||||
|
public function forget()
|
||||||
|
{
|
||||||
|
if(Session::has('admin_id')){
|
||||||
|
return redirect('/admin/index/index');
|
||||||
|
}
|
||||||
|
|
||||||
|
return View::fetch('forget');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -255,10 +255,10 @@ class Article extends BaseController
|
|||||||
{
|
{
|
||||||
$file = request()->file('file');
|
$file = request()->file('file');
|
||||||
try {
|
try {
|
||||||
validate(['image'=>'filesize:2048|fileExt:jpg,png,gif'])
|
validate(['file'=>'fileSize:2048|fileExt:jpg,png,gif'])
|
||||||
->check(array($file));
|
->check(array($file));
|
||||||
$savename = \think\facade\Filesystem::disk('public')->putFile('article_pic',$file);
|
$savename = \think\facade\Filesystem::disk('public')->putFile('article_pic',$file);
|
||||||
} catch (think\exception\ValidateException $e) {
|
} catch (ValidateException $e) {
|
||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
$upload = Config::get('filesystem.disks.public.url');
|
$upload = Config::get('filesystem.disks.public.url');
|
||||||
|
@ -8,11 +8,11 @@ return [
|
|||||||
// 服务器地址
|
// 服务器地址
|
||||||
'hostname' => '127.0.0.1',
|
'hostname' => '127.0.0.1',
|
||||||
// 数据库名
|
// 数据库名
|
||||||
'database' => 'taotest',
|
'database' => '',
|
||||||
// 用户名
|
// 用户名
|
||||||
'username' => 'root',
|
'username' => '',
|
||||||
// 密码
|
// 密码
|
||||||
'password' => 'root',
|
'password' => '',
|
||||||
// 端口
|
// 端口
|
||||||
'hostport' => '3306',
|
'hostport' => '3306',
|
||||||
// 数据库连接参数
|
// 数据库连接参数
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
//验证码位数
|
//验证码位数
|
||||||
'length' => 6,
|
'length' => 5,
|
||||||
// 验证码字符集合
|
// 验证码字符集合
|
||||||
'codeSet' => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY',
|
'codeSet' => '2345678abcdefhijkmnpqrstuvwxyzABCDEFGHJKLMNPQRTUVWXY',
|
||||||
// 验证码过期时间
|
// 验证码过期时间
|
||||||
@ -35,6 +35,6 @@ return [
|
|||||||
|
|
||||||
// 添加额外的验证码设置
|
// 添加额外的验证码设置
|
||||||
verify => [
|
verify => [
|
||||||
'length'=>6,
|
'length'=>'',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -1,63 +0,0 @@
|
|||||||
<?php
|
|
||||||
use think\facade\Env;
|
|
||||||
|
|
||||||
return [
|
|
||||||
// 默认使用的数据库连接配置
|
|
||||||
'default' => Env::get('database.driver', 'mysql'),
|
|
||||||
|
|
||||||
// 自定义时间查询规则
|
|
||||||
'time_query_rule' => [],
|
|
||||||
|
|
||||||
// 自动写入时间戳字段
|
|
||||||
// true为自动识别类型 false关闭
|
|
||||||
// 字符串则明确指定时间字段类型 支持 int timestamp datetime date
|
|
||||||
'auto_timestamp' => true,
|
|
||||||
|
|
||||||
// 时间字段取出后的默认时间格式
|
|
||||||
'datetime_format' => 'Y-m-d H:i:s',
|
|
||||||
|
|
||||||
// 数据库连接配置信息
|
|
||||||
'connections' => [
|
|
||||||
'mysql' => [
|
|
||||||
// 数据库类型
|
|
||||||
'type' => Env::get('database.type', 'mysql'),
|
|
||||||
// 服务器地址
|
|
||||||
'hostname' => Env::get('database.hostname', '127.0.0.1'),
|
|
||||||
// 数据库名
|
|
||||||
'database' => Env::get('database.database', ''),
|
|
||||||
// 用户名
|
|
||||||
'username' => Env::get('database.username', 'root'),
|
|
||||||
// 密码
|
|
||||||
'password' => Env::get('database.password', ''),
|
|
||||||
// 端口
|
|
||||||
'hostport' => Env::get('database.hostport', '3306'),
|
|
||||||
// 数据库连接参数
|
|
||||||
'params' => [],
|
|
||||||
// 数据库编码默认采用utf8
|
|
||||||
'charset' => Env::get('database.charset', 'utf8'),
|
|
||||||
// 数据库表前缀
|
|
||||||
'prefix' => Env::get('database.prefix', ''),
|
|
||||||
|
|
||||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
|
||||||
'deploy' => 0,
|
|
||||||
// 数据库读写是否分离 主从式有效
|
|
||||||
'rw_separate' => false,
|
|
||||||
// 读写分离后 主服务器数量
|
|
||||||
'master_num' => 1,
|
|
||||||
// 指定从服务器序号
|
|
||||||
'slave_no' => '',
|
|
||||||
// 是否严格检查字段是否存在
|
|
||||||
'fields_strict' => true,
|
|
||||||
// 是否需要断线重连
|
|
||||||
'break_reconnect' => false,
|
|
||||||
// 监听SQL
|
|
||||||
'trigger_sql' => true,
|
|
||||||
// 开启字段缓存
|
|
||||||
'fields_cache' => false,
|
|
||||||
// 字段缓存路径
|
|
||||||
'schema_cache_path' => app()->getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR,
|
|
||||||
],
|
|
||||||
|
|
||||||
// 更多的数据库配置信息
|
|
||||||
],
|
|
||||||
];
|
|
@ -16,11 +16,11 @@ return [
|
|||||||
// 服务器地址
|
// 服务器地址
|
||||||
'hostname' => '127.0.0.1',
|
'hostname' => '127.0.0.1',
|
||||||
// 数据库名
|
// 数据库名
|
||||||
'database' => 'taotao',
|
'database' => '',
|
||||||
// 用户名
|
// 用户名
|
||||||
'username' => 'root',
|
'username' => '',
|
||||||
// 密码
|
// 密码
|
||||||
'password' => 'root',
|
'password' => '',
|
||||||
// 端口
|
// 端口
|
||||||
'hostport' => '3306',
|
'hostport' => '3306',
|
||||||
// 数据库连接参数
|
// 数据库连接参数
|
||||||
|
@ -62,21 +62,20 @@ layui.define(['form', 'upload'], function(exports){
|
|||||||
,data: obj.field
|
,data: obj.field
|
||||||
,success: function(data){
|
,success: function(data){
|
||||||
if (data.code == 0) {
|
if (data.code == 0) {
|
||||||
layer.close(loading);
|
layer.close(loading);
|
||||||
layer.msg(data.msg,{
|
layer.msg(data.msg,{
|
||||||
icon:6,
|
icon:6,
|
||||||
time:2000
|
time:2000
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
layer.close(loading);
|
layer.close(loading);
|
||||||
layer.open({
|
layer.open({
|
||||||
tiele:'设置失败',
|
tiele:'设置失败',
|
||||||
content:data.msg,
|
content:data.msg,
|
||||||
icon:5,
|
icon:5,
|
||||||
anim:6
|
anim:6
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ layui.define(['table', 'form'], function(exports){
|
|||||||
,{field: 'status', title:'权限状态', templet: '#buttonAuth', minWidth: 80, align: 'center'}
|
,{field: 'status', title:'权限状态', templet: '#buttonAuth', minWidth: 80, align: 'center'}
|
||||||
,{field: 'level', title: '层级',width: 40}
|
,{field: 'level', title: '层级',width: 40}
|
||||||
,{field: 'ishidden', title: '菜单',templet: '#menu', Width: 40}
|
,{field: 'ishidden', title: '菜单',templet: '#menu', Width: 40}
|
||||||
,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-useradmin-admin'}
|
,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#table-authrule-edit'}
|
||||||
]]
|
]]
|
||||||
,text: '对不起,加载出现异常!'
|
,text: '对不起,加载出现异常!'
|
||||||
});
|
});
|
||||||
|
@ -165,7 +165,7 @@ layui.define(['layer', 'laytpl', 'form', 'element', 'upload', 'util'], function(
|
|||||||
//执行上传实例
|
//执行上传实例
|
||||||
upload.render({
|
upload.render({
|
||||||
elem: '#uploadImg'
|
elem: '#uploadImg'
|
||||||
,url: '/article/text_img_upload'
|
,url: '/index/article/text_img_upload'
|
||||||
,size: 1024
|
,size: 1024
|
||||||
,done: function(res){
|
,done: function(res){
|
||||||
if(res.status == 0){
|
if(res.status == 0){
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 87 KiB |
Binary file not shown.
After Width: | Height: | Size: 87 KiB |
Binary file not shown.
After Width: | Height: | Size: 55 KiB |
16
vendor/composer/installed.json
vendored
16
vendor/composer/installed.json
vendored
@ -728,12 +728,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/framework.git",
|
"url": "https://github.com/top-think/framework.git",
|
||||||
"reference": "d4f1ba2b77a88fd55f392b73a7a183844cdc081b"
|
"reference": "e7fa18eebf3092c9abf34c79310eca4d17c78cbd"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/framework/zipball/d4f1ba2b77a88fd55f392b73a7a183844cdc081b",
|
"url": "https://api.github.com/repos/top-think/framework/zipball/e7fa18eebf3092c9abf34c79310eca4d17c78cbd",
|
||||||
"reference": "d4f1ba2b77a88fd55f392b73a7a183844cdc081b",
|
"reference": "e7fa18eebf3092c9abf34c79310eca4d17c78cbd",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -760,7 +760,7 @@
|
|||||||
"mockery/mockery": "^1.2",
|
"mockery/mockery": "^1.2",
|
||||||
"phpunit/phpunit": "^7.0"
|
"phpunit/phpunit": "^7.0"
|
||||||
},
|
},
|
||||||
"time": "2020-01-07T08:17:04+00:00",
|
"time": "2020-01-11T06:53:35+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -954,12 +954,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/think-orm.git",
|
"url": "https://github.com/top-think/think-orm.git",
|
||||||
"reference": "9caecd97608c937059fc09550b41af2557471d35"
|
"reference": "d6965dfae21f150e29cc899ab6f9b1bd2c0f2ee4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/9caecd97608c937059fc09550b41af2557471d35",
|
"url": "https://api.github.com/repos/top-think/think-orm/zipball/d6965dfae21f150e29cc899ab6f9b1bd2c0f2ee4",
|
||||||
"reference": "9caecd97608c937059fc09550b41af2557471d35",
|
"reference": "d6965dfae21f150e29cc899ab6f9b1bd2c0f2ee4",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -975,7 +975,7 @@
|
|||||||
"psr/simple-cache": "^1.0",
|
"psr/simple-cache": "^1.0",
|
||||||
"topthink/think-helper": "^3.1"
|
"topthink/think-helper": "^3.1"
|
||||||
},
|
},
|
||||||
"time": "2020-01-04T04:00:06+00:00",
|
"time": "2020-01-07T10:05:10+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-01-07 16:53:20
|
// This file is automatically generated at:2020-01-11 15:06:36
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\captcha\\CaptchaService',
|
0 => 'think\\captcha\\CaptchaService',
|
||||||
|
@ -66,7 +66,7 @@ class Middleware
|
|||||||
{
|
{
|
||||||
$middleware = $this->buildMiddleware($middleware, $type);
|
$middleware = $this->buildMiddleware($middleware, $type);
|
||||||
|
|
||||||
if ($middleware) {
|
if (!empty($middleware)) {
|
||||||
$this->queue[$type][] = $middleware;
|
$this->queue[$type][] = $middleware;
|
||||||
$this->queue[$type] = array_unique($this->queue[$type], SORT_REGULAR);
|
$this->queue[$type] = array_unique($this->queue[$type], SORT_REGULAR);
|
||||||
}
|
}
|
||||||
@ -135,11 +135,11 @@ class Middleware
|
|||||||
return (new Pipeline())
|
return (new Pipeline())
|
||||||
->through(array_map(function ($middleware) {
|
->through(array_map(function ($middleware) {
|
||||||
return function ($request, $next) use ($middleware) {
|
return function ($request, $next) use ($middleware) {
|
||||||
[$call, $param] = $middleware;
|
[$call, $params] = $middleware;
|
||||||
if (is_array($call) && is_string($call[0])) {
|
if (is_array($call) && is_string($call[0])) {
|
||||||
$call = [$this->app->make($call[0]), $call[1]];
|
$call = [$this->app->make($call[0]), $call[1]];
|
||||||
}
|
}
|
||||||
$response = call_user_func($call, $request, $next, $param);
|
$response = call_user_func($call, $request, $next, ...$params);
|
||||||
|
|
||||||
if (!$response instanceof Response) {
|
if (!$response instanceof Response) {
|
||||||
throw new LogicException('The middleware must return Response instance');
|
throw new LogicException('The middleware must return Response instance');
|
||||||
@ -182,9 +182,7 @@ class Middleware
|
|||||||
|
|
||||||
$handler->report($e);
|
$handler->report($e);
|
||||||
|
|
||||||
$response = $handler->render($passable, $e);
|
return $handler->render($passable, $e);
|
||||||
|
|
||||||
return $response;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -197,11 +195,11 @@ class Middleware
|
|||||||
protected function buildMiddleware($middleware, string $type): array
|
protected function buildMiddleware($middleware, string $type): array
|
||||||
{
|
{
|
||||||
if (is_array($middleware)) {
|
if (is_array($middleware)) {
|
||||||
[$middleware, $param] = $middleware;
|
[$middleware, $params] = $middleware;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($middleware instanceof Closure) {
|
if ($middleware instanceof Closure) {
|
||||||
return [$middleware, $param ?? null];
|
return [$middleware, $params ?? []];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_string($middleware)) {
|
if (!is_string($middleware)) {
|
||||||
@ -220,7 +218,7 @@ class Middleware
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [[$middleware, 'handle'], $param ?? null];
|
return [[$middleware, 'handle'], $params ?? []];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -131,7 +131,7 @@ class Validate
|
|||||||
'chsAlphaNum' => '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9]+$/u',
|
'chsAlphaNum' => '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9]+$/u',
|
||||||
'chsDash' => '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9\_\-]+$/u',
|
'chsDash' => '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9\_\-]+$/u',
|
||||||
'mobile' => '/^1[3-9]\d{9}$/',
|
'mobile' => '/^1[3-9]\d{9}$/',
|
||||||
'idCard' => '/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/',
|
'idCard' => '/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/',
|
||||||
'zip' => '/\d{6}/',
|
'zip' => '/\d{6}/',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -387,17 +387,17 @@ abstract class Rule
|
|||||||
/**
|
/**
|
||||||
* 指定路由中间件
|
* 指定路由中间件
|
||||||
* @access public
|
* @access public
|
||||||
* @param string|array|Closure $middleware 中间件
|
* @param string|array|Closure $middleware 中间件
|
||||||
* @param mixed $param 参数
|
* @param mixed $params 参数
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function middleware($middleware, $param = null)
|
public function middleware($middleware, ...$params)
|
||||||
{
|
{
|
||||||
if (is_null($param) && is_array($middleware)) {
|
if (empty($params) && is_array($middleware)) {
|
||||||
$this->option['middleware'] = $middleware;
|
$this->option['middleware'] = $middleware;
|
||||||
} else {
|
} else {
|
||||||
foreach ((array) $middleware as $item) {
|
foreach ((array) $middleware as $item) {
|
||||||
$this->option['middleware'][] = [$item, $param];
|
$this->option['middleware'][] = [$item, $params];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ class Store
|
|||||||
*/
|
*/
|
||||||
public function setId($id = null): void
|
public function setId($id = null): void
|
||||||
{
|
{
|
||||||
$this->id = is_string($id) && strlen($id) === 32 ? $id : md5(microtime(true) . session_create_id());
|
$this->id = is_string($id) && strlen($id) === 32 && ctype_alnum($id) ? $id : md5(microtime(true) . session_create_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -119,8 +119,8 @@ class CacheTest extends TestCase
|
|||||||
$redis->shouldReceive("set")->once()->with('foo', 5)->andReturnTrue();
|
$redis->shouldReceive("set")->once()->with('foo', 5)->andReturnTrue();
|
||||||
$redis->shouldReceive("incrby")->once()->with('foo', 1)->andReturnTrue();
|
$redis->shouldReceive("incrby")->once()->with('foo', 1)->andReturnTrue();
|
||||||
$redis->shouldReceive("decrby")->once()->with('foo', 2)->andReturnTrue();
|
$redis->shouldReceive("decrby")->once()->with('foo', 2)->andReturnTrue();
|
||||||
$redis->shouldReceive("get")->once()->with('foo')->andReturn(6);
|
$redis->shouldReceive("get")->once()->with('foo')->andReturn('6');
|
||||||
$redis->shouldReceive("get")->once()->with('foo')->andReturn(4);
|
$redis->shouldReceive("get")->once()->with('foo')->andReturn('4');
|
||||||
$redis->shouldReceive("set")->once()->with('bar', serialize(true))->andReturnTrue();
|
$redis->shouldReceive("set")->once()->with('bar', serialize(true))->andReturnTrue();
|
||||||
$redis->shouldReceive("set")->once()->with('baz', serialize(null))->andReturnTrue();
|
$redis->shouldReceive("set")->once()->with('baz', serialize(null))->andReturnTrue();
|
||||||
$redis->shouldReceive("del")->once()->with('baz')->andReturnTrue();
|
$redis->shouldReceive("del")->once()->with('baz')->andReturnTrue();
|
||||||
|
12
vendor/topthink/think-orm/src/db/BaseQuery.php
vendored
12
vendor/topthink/think-orm/src/db/BaseQuery.php
vendored
@ -829,6 +829,18 @@ abstract class BaseQuery
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置自增序列名
|
||||||
|
* @access public
|
||||||
|
* @param string $sequence 自增序列名
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function sequence(string $sequence = null)
|
||||||
|
{
|
||||||
|
$this->options['sequence'] = $sequence;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置JSON字段信息
|
* 设置JSON字段信息
|
||||||
* @access public
|
* @access public
|
||||||
|
12
vendor/topthink/think-orm/src/db/Query.php
vendored
12
vendor/topthink/think-orm/src/db/Query.php
vendored
@ -228,18 +228,6 @@ class Query extends BaseQuery
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置自增序列名
|
|
||||||
* @access public
|
|
||||||
* @param string $sequence 自增序列名
|
|
||||||
* @return $this
|
|
||||||
*/
|
|
||||||
public function sequence(string $sequence = null)
|
|
||||||
{
|
|
||||||
$this->options['sequence'] = $sequence;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 指定强制索引
|
* 指定强制索引
|
||||||
* @access public
|
* @access public
|
||||||
|
@ -61,15 +61,15 @@
|
|||||||
</script>
|
</script>
|
||||||
-->
|
-->
|
||||||
<script type="text/html" id="buttonTpl">
|
<script type="text/html" id="buttonTpl">
|
||||||
{{# if(d.role == '1'){ }}
|
{{# if(d.id == '1'){ }}
|
||||||
<input type="checkbox" name="admincheck" lay-skin="switch" disabled lay-text="已审核|未审核" value="1" checked id="{{d.id}}">
|
<input type="checkbox" name="check" lay-skin="switch" disabled lay-text="已审核|未审核" value="1" checked id="{{d.id}}">
|
||||||
{{# } else { }}
|
{{# } else { }}
|
||||||
{if condition="checkRuleButton('admin/admin/check')"}<input type="checkbox" name="admincheck" lay-skin="switch" lay-filter="admincheck" lay-text="已审核|未审核" {{# if(d.check == 1){ }} checked {{# } }} id="{{d.id}}" >{else}<button class="layui-btn layui-btn-xs layui-btn-radius layui-btn-disabled">无审核权</button>{/if}
|
{if condition="checkRuleButton('admin/admin/check')"}<input type="checkbox" name="check" lay-skin="switch" lay-filter="admincheck" lay-text="已审核|未审核" {{# if(d.check == 1){ }} checked {{# } }} id="{{d.id}}" >{else}<button class="layui-btn layui-btn-xs layui-btn-radius layui-btn-disabled">无审核权</button>{/if}
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="table-useradmin-admin">
|
<script type="text/html" id="table-useradmin-admin">
|
||||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
|
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||||
{{# if(d.role == '1'){ }}
|
{{# if(d.id == '1'){ }}
|
||||||
<a class="layui-btn layui-btn-disabled layui-btn-xs"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
<a class="layui-btn layui-btn-disabled layui-btn-xs"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
||||||
{{# } else { }}
|
{{# } else { }}
|
||||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
||||||
|
@ -3,56 +3,14 @@
|
|||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="layui-fluid">
|
<div class="layui-fluid">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
<div class="layui-card-header">权限菜单</div>
|
||||||
<div class="layui-form-item">
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">登录名</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="text" name="loginname" placeholder="请输入" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">手机</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="text" name="telphone" placeholder="请输入" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">邮箱</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="text" name="email" placeholder="请输入" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<label class="layui-form-label">角色</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<select name="role">
|
|
||||||
<option value="0">管理员</option>
|
|
||||||
<option value="1">超级管理员</option>
|
|
||||||
<option value="2">纠错员</option>
|
|
||||||
<option value="3">采购员</option>
|
|
||||||
<option value="4">推销员</option>
|
|
||||||
<option value="5">运营人员</option>
|
|
||||||
<option value="6">编辑</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-inline">
|
|
||||||
<button class="layui-btn layuiadmin-btn-admin" lay-submit lay-filter="LAY-user-back-search">
|
|
||||||
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<div style="padding-bottom: 10px;">
|
<div style="padding-bottom: 10px;">
|
||||||
<button class="layui-btn layuiadmin-btn-admin" data-type="batchdel">删除</button>
|
<button class="layui-btn layuiadmin-btn-admin" data-type="batchdel">删除</button>
|
||||||
<button class="layui-btn layuiadmin-btn-admin" data-type="add">添加</button>
|
<button class="layui-btn layuiadmin-btn-admin" data-type="add">添加</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table id="LAY-user-auth-rule" lay-filter="LAY-user-auth-rule"></table>
|
<table id="LAY-user-auth-rule" lay-filter="LAY-user-auth-rule"></table>
|
||||||
|
|
||||||
<script type="text/html" id="rules-sort">
|
<script type="text/html" id="rules-sort">
|
||||||
<div class="layui-input-inline" style="width: 30px; high: 30">
|
<div class="layui-input-inline" style="width: 30px; high: 30">
|
||||||
<input type="text" name="sort" autocomplete="off" placeholder="排序" dataid="{{d.id}}" class="layui-input" value="{{d.sort}}">
|
<input type="text" name="sort" autocomplete="off" placeholder="排序" dataid="{{d.id}}" class="layui-input" value="{{d.sort}}">
|
||||||
@ -61,11 +19,9 @@
|
|||||||
<script type="text/html" id="rules-title">
|
<script type="text/html" id="rules-title">
|
||||||
<span >{{# if(d.level !==1){ }}|{{# } }} {{d.title}}</span>
|
<span >{{# if(d.level !==1){ }}|{{# } }} {{d.title}}</span>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="buttonAuth">
|
<script type="text/html" id="buttonAuth">
|
||||||
{if condition="checkRuleButton('admin/authrule/check')"}<input type="checkbox" name="status" lay-skin="switch" lay-filter="authcheck" lay-text="开启|关闭" {{# if(d.status == 1){ }} checked {{# } }} id="{{d.id}}" >{else}<button class="layui-btn layui-btn-xs layui-btn-radius layui-btn-disabled">无权限</button>{/if}
|
{if condition="checkRuleButton('admin/authrule/check')"}<input type="checkbox" name="status" lay-skin="switch" lay-filter="authcheck" lay-text="开启|关闭" {{# if(d.status == 1){ }} checked {{# } }} id="{{d.id}}" >{else}<button class="layui-btn layui-btn-xs layui-btn-radius layui-btn-disabled">无权限</button>{/if}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="menu">
|
<script type="text/html" id="menu">
|
||||||
{{# if(d.id == '1' | d.id == '2' | d.id == '9' | d.id == '10' ){ }}
|
{{# if(d.id == '1' | d.id == '2' | d.id == '9' | d.id == '10' ){ }}
|
||||||
<input type="checkbox" name="ishidden" lay-skin="primary" checked disabled >
|
<input type="checkbox" name="ishidden" lay-skin="primary" checked disabled >
|
||||||
@ -73,10 +29,9 @@
|
|||||||
{if condition="checkRuleButton('admin/authrule/menushow')"}<input type="checkbox" name="ishidden" lay-skin="primary" lay-filter="menu-show" {{# if(d.ishidden ==1){ }}checked value="0"{{# } else { }}value="1"{{# } }} id="{{d.id}}" >{else}<button class="layui-btn layui-btn-xs layui-btn-disabled">没有权限</button>{/if}
|
{if condition="checkRuleButton('admin/authrule/menushow')"}<input type="checkbox" name="ishidden" lay-skin="primary" lay-filter="menu-show" {{# if(d.ishidden ==1){ }}checked value="0"{{# } else { }}value="1"{{# } }} id="{{d.id}}" >{else}<button class="layui-btn layui-btn-xs layui-btn-disabled">没有权限</button>{/if}
|
||||||
{{# } }}
|
{{# } }}
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/html" id="table-authrule-edit">
|
||||||
<script type="text/html" id="table-useradmin-admin">
|
|
||||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
|
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||||
{{# if(d.role == '1'){ }}
|
{{# if(d.id == '1' | d.id == '2' | d.id == '9' | d.id == '10' ){ }}
|
||||||
<a class="layui-btn layui-btn-disabled layui-btn-xs"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
<a class="layui-btn layui-btn-disabled layui-btn-xs"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
||||||
{{# } else { }}
|
{{# } else { }}
|
||||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
||||||
@ -97,7 +52,7 @@
|
|||||||
console.log(id);
|
console.log(id);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:"{:url('admin/authrule/sort')}",
|
url:"{:url('admin/AuthRule/sort')}",
|
||||||
data:{id:id,sort:sort},
|
data:{id:id,sort:sort},
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
success:function(data){
|
success:function(data){
|
||||||
@ -190,7 +145,7 @@
|
|||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
url:"/admin/AuthRule/Check",
|
url:"/admin/AuthRule/check",
|
||||||
data:{id:data.id,status:data.value,},
|
data:{id:data.id,status:data.value,},
|
||||||
dataType:'json',
|
dataType:'json',
|
||||||
success:function(data){
|
success:function(data){
|
||||||
@ -199,7 +154,7 @@
|
|||||||
icon:6,
|
icon:6,
|
||||||
time:2000
|
time:2000
|
||||||
}
|
}
|
||||||
,function(){location.reload();}
|
//,function(){location.reload();}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
layer.open({
|
layer.open({
|
||||||
@ -265,7 +220,6 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||||
var field = data.field; //获取提交的字段
|
var field = data.field; //获取提交的字段
|
||||||
//console.log(field);
|
|
||||||
|
|
||||||
//提交 Ajax 成功后,静态更新表格中的数据
|
//提交 Ajax 成功后,静态更新表格中的数据
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -94,13 +94,12 @@ layui.use(['layer','table','form','laydate'], function(){
|
|||||||
//监听提交
|
//监听提交
|
||||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||||
var field = data.field; //获取提交的字段
|
var field = data.field; //获取提交的字段
|
||||||
console.log(field);
|
|
||||||
|
|
||||||
//提交 Ajax 成功后,静态更新表格中的数据
|
//提交 Ajax 成功后,静态更新表格中的数据
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"post",
|
||||||
url:"{:url('admin/KeyAuth/add')}",
|
url:"{:url('admin/KeyAuth/add')}",
|
||||||
data:{"vuser":field.user,"domain":field.domain,"auth_level":field.auth_level,"end_time":field.end_time,"status":field.status},
|
data:{"user":field.user,"domain":field.domain,"auth_level":field.auth_level,"end_time":field.end_time,"status":field.status},
|
||||||
daType:"json",
|
daType:"json",
|
||||||
success:function (data){
|
success:function (data){
|
||||||
if (data.code == 1) {
|
if (data.code == 1) {
|
||||||
@ -144,7 +143,6 @@ layui.use(['layer','table','form','laydate'], function(){
|
|||||||
//监听提交
|
//监听提交
|
||||||
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
|
||||||
var field = data.field; //获取提交的字段
|
var field = data.field; //获取提交的字段
|
||||||
console.log(field);
|
|
||||||
|
|
||||||
//提交 Ajax 成功后,静态更新表格中的数据
|
//提交 Ajax 成功后,静态更新表格中的数据
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -177,7 +175,7 @@ layui.use(['layer','table','form','laydate'], function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//删除幻灯
|
//删除授权
|
||||||
$('a[lay-event=del]').on('click', function(){
|
$('a[lay-event=del]').on('click', function(){
|
||||||
var id = $(this).attr('id-data');
|
var id = $(this).attr('id-data');
|
||||||
layer.confirm('确定删除?', {icon: 3, title:'删除版本'}, function(index){
|
layer.confirm('确定删除?', {icon: 3, title:'删除版本'}, function(index){
|
||||||
|
@ -1,17 +1,9 @@
|
|||||||
|
{extend name="public/base" /}
|
||||||
|
|
||||||
|
{block name="title"}忘记密码 - TaoLer{/block}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
{block name="css"}<link rel="stylesheet" href="/static/admin/style/login.css" media="all">{/block}
|
||||||
<html>
|
{block name="body"}
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>忘记密码 - layuiAdmin</title>
|
|
||||||
<meta name="renderer" content="webkit">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
||||||
<link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
|
|
||||||
<link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
|
|
||||||
<link rel="stylesheet" href="../../layuiadmin/style/login.css" media="all">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
|
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
|
||||||
<div class="layadmin-user-login-main">
|
<div class="layadmin-user-login-main">
|
||||||
@ -85,8 +77,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{/block}
|
||||||
|
|
||||||
<script src="../../layuiadmin/layui/layui.js"></script>
|
{block name="js"}
|
||||||
<script>
|
<script>
|
||||||
layui.config({
|
layui.config({
|
||||||
base: '../../layuiadmin/' //静态资源所在路径
|
base: '../../layuiadmin/' //静态资源所在路径
|
||||||
@ -147,5 +140,4 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
{/block}
|
||||||
</html>
|
|
@ -34,7 +34,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item" style="margin-bottom: 20px;">
|
<div class="layui-form-item" style="margin-bottom: 20px;">
|
||||||
<input type="checkbox" name="remember" lay-skin="primary" title="记住密码">
|
<input type="checkbox" name="remember" lay-skin="primary" title="记住密码">
|
||||||
<a href="forget.html" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;">忘记密码?</a>
|
<a href="{:url('admin/login/forget')}" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;">忘记密码?</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
|
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<a href="javascript:;"><i class="layui-icon layui-icon-login-wechat"></i></a>
|
<a href="javascript:;"><i class="layui-icon layui-icon-login-wechat"></i></a>
|
||||||
<a href="javascript:;"><i class="layui-icon layui-icon-login-weibo"></i></a>
|
<a href="javascript:;"><i class="layui-icon layui-icon-login-weibo"></i></a>
|
||||||
|
|
||||||
<a href="reg.html" class="layadmin-user-jump-change layadmin-link">注册帐号</a>
|
<a href="{:url('admin/login/reg')}" class="layadmin-user-jump-change layadmin-link">注册帐号</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -92,6 +92,13 @@
|
|||||||
,search = router.search;
|
,search = router.search;
|
||||||
|
|
||||||
form.render();
|
form.render();
|
||||||
|
|
||||||
|
//回车登陆
|
||||||
|
$('input').keydown(function(e){
|
||||||
|
if(e.key.Code == 13){
|
||||||
|
//form.on();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//提交
|
//提交
|
||||||
form.on('submit(LAY-user-login-submit)', function(obj){
|
form.on('submit(LAY-user-login-submit)', function(obj){
|
||||||
@ -131,7 +138,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
|
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
|
||||||
<div class="layadmin-user-login-main">
|
<div class="layadmin-user-login-main">
|
||||||
<div class="layadmin-user-login-box layadmin-user-login-header">
|
<div class="layadmin-user-login-box layadmin-user-login-header">
|
||||||
<h2>Admin</h2>
|
<h2>TaoLer_Admin</h2>
|
||||||
<p>官方出品的单页面后台管理模板系统</p>
|
<p>官方出品的单页面后台管理模板系统</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="layadmin-user-login-box layadmin-user-login-body layui-form">
|
<div class="layadmin-user-login-box layadmin-user-login-body layui-form">
|
||||||
@ -50,8 +50,8 @@
|
|||||||
<a href="javascript:;"><i class="layui-icon layui-icon-login-wechat"></i></a>
|
<a href="javascript:;"><i class="layui-icon layui-icon-login-wechat"></i></a>
|
||||||
<a href="javascript:;"><i class="layui-icon layui-icon-login-weibo"></i></a>
|
<a href="javascript:;"><i class="layui-icon layui-icon-login-weibo"></i></a>
|
||||||
|
|
||||||
<a href="login.html" class="layadmin-user-jump-change layadmin-link layui-hide-xs">用已有帐号登入</a>
|
<a href="{:url('admin/login/index')}" class="layadmin-user-jump-change layadmin-link layui-hide-xs">用已有帐号登入</a>
|
||||||
<a href="login.html" class="layadmin-user-jump-change layadmin-link layui-hide-sm layui-show-xs-inline-block">登入</a>
|
<a href="{:url('admin/login/index')}" class="layadmin-user-jump-change layadmin-link layui-hide-sm layui-show-xs-inline-block">登入</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
layer.load(); //上传loading
|
layer.load(); //上传loading
|
||||||
}
|
}
|
||||||
,done: function(res){
|
,done: function(res){
|
||||||
layer.close(layerload); //关闭loading
|
layer.closeAll('loading'); //关闭loading
|
||||||
if(res.code == 1){
|
if(res.code == 1){
|
||||||
layer.msg(res.msg,{
|
layer.msg(res.msg,{
|
||||||
icon:6,
|
icon:6,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user