登录相关配置

This commit is contained in:
Jason
2022-09-13 17:41:24 +08:00
parent f4eca5bc13
commit b8895342ac
14 changed files with 289 additions and 88 deletions

View File

@@ -15,9 +15,9 @@ const requestHooks: RequestHooks = {
if (baseUrl) {
options.url = `${baseUrl}${options.url}`
}
const token = getToken()
// 添加token
if (withToken) {
const token = getToken()
if (withToken && token) {
options.header.token = token
}
return options