mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-07 08:41:12 +08:00
Compare commits
5 Commits
a3fad57138
...
6ae1789cc5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ae1789cc5 | ||
|
|
d8b2170555 | ||
|
|
36ce2c7654 | ||
|
|
84379c459f | ||
|
|
1e46a7fad2 |
@ -99,6 +99,8 @@ class Login extends Controller
|
||||
'login_at' => date('Y-m-d H:i:s'),
|
||||
'login_ip' => $this->app->request->ip(),
|
||||
]);
|
||||
// 刷新用户权限
|
||||
AdminService::apply(true);
|
||||
sysoplog('系统用户登录', '登录系统后台成功');
|
||||
$this->success('登录成功', sysuri('admin/index/index'));
|
||||
}
|
||||
|
||||
@ -37,6 +37,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item margin-bottom-5">
|
||||
<div class="help-label label-required-prev"><b>JWT 接口密钥</b>Jwt Key</div>
|
||||
<label class="relative block label-required-null">
|
||||
<input class="layui-input" pattern=".{32}" maxlength="32" required placeholder="请输入32位JWT接口密钥" name="data.jwtkey" value="{:sysconf('data.jwtkey')?:md5(uniqid(strval(rand(1000,9999)),true))}">
|
||||
<a class="input-right-icon layui-icon layui-icon-refresh" id="RefreshJwtKey"></a>
|
||||
</label>
|
||||
<div class="help-block sub-span-blue">
|
||||
请输入 <span>32</span> 位 <span>JWT</span> 接口密钥,在使用 <span>JWT</span> 接口时需要使用其密钥进行加密及签名!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item margin-bottom-5">
|
||||
<div class="help-label label-required-prev"><b>浏览器小图标</b>Browser Icon</div>
|
||||
<label class="relative block label-required-null">
|
||||
@ -103,6 +114,11 @@
|
||||
|
||||
<script>
|
||||
$('[name=login_image]').uploadMultipleImage();
|
||||
require(['md5'], function (md5) {
|
||||
$('body').off('click', '#RefreshJwtKey').on('click', '#RefreshJwtKey', function () {
|
||||
$(this).parent().find('input').val(md5.hash(Date.toString() + Math.random()));
|
||||
});
|
||||
});
|
||||
layui.form.on('select(SiteTheme)', function (data) {
|
||||
var alls = '', prox = 'layui-layout-theme-', curt = prox + data.value;
|
||||
$(data.elem.options).map(function () {
|
||||
|
||||
@ -38,7 +38,7 @@ return [
|
||||
// CORS 授权请求方法
|
||||
'cors_methods' => 'GET,PUT,POST,PATCH,DELETE',
|
||||
// CORS 跨域头部字段
|
||||
'cors_headers' => 'Api-Type,Api-Name,Api-Uuid,Api-Token,User-Form-Token,User-Token,Token',
|
||||
'cors_headers' => 'Api-Type,Api-Name,Api-Uuid,Jwt-Token,Api-Token,User-Form-Token,User-Token,Token',
|
||||
// 显示错误消息内容,仅生产模式有效
|
||||
'error_message' => '页面错误!请稍后再试~',
|
||||
// 异常模板路径配置,仅开发模式有效
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user