feat: integrate CampusSwitcher into header and API interceptor

This commit is contained in:
2026-07-06 00:06:35 +08:00
parent af3b4ba8f4
commit 80839607a4
2 changed files with 6 additions and 0 deletions

View File

@@ -10,6 +10,10 @@ api.interceptors.request.use((config) => {
if (token) {
config.headers.Authorization = `Bearer ${token}`;
}
const campusId = localStorage.getItem('currentCampusId');
if (campusId) {
config.headers['X-Campus-Id'] = campusId;
}
return config;
});