安卓断线重连时刷新页面
This commit is contained in:
parent
5476b2c0cb
commit
6e829b06c6
|
@ -37,7 +37,9 @@ export default defineComponent({
|
|||
const remote_data_exange_processer = new RemoteDataExangeProcesser(options);
|
||||
remote_data_exange_processer.enable();
|
||||
|
||||
let disconnect_flag = false;
|
||||
EventBus.getInstance().on(EventNamesDefine.CurrentConnectDisconnect, () => {
|
||||
disconnect_flag = true;
|
||||
$q.loading.show({
|
||||
html: true,
|
||||
message:
|
||||
|
@ -53,6 +55,12 @@ export default defineComponent({
|
|||
|
||||
EventBus.getInstance().on(EventNamesDefine.CurrentConnectConnected, () => {
|
||||
$q.loading.hide();
|
||||
if (disconnect_flag) {
|
||||
if ($q.platform.is.android && $q.platform.is.capacitor) {
|
||||
window.location.reload();
|
||||
return;
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
new Initializer(options).initialize().then(() => {
|
||||
$store.commit("setInitialized");
|
||||
|
|
Loading…
Reference in New Issue