diff --git a/src/main/resources/templates/login.html b/src/main/resources/templates/login.html
index 88de722..2bf51e7 100644
--- a/src/main/resources/templates/login.html
+++ b/src/main/resources/templates/login.html
@@ -14,6 +14,7 @@
}
+
@@ -53,13 +55,17 @@
var json = JSON.stringify(data);
var cipher = this.encryptByPublicKey(json);
console.log("密文 :" + cipher);
-
var url = "http://localhost:8088/user/login";
axios.post(url, {
encryptedData: cipher,
})
.then(function (response) {
- console.log(response);
+ var data = response.data;
+ if (data.code == 200) {
+ window.location.href = "success.html?token=" + data.data.token
+ } else {
+ alert(data.message)
+ }
})
.catch(function (error) {
console.log(error);
diff --git a/src/main/resources/templates/success.html b/src/main/resources/templates/success.html
new file mode 100644
index 0000000..9dd5e2d
--- /dev/null
+++ b/src/main/resources/templates/success.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
登录成功
+
+
+
+
+
这是登录成功页面
+
+ token:
+ {{token}}
+
+
+
+
+
+
\ No newline at end of file