shimai
9 days ago 88a31d5a960bd10f3799bc00f8aa24461567d06e
Merge branch 'test/tony.cheng/260312' of http://120.79.193.119:9090/r/~chengmw/cloud-melody-front into test/shimai.huang/260309
2 files modified
24 ■■■■ changed files
web-app/src/components/common/AppHeader.jsx 22 ●●●● patch | view | raw | blame | history
web-app/src/config/env.js 2 ●●● patch | view | raw | blame | history
web-app/src/components/common/AppHeader.jsx
@@ -17,12 +17,26 @@
 */
const getMediatorInfo = () => {
  const params = getMergedParams();
  return {
    trueName: params.trueName || '调解员',
    unit: params.unit || '',
    roleName: params.roleName || '管理员',
  const userInfo = {
    userId: params.userId || '',
    roleId: params.roleId || '',
    auth_token: params.auth_token || '',
    unitType: params.unitType || '',
    trueName: params.trueName ? decodeURIComponent(params.trueName) : '调解员',
    unit: params.unit ? decodeURIComponent(params.unit) : '',
    unitRegion: params.unitRegion ? decodeURIComponent(params.unitRegion) : '',
    roleName: params.roleName ? decodeURIComponent(params.roleName) : '管理员',
    avatar: params.avatar || ''
  };
  // 存储到 localStorage
  try {
    localStorage.setItem('userInfo', JSON.stringify(userInfo));
  } catch (error) {
    console.error('Failed to save userInfo to localStorage:', error);
  }
  return userInfo;
};
/**
web-app/src/config/env.js
@@ -12,7 +12,7 @@
};
// 当前环境,默认为SIT测试环境
const CURRENT_ENV = process.env.REACT_APP_ENV || ENV_TYPES.DEV;
const CURRENT_ENV = process.env.REACT_APP_ENV || ENV_TYPES.SIT;
// 环境配置映射
const ENV_CONFIG = {