Authored by 沈志敏

fix bug

... ... @@ -40,6 +40,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
... ... @@ -91,6 +92,11 @@
}
this.nullbox = this.brandData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
... ... @@ -143,7 +149,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
var delBtn = $('#del-' + id);
let delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
... ... @@ -222,15 +228,9 @@
this.updateNavBar();
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
}
};
</script>
... ...
... ... @@ -45,6 +45,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
... ... @@ -72,12 +73,7 @@
if ($.isEmptyObject(data) || data.pageTotal === 0) {
this.busy = true;
} else {
if (this.page === data.pageTotal) {
this.busy = true;
} else {
this.busy = false;
}
this.busy = this.page === data.pageTotal;
const list = data.productList || [];
list.forEach(o => {
... ... @@ -111,6 +107,11 @@
}
this.nullbox = this.productData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
... ... @@ -162,7 +163,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
var delBtn = $('#del-' + id);
let delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
... ... @@ -229,6 +230,7 @@
if (!this.productData.length) {
header.right.des = '';
}
yoho.updateNavigationBar({
header: header
});
... ... @@ -241,15 +243,9 @@
this.updateNavBar();
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
}
};
</script>
... ...