set user auth
This commit is contained in:
parent
30dc7d629f
commit
0b2d4c7813
@ -3,11 +3,12 @@
|
||||
版本:TaoLer 1.0.0
|
||||
日期:2020.1.1
|
||||
官网:http://www.aieok.com
|
||||
测试:http://www.aieok.com/admin 账号test 密码test123
|
||||
|
||||
#### 项目地址
|
||||
|
||||
gitee https://www.gitee.com/toogee/Taoler
|
||||
github https://www.github.com/taoser/TaoLer
|
||||
1. gitee https://www.gitee.com/toogee/Taoler
|
||||
2. github https://www.github.com/taoser/TaoLer
|
||||
|
||||
#### 介绍
|
||||
|
||||
|
@ -135,8 +135,15 @@ class Admin extends AdminController
|
||||
}
|
||||
}
|
||||
}
|
||||
//管理员资料更新
|
||||
//基本资料显示
|
||||
public function info()
|
||||
{
|
||||
$admin = AdminModel::find(Session::get('admin_id'));
|
||||
View::assign('admin',$admin);
|
||||
return View::fetch('set/user/info');
|
||||
}
|
||||
//管理员资料更新
|
||||
public function infoSet()
|
||||
{
|
||||
$admin = AdminModel::find(Session::get('admin_id'));
|
||||
if(Request::isAjax()){
|
||||
@ -149,14 +156,20 @@ class Admin extends AdminController
|
||||
}
|
||||
return json($res);
|
||||
}
|
||||
View::assign('admin',$admin);
|
||||
return View::fetch('set/user/info');
|
||||
}
|
||||
|
||||
//改密码
|
||||
//显示改密码页面
|
||||
public function repass()
|
||||
{
|
||||
//
|
||||
$admin = AdminModel::find(Session::get('admin_id'));
|
||||
|
||||
View::assign('admin',$admin);
|
||||
return View::fetch('set/user/repass');
|
||||
}
|
||||
|
||||
//密码重设
|
||||
public function repassSet()
|
||||
{
|
||||
$admin = AdminModel::find(Session::get('admin_id'));
|
||||
if(Request::isAjax()){
|
||||
$data = Request::param();
|
||||
@ -180,11 +193,7 @@ class Admin extends AdminController
|
||||
}
|
||||
return json($res);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
View::assign('admin',$admin);
|
||||
return View::fetch('set/user/repass');
|
||||
}
|
||||
|
||||
//清除缓存Cache
|
||||
|
@ -184,6 +184,8 @@ INSERT INTO `tao_auth_rule` VALUES ('87', 'admin/AuthAccess/check', '审核管
|
||||
INSERT INTO `tao_auth_rule` VALUES ('88', 'admin/Set/website', '网站信息保存', '1', '1', '2', '1', '', '0', '24', '', '1585819936', '1585820211', '0');
|
||||
INSERT INTO `tao_auth_rule` VALUES ('89', 'admin/User/auth', '设置超级用户', '1', '1', '1', '1', '', '0', '22', '', '1578984801', '0', '0');
|
||||
INSERT INTO `tao_auth_rule` VALUES ('90', 'admin/Forum/tagshot', '开启热点', '1', '1', '5', '1', '', '0', '15', '', '1585841826', '0', '0');
|
||||
INSERT INTO `tao_auth_rule` VALUES ('91', 'admin/Admin/infoSet', '资料设置', '1', '1', '3', '1', '', '0', '62', '', '1586245669', '0', '0');
|
||||
INSERT INTO `tao_auth_rule` VALUES ('92', 'admin/Admin/repassSet', '密码设置', '1', '1', '3', '1', '', '0', '64', '', '1586245727', '0', '0');
|
||||
|
||||
DROP TABLE IF EXISTS `tao_cate`;
|
||||
CREATE TABLE `tao_cate` (
|
||||
|
@ -126,7 +126,7 @@ layui.define(['form', 'upload'], function(exports){
|
||||
|
||||
admin.req({
|
||||
type: 'post'
|
||||
,url: '/admin/admin/info'
|
||||
,url: '/admin/Admin/infoSet'
|
||||
,data: obj.field
|
||||
,success: function(res){
|
||||
if(res.code == 0){
|
||||
@ -190,7 +190,7 @@ layui.define(['form', 'upload'], function(exports){
|
||||
//提交修改
|
||||
admin.req({
|
||||
type: 'post'
|
||||
,url: '/admin/admin/repass'
|
||||
,url: '/admin/Admin/repassSet'
|
||||
,data: obj.field
|
||||
,success: function(res){
|
||||
if(res.code == 0){
|
||||
|
@ -37,7 +37,7 @@
|
||||
<div class="layui-form-item">
|
||||
{if condition="checkRuleButton('admin/notice/add')"}
|
||||
<button type="submit" class="layui-btn " lay-filter="notice-add" lay-submit id="notice-add">立即发布</button>
|
||||
{/if}
|
||||
{else /}<button type="submit" class="layui-btn layui-btn-disabled">立即发布</button>{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -72,10 +72,10 @@
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
{if condition="checkRuleButton('admin/admin/info')"}
|
||||
{if condition="checkRuleButton('admin/Admin/infoSet')"}
|
||||
<button class="layui-btn" lay-submit lay-filter="setmyinfo">确认修改</button>
|
||||
{else /}
|
||||
<button class="layui-btn layui-btn-disabled" lay-submit lay-filter="setmyinfo">确认修改</button>
|
||||
<button class="layui-btn layui-btn-disabled">确认修改</button>
|
||||
{/if}
|
||||
<!--button type="reset" class="layui-btn layui-btn-primary">重新填写</button-->
|
||||
</div>
|
||||
|
@ -31,10 +31,10 @@
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
{if condition="checkRuleButton('admin/admin/info')"}
|
||||
{if condition="checkRuleButton('admin/Admin/repassSet')"}
|
||||
<button class="layui-btn" lay-submit lay-filter="setmypass">确认修改</button>
|
||||
{else /}
|
||||
<button class="layui-btn layui-btn-disabled" lay-submit lay-filter="setmypass">确认修改</button>
|
||||
<button class="layui-btn layui-btn-disabled">确认修改</button>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -42,7 +42,9 @@
|
||||
<th>{$vo.slid_status ?'显示':'禁止'}</th>
|
||||
<th>
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit" id-data="{$vo.id}"><i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
{if condition="checkRuleButton('admin/Slider/delete')"}
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" id-data="{$vo.id}"><i class="layui-icon layui-icon-delete"></i>删除</a>
|
||||
{else /}<a class="layui-btn layui-btn-disabled layui-btn-danger layui-btn-xs"><i class="layui-icon layui-icon-delete"></i>删除</a>{/if}
|
||||
</th>
|
||||
</tr>
|
||||
{/volist}
|
||||
|
Loading…
Reference in New Issue
Block a user