feat(frontend): optimize frontend interaction (#8)

Support auto refresh. Change authentication method. Streamline the frontend code.
This commit is contained in:
Li4n0
2021-04-25 22:15:56 +08:00
committed by GitHub
parent 50a6749070
commit 7e99d93e43
21 changed files with 347 additions and 232 deletions
+12
View File
@@ -0,0 +1,12 @@
import request from './index'
export function auth(token) {
return request({
url: '/auth',
method: 'get',
headers: {"Token": token},
validateStatus: function (status) {
return status >= 200 && status < 300
}
})
}