|
|
@@ -5,6 +5,7 @@ import Bus from '@/utils/eventBus/index';
|
|
|
import timerUtil from '@/utils/timer/timerUtil';
|
|
|
import { Callback } from '@/utils/websocket/index';
|
|
|
import { SubscribeInfoType } from './interface';
|
|
|
+import { isLogin } from '@/services/bus/login';
|
|
|
|
|
|
|
|
|
const subscribeGoodsList = new Map<string, SubscribeInfoType[]>(); // 订阅商品数据中心池
|
|
|
@@ -70,8 +71,12 @@ function actionSubcribe() {
|
|
|
});
|
|
|
},
|
|
|
onFail: (err) => {
|
|
|
- isSubscribeSucess = false
|
|
|
- console.log('订阅失败:', err)
|
|
|
+ if (isLogin()) {
|
|
|
+ isSubscribeSucess = false
|
|
|
+ console.log('订阅失败:', err)
|
|
|
+ } else {
|
|
|
+ isSubscribeSucess = true
|
|
|
+ }
|
|
|
},
|
|
|
} as Callback);
|
|
|
}
|