Authored by 沈志敏

fix bug

... ... @@ -24,6 +24,11 @@ const yoho = {
isApp: /yh_blk/i.test(navigator.userAgent || ''),
/**
* storage
*/
storage: window.localStorage,
/**
* JS 与 APP 共享的对象
*/
data: window.yohoInterfaceData,
... ...
... ... @@ -167,6 +167,7 @@
}, (result) => {
if (result.code === 200) {
tip('取消成功');
yohoAPI.storage.orderReload = true;
setTimeout(() => {
this.reload();
}, 1000);
... ... @@ -208,6 +209,7 @@
reason: this.options.length ? this.options[0].reason : null
}, (result) => {
if (result.code === 200) {
yohoAPI.storage.orderReload = true;
this.reload();
}
});
... ... @@ -232,6 +234,7 @@
}
}).then(result => {
if (result.code === 200) {
yohoAPI.storage.orderReload = true;
yohoAPI.goBack();
return false;
} else if (result.code !== 500) {
... ... @@ -255,6 +258,7 @@
}
}).then(result => {
if (result.code === 200) {
yohoAPI.storage.orderReload = true;
_this.reload();
} else if (result.code !== 500) {
tip(result.message);
... ...
... ... @@ -89,7 +89,10 @@
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
if (yohoAPI.storage.orderReload) {
this.reload();
delete yohoAPI.storage.orderReload;
}
}
});
},
... ...