update login page location

v1.0
bobi 2019-05-13 19:20:49 +08:00
parent 4020730c02
commit ee8f960fbf
3 changed files with 27 additions and 10 deletions

View File

@ -9,7 +9,7 @@
"method": "GET",
"ip": "127.0.0.1",
"timeConsuming": 100,
"isNnormal": true,
"status": true,
"operator": "admin",
"operatingTime": "2019-05-15 12:08:08"
}

View File

@ -165,7 +165,7 @@ layui.use(["element", "layer"], function () {
*/
$("#logout").click(function () {
layer.confirm("确定要退出吗?", {skin: 'layui-layer-lan', icon: 3, title: '提示', anim: 6}, function () {
window.location = "pages/other/login.html";
window.location = "pages/user/login.html";
});
});

View File

@ -41,15 +41,22 @@
<script src="../../lib/layui/layui.js"></script>
<script src="../../lib/nprogress/nprogress.js"></script>
<script type="text/javascript">
layui.use(["form", "jquery"], function () {
layui.config({
base: "../../lib/layui_plugins/"
}).extend({
okLayer: "okLayer/okLayer",
okUtils: "okUtils/okUtils"
}).use(["form", "okLayer", "okUtils"], function () {
var form = layui.form;
var $ = layui.jquery;
var okLayer = layui.okLayer;
var okUtils = layui.okUtils;
// 进度条
NProgress.start();
window.onload = function () {
NProgress.done();
}
// NProgress.start();
// window.onload = function () {
// NProgress.done();
// }
// 修改copyright结束时间
var data = new Date();
@ -58,9 +65,19 @@
// 登陆逻辑
form.on('submit(login)', function (data) {
layer.msg("登陆中...", {icon: 6, time: 1000, anim: 4}, function () {
window.location = "../../index.html";
});
/* 登录api
okUtils.ajax("/login", "post", data.field).done(function (response) {
console.log(response)
layer.msg("登陆成功", {icon: 6, time: 1000, anim: 4}, function () {
window.location = "../../index.html";
});
}).fail(function (error) {
console.log(error)
});
*/
layer.msg("登陆成功", {icon: 6, time: 1000, anim: 4}, function () {
window.location = "../../index.html";
});
return false;
});