dashboard
repositories
filestore
activity
search
login
crm
/
tenant-console
crm租户管理web后台
summary
reflog
commits
tree
docs
forks
compare
blame
|
history
|
raw
feat: 提交
wsj
4 days ago
fe1692fd7f4f307fea8054da6c6c50d5df2bf2d8
[crm/tenant-console.git]
/
src
/
api
/
authHeaders.ts
1
2
3
4
5
6
7
import { useAuthStore } from '@/store/auth';
/** 接口要求 Bearer JWT,从登录态读取 token 生成请求头。 */
export const getAuthHeaders = () => {
const token = useAuthStore.getState().token;
return token ? { Authorization: `Bearer ${token}` } : undefined;
};