mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-25 08:01:54 +08:00
feat(frontend): optimize frontend interaction (#8)
Support auto refresh. Change authentication method. Streamline the frontend code.
This commit is contained in:
@@ -5,13 +5,4 @@ const service = axios.create({
|
||||
timeout: 5000 // request timeout
|
||||
})
|
||||
|
||||
service.interceptors.request.use(function (config) {
|
||||
const token = localStorage.getItem("token")
|
||||
if (token !== null) {
|
||||
config.headers['Token'] = token
|
||||
}
|
||||
// 在发送请求之前做些什么
|
||||
return config
|
||||
})
|
||||
|
||||
export default service
|
||||
Reference in New Issue
Block a user