Commit b98a991d authored by cuijiahao's avatar cuijiahao

fix: 云平台某行业无站点选择器

parent 6dfdec6f
This diff was suppressed by a .gitattributes entry.
......@@ -216,7 +216,7 @@ const renderSite = ({data, config, loading, setLoading, action}) => {
onVisibleChange={visible => setVisible(visible)}
>
{
Array.isArray(data.stations) && data.stations.length > 0 ? (
Array.isArray(data.stations) ? (
<div className={layoutStyles.toggleSite}>
<img src={require('../assets/basic/site.png')} className={layoutStyles.site}/>
<span className={layoutStyles.name}>{data.currentStationName}</span>
......
......@@ -382,6 +382,7 @@ class Site {
}
})
.catch(error => {
this.setLoading(false);
message.warning('切换企业失败');
});
}
......@@ -400,10 +401,12 @@ class Site {
this.writeCookie(token, site);
} else {
message.warning('企业切换失败,请联系管理员排查问题!');
this.setLoading(false);
}
})
.catch(e => {
message.warning('企业切换失败,请联系管理员排查问题!');
this.setLoading(false);
});
}
......
......@@ -18,7 +18,8 @@ const industries = [
{ name: '农饮水', type: '农饮水', subTitle: 'RURAL POTABLE WATER' },
{ name: '排水', type: '排水', subTitle: 'DRAINAGE' },
{ name: '能源', type: '能源', subTitle: 'ENERGY SOURCES' },
{ name: '水资源', type: '水资源', subTitle: 'WATER RESOURCES' },
{ name: '直饮水', type: '直饮水', subTitle: 'DRINGKING WATER' },
// { name: '水资源', type: '水资源', subTitle: 'WATER RESOURCES' },
{ name: '熊猫智能实验室', type: '实验室', subTitle: 'PANDA AI. LAB' },
{ name: '大数据', type: '大数据', subTitle: 'BIG DATA' },
{ name: '项目案例', type: '项目案例', subTitle: 'PROJECT CASE' },
......@@ -54,7 +55,7 @@ const renderIndustries = (config, callback) =>
});
const BootPage = props => {
const [loadding, setLoadding] = useState(false);
const [scale, setScale] = useState(1);
useDocumentTitle(
......
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