Showing
3 changed files
with
3 additions
and
3 deletions
@@ -14,7 +14,7 @@ export default { | @@ -14,7 +14,7 @@ export default { | ||
14 | return this.productDetail.goods_list[0].image_list; | 14 | return this.productDetail.goods_list[0].image_list; |
15 | }, | 15 | }, |
16 | resource() { | 16 | resource() { |
17 | - return this.productDetail.resource; | 17 | + return this.productDetail.resource || {}; |
18 | }, | 18 | }, |
19 | activity() { | 19 | activity() { |
20 | return this.productDetail.activity; | 20 | return this.productDetail.activity; |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | </div> | 30 | </div> |
31 | <div class="info-name"><div>{{productDetail.product_name}}</div></div> | 31 | <div class="info-name"><div>{{productDetail.product_name}}</div></div> |
32 | </div> | 32 | </div> |
33 | - <a class="banner" v-show="resource" @click.prevent="gotoNewPage"> | 33 | + <a class="banner" v-if="resource.src" @click.prevent="gotoNewPage"> |
34 | <img-size ref="resourceImg" :src="sizeImg(resource.src)"/> | 34 | <img-size ref="resourceImg" :src="sizeImg(resource.src)"/> |
35 | </a> | 35 | </a> |
36 | <div class="info"> | 36 | <div class="info"> |
@@ -27,7 +27,7 @@ export default { | @@ -27,7 +27,7 @@ export default { | ||
27 | 27 | ||
28 | let [detail, resource, activity, recommend] = await Promise.all(queryTasks); | 28 | let [detail, resource, activity, recommend] = await Promise.all(queryTasks); |
29 | 29 | ||
30 | - resource = get(resource, '[0].data[0]', null); | 30 | + resource = get(resource, '[0].data[0]', {}); |
31 | 31 | ||
32 | commit(Types.UPDATE_PRODUCT_DETAIL, Object.assign(detail.product_info, { | 32 | commit(Types.UPDATE_PRODUCT_DETAIL, Object.assign(detail.product_info, { |
33 | resource, | 33 | resource, |
-
Please register or login to post a comment