| | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript"> |
| | | // 已有 token 时校验,有效则直接进首页,避免频繁输入 |
| | | (function () { |
| | | var token = localStorage.getItem('token'); |
| | | if (!token) return; |
| | | $.ajax({ |
| | | url: baseUrl + '/user/detail/auth', |
| | | headers: { token: token }, |
| | | success: function () { window.location.href = 'index.html'; }, |
| | | error: function () { |
| | | localStorage.removeItem('token'); |
| | | localStorage.removeItem('username'); |
| | | } |
| | | }); |
| | | })(); |
| | | |
| | | layui.use(['form','layer'],function () { |
| | | var form = layui.form, |