工具类中,用户名添加

This commit is contained in:
2025-07-21 10:24:07 +08:00
parent 6ceb2bbe2e
commit ca4d93b902

View File

@@ -31,7 +31,7 @@ const request = config => {
config.header['Access-Control-Allow-Headers']= 'X-Requested-With'; // 允许的HTTP头
if (getToken() && !isToken) {
config.header['Authorization'] = 'Bearer ' + getToken()
config.header['userName'] = store.getters.nickName ?? "未知用户"
}
// get请求映射params参数
if (config.params) {