From be5cd659dd19c4f9ba5e00bb7a2906e9ed4df6f7 Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期二, 20 九月 2022 11:47:30 +0800
Subject: [PATCH] 添加分页功能
---
src/views/login/index.vue | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index e028946..d33b057 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -107,12 +107,17 @@
const { username, password } = this.loginForm;
const that = this;
this.$axios
- .post("http://42.193.1.25:8082/sccg/admin/login", {
+ .post("sccg/admin/login", {
password,
username,
})
.then(function (response) {
- if (response.data.code === 200) {
+ if (response.code === 200) {
+ // 淇濆瓨token
+ console.log(response);
+ localStorage.setItem('token',response.data.token);
+ // 淇濆瓨token
+ localStorage.setItem('tokenHead',response.data.tokenHead)
// 璺宠浆鍒伴椤�
that.$router.push("/home");
}else{
@@ -122,7 +127,7 @@
}
})
}
- console.log(response);
+ // console.log(response);
})
.catch(function (error) {
console.log(error);
--
Gitblit v1.8.0