1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-06 07:21:24 +08:00

Added token automatic renew

This commit is contained in:
2023-06-02 02:33:05 +08:00
parent 1b186a8e9e
commit 1b6ac6ade8
9 changed files with 58 additions and 11 deletions

View File

@@ -155,10 +155,10 @@ export default {
return
}
login(this.userName, this.password).then((res) => {
const data = res.data
switch (data.code) {
const response = res.data
switch (response.code) {
case LOGIN_SUCCESS:
setToken(data.data.token)
setToken(response.data.token)
ElMessage.success({
dangerouslyUseHTMLString: true,
message: '<strong>登录成功</strong>'