Commit e340e254 authored by 崔佳豪's avatar 崔佳豪

fix: 升级GetAllGroupsInfoForUser接口

parent 6e73f297
Pipeline #59142 passed with stages
......@@ -27,7 +27,7 @@ export const API = {
? '/cityjson?ie=utf-8'
: 'https://pv.sohu.com',
GET_ALL_GROUPS_INFO_FORUSER:
'/CityInterface/rest/Services/Portal.svc/AuthorityManage/GetAllGroupsInfoForUser',
'/PandaCore/GCK/CloudPlat/GetAllGroupsInfoForUser',
GET_WEATHER: '/CityInterface/rest/services/CountyProduct.svc/GetWeather',
SEND_MESSAGE_CODE:
'CityInterface/rest/services/portal.svc/SendMessVerificationCode',
......
......@@ -89,43 +89,6 @@ const appReducer = (state = initialState, action) => {
window.__INITIAL_STATE__.menu = 'banner-left';
window.globalConfig = AppConfig(window.__INITIAL_STATE__);
// 临时补充messageVoice。后续需要加到AppConfig中。
action.data && action.data.hasOwnProperty('messageVoice') && (window.globalConfig.messageVoice = action.data.messageVoice)
action.data && action.data.hasOwnProperty('topMenu') && (window.globalConfig.topMenu = action.data.topMenu)
window.globalConfig.transformUserInfo = (data) => {
return {
City: data.city,
DDid: data.dDid,
Email: data.email,
EnterprisesType: data.enterprisesType,
GisState: data.gisState,
Groups: data.groups,
IP: data.ip,
IsManager: data.isManager,
LocalSite: data.localSite,
Mark: data.mark,
OID: data.oid,
Phone: data.phone,
Port: data.port,
UserImge: data.userImge,
// UserLevel: data. // 老接口有,新接口没有
// UserType: // 老接口有,新接口没有
WXid: data.wXid,
WxImage: data.wxImage,
WxName: data.wxName,
cloudStationOID: data.cloudStationOID,
depart: data.depart, // 嵌套里面一层的大小写也不一样
exportCAD: data.exportCAD, // 嵌套里面一层的大小写也不一样
extraInfo: data.extraInfo,
fullName: data.fullName,
loginName: data.loginName,
roles: data.roles, // 嵌套里面一层的大小写也不一样
site: data.site,
token: data.token,
tokenexp: data.tokenexp,
}
},
// eslint-disable-next-line no-undef
createStoreage.set('globalConfig', window.globalConfig);
......
......@@ -69,12 +69,12 @@ class Site {
ignoreSite: true,
})
.then(res => {
if (res && res.say.errMsg === '' && res.say.statusCode === ERR_OK) {
const result = res.getMe;
if (res && res.code === 0) {
const result = res.data || [];
let city = self.weatherCity;
let arr = [];
self.globalConfig.userInfo.groupType = '';
self.globalConfig.userInfo.Groups = res.getMe;
self.globalConfig.userInfo.Groups = result;
// eslint-disable-next-line no-array-constructor
self.globalConfig.userInfo.Industries = new Array();
if (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment