Authored by 陈轩

fix BLK-1564

... ... @@ -392,7 +392,6 @@
data() {
return {
yoho: yoho,
isApp: yoho.isApp,
intro: {},
firstImage: '',
entity: {
... ... @@ -432,13 +431,14 @@
this.showFeatureSelector = false;
tip(result.message);
});
}
},
//state
isApp: yoho.isApp,
isSoldOut: true
};
},
computed: {
isSoldOut: function() {
return this.entity.storage === 0;
}
},
components: {
imageCarousel: require('./image-carousel.vue'),
... ... @@ -490,6 +490,8 @@
const self = this;
const pid = app.data('pid');
this.isSoldOut = true;
// 显示商品特征选择组件
this.$on('feature.close', function() {
self.showFeatureSelector = false;
... ... @@ -500,6 +502,10 @@
// TODO: 异常处理
this.entity = result;
if (this.entity.storage !== 0 && this.entity.status !== 0) {
this.isSoldOut = false;
}
this.entity.goodsList.forEach((goods)=> {
if (!this.firstImage && goods.colorImage) {
this.firstImage = goods.colorImage;
... ...