|
@@ -149,15 +149,19 @@ struct menu {
|
|
|
const checkInterval = setInterval(() => {
|
|
|
if (CommonConstants.AUTH_TOKEN!='') {
|
|
|
clearInterval(checkInterval); // 停止轮询
|
|
|
- setTimeout(() => {
|
|
|
- this.connectMQTT();
|
|
|
- }, 1000);
|
|
|
return
|
|
|
}
|
|
|
this.loginWms();
|
|
|
}, 2000); // 每500毫秒检查一次
|
|
|
+ const checkInterval2 = setInterval(() => {
|
|
|
+ if (this.isConnected) {
|
|
|
+ clearInterval(checkInterval2); // 停止轮询
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.connectMQTT()
|
|
|
+ }, 1000);
|
|
|
|
|
|
- // this.loginWms();
|
|
|
+ // this.loginWms();
|
|
|
|
|
|
// 查询数据字典放到CommonConstants的DICT_DATA变量中
|
|
|
// let res: DictInfo[] = await WmsRequest.post('/api/v1/sys/dictData/all',)
|