Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

... ... @@ -28,7 +28,8 @@ const handleBrandList = origin => {
brands.push({
name: subValue.brand_name,
link: '/brand/' + subValue.brand_domain,
logo: subValue.brand_ico
logo: subValue.brand_ico,
domain: subValue.brand_domain
});
});
... ...
... ... @@ -4,7 +4,7 @@
<div class="index"><a href="#{{item.index}}" name="{{item.index}}">{{item.index}}</a></div>
<div class="brand-big-box clearfix">
<div class="brand-box" v-for="brand in item.brands">
<a href="{{brand.link}}">
<a href="{{brand.domain | brandUrl}}">
<div class="brand-logo">
<img v-lazy="brand.logo | resize 150 150" alt="{{brand.name}}">
</div>
... ...
... ... @@ -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>
... ...