Authored by ccbikai

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

... ... @@ -3,6 +3,7 @@ const app = require('product/detail/index.vue');
const loading = require('common/loading');
const lazyload = require('yoho-vue-lazyload');
require('common/vue-filter');
require('../common/overlay');
Vue.use(lazyload);
... ...
<template>
<top-nav v-if="isApp" :title="entity.productName"></top-nav>
<top-nav v-if="isApp" :title="entity.productName" :img="firstImage | resize 300 300"></top-nav>
<show-box :is-first="true">
<image-carousel :goods="entity.goodsList"></image-carousel>
<div class="title-box">
... ... @@ -401,6 +401,7 @@
yoho: yoho,
isApp: yoho.isApp,
intro: {},
firstImage: '',
entity: {
brand: {
brandName: '',
... ... @@ -508,6 +509,13 @@
$.get(`/product/product_${pid}.json`).then((result) => {
// TODO: 异常处理
this.entity = result;
this.entity.goodsList.forEach((goods)=> {
if (!this.firstImage && goods.colorImage) {
this.firstImage = goods.colorImage;
}
});
return result;
}).then((result)=> {
loadIntroDeferred = () => {
... ...
... ... @@ -38,13 +38,15 @@
};
},
props: {
title: 'String'
title: String,
img: String
},
methods: {
share: function() {
yoho.goShare({
title: this.title || '',
des: '我在BLK发现了一个不错的商品,快来看看吧!',
img: this.img,
url: location.href
});
}
... ...