Authored by 沈志敏

fix bug

... ... @@ -53,6 +53,7 @@
const $ = require('jquery');
const tip = require('common/tip');
const Modal = require('common/modal');
const yoho = require('yoho');
module.exports = {
data() {
... ... @@ -69,7 +70,7 @@
this.reload();
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
if (!document.hidden && yoho.store.get('refundOrder')) {
this.reload();
}
});
... ... @@ -83,6 +84,8 @@
this.emptybox= 'hide';
this.getRefundData();
yoho.store.remove('refundOrder');
},
getRefundData() {
this.busy = true;
... ...
... ... @@ -124,6 +124,16 @@
detail: {}
};
},
created() {
this.reload();
document.addEventListener('visibilitychange', () => {
if (!document.hidden && yoho.store.get('refundStatus')) {
this.reload();
yoho.store.set('refundOrder', true);
}
});
},
methods: {
reload() {
this.id = '';
... ... @@ -182,21 +192,13 @@
}).then(data => {
if (data.code === 200) {
_this.reload();
yoho.store.set('refundOrder', true);
} else {
tip(data.message);
}
});
});
}
},
created() {
this.reload();
document.addEventListener('visibilitychange', () => {
if (!document.hidden && yoho.store.get('refundStatus')) {
this.reload();
}
});
}
};
</script>
... ...