Skip to content

Commit

Permalink
fix:修复登陆页面无法跳页面的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
misterchaos committed Aug 2, 2019
1 parent 0611308 commit 2266538
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 336 deletions.
27 changes: 0 additions & 27 deletions src/main/webapp/html/about-qg.html

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/webapp/html/column.html

This file was deleted.

107 changes: 0 additions & 107 deletions src/main/webapp/html/honor.html

This file was deleted.

21 changes: 0 additions & 21 deletions src/main/webapp/html/login.html

This file was deleted.

53 changes: 0 additions & 53 deletions src/main/webapp/html/member.html

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/webapp/html/project.html

This file was deleted.

23 changes: 0 additions & 23 deletions src/main/webapp/html/tset.html

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/webapp/html/we.html

This file was deleted.

46 changes: 22 additions & 24 deletions src/main/webapp/js/login.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
define(['require', 'tools'], function(require) {
define(['require', 'tools'], function (require) {
var tools = require('tools');

$(function() {
$("button:eq(0)").click(function() {
var data ={
username: $("input:eq(0)").val(),
password: $("input:eq(1)").val()
$(function () {
$("button:eq(0)").click(function () {
var data = {
username: $("input:eq(0)").val(),
password: $("input:eq(1)").val()
};
if(!tools.verificat.isNotNullTrim(data.username) || !tools.verificat.isNotNullTrim(data.password)) {
alert("输入不能为空!");
if (!tools.verificat.isNotNullTrim(data.username) || !tools.verificat.isNotNullTrim(data.password)) {
alert("输入不能为空!");
} else {
$.ajax({
type: "POST",
url: "http://www.cxkball.club:2333/user/login",
dataType: "json",
contentType: "application/json",
data: JSON.stringify(data),
success: function(data) {
if (data.message == "account_not_found") {
alert("该账户不存在!");
} else if (data.message == "password_incorrect") {
alert("密码输入错误!");
} else if(data.message == "success") {
window.location.href="http://www.cxkball.club:2333/about-qg.html";
}
}
})
type: "POST",
url: "http://www.cxkball.club:2333/user/login",
dataType: "json",
contentType: "application/json",
data: JSON.stringify(data),
success: function (data) {
if (data.status == 200) {
window.location.href = "http://www.cxkball.club:2333/about-qg.html";
}else {
alert(data.message);
}
}
})
}

});
});

Expand Down
File renamed without changes.

0 comments on commit 2266538

Please sign in to comment.