diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index a2e120d..ba24381 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,7 @@
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index cb81e3d..e32084b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,17 +1,174 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ json_util
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -21,7 +178,71 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -32,4 +253,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/APP/templates/forget.html b/APP/templates/forget.html
index cd54e3b..ee8a1f2 100644
--- a/APP/templates/forget.html
+++ b/APP/templates/forget.html
@@ -12,7 +12,7 @@
var username = $(obj).parent().prev().prev().prev().children("#username").val();
var password = $(obj).parent().prev().prev().children("#password").val();
var password1 = $(obj).parent().prev().children("#password1").val();
- var url = "http://127.0.0.1:5000/forget";
+ var url = "http://127.0.0.1:5000/bp_auth/forget";
$.ajax({
type: "POST",
url: url,
@@ -24,9 +24,8 @@
},
success: function(data){
alert(data.msg);
- if(data.code == 0){
- var newurl = "http://127.0.0.1:5000/login";
- window.location = newurl;
+ if(data.code == 1){
+ window.location = "login.html";
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
diff --git a/APP/templates/login.html b/APP/templates/login.html
index a50c2b0..1957ef5 100644
--- a/APP/templates/login.html
+++ b/APP/templates/login.html
@@ -34,7 +34,7 @@
function login(obj) {
var phonenum = $(obj).parent().prev().prev().children("#phonenum").val();
var password = $(obj).parent().prev().children("#password").val();
- var url = "http://127.0.0.1:5000/login";
+ var url = "http://127.0.0.1:5000/bp_auth/login";
$.ajax({
type: "POST",
@@ -45,15 +45,18 @@
},
success: function (data) {
cookie.setCookie('phonenum', phonenum, 30);
- var newurl = "personal.html";
- window.location = newurl;
-
+ alert(data.msg);
+ if(data.code != 1){
+ window.location = "login.html";
+ }else{
+ window.location = "personal.html";
+ }
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest.status);
alert(XMLHttpRequest.readyState);
alert(textStatus);
- window.location = url;
+ window.location = "login.html";
}
});
}
@@ -80,8 +83,8 @@