mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-24 07:31:53 +08:00
feat(frontend): optimize frontend interaction (#8)
Support auto refresh. Change authentication method. Streamline the frontend code.
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user