Commit 2ad10fff authored by 皮倩雯's avatar 皮倩雯

fix: '修复emq无法配置bug'

parent 49b95372
Pipeline #67690 failed with stages
......@@ -50,7 +50,7 @@ const tailLayout = {
};
let time = null;
const IotConfig = props => {
const {setActiveKey} = props;
const { setActiveKey } = props;
const [loading, setLoading] = useState(false); // 加载
const [show1, setShow1] = useState('none');
const [show2, setShow2] = useState('none');
......@@ -79,27 +79,30 @@ const IotConfig = props => {
const [dbStatus, setDbStatus] = useState(''); // 数据库状态
const [buStatus, setBuStatus] = useState(''); // 按钮状态
const [keep, setKeep] = useState('');
const [getWay, setGetWay] = useState('');
const [getWayVisible, setGetWayVisible] = useState(false);
useEffect(() => {
GetGateWay().then(res => {
if (res.code === 0) {
setGetWay(res.data);
if (res.data === false) {
setGetWayVisible(true);
HealthCheck()
.then(res => {
if (res.success) {
setFlag(1);
getCurrentConfig();
getSiteCode();
GetGateWay().then(resdata => {
if (resdata.code === 0) {
if (resdata.data === false) {
setGetWayVisible(true);
}
}
});
} else {
setFlag(0);
}
}
});
HealthCheck().then(res => {
if (res.success) {
setFlag(1);
getCurrentConfig();
getSiteCode();
} else {
setFlag(0);
}
});
})
.catch(err => {
console.log(err);
});
GetCurentIotVerison();
GetIotConfig();
return () => {
......@@ -580,13 +583,13 @@ const IotConfig = props => {
title="提示"
width="350px"
closable={false}
all
footer={
<Space>
<Button
onClick={() => {
setGetWayVisible(false);
setActiveKey('5');
}}
type="primary"
>
......
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