Authored by Aiden Xu

商品详情

1 <template> 1 <template>
2 - <top-nav></top-nav> 2 + <top-nav :title="entity.productName"></top-nav>
3 <show-box :is-first="true"> 3 <show-box :is-first="true">
4 <image-carousel :goods="entity.goodsList"></image-carousel> 4 <image-carousel :goods="entity.goodsList"></image-carousel>
5 <div class="title-box"> 5 <div class="title-box">
@@ -4,8 +4,8 @@ @@ -4,8 +4,8 @@
4 <span class="icon icon-left"></span> 4 <span class="icon icon-left"></span>
5 </a> 5 </a>
6 6
7 - <a class="right" href="javascript:void(0);" @click="yoho.goShare()">  
8 - <span class="icon icon-right"></span> 7 + <a class="right" href="javascript:void(0);" @click="share()">
  8 + <span class="icon icon-share"></span>
9 </a> 9 </a>
10 </div> 10 </div>
11 </template> 11 </template>
@@ -24,14 +24,29 @@ @@ -24,14 +24,29 @@
24 .right { 24 .right {
25 float: right; 25 float: right;
26 } 26 }
  27 +
27 } 28 }
28 </style> 29 </style>
29 <script> 30 <script>
  31 + const yoho = require('yoho');
  32 +
30 module.exports = { 33 module.exports = {
31 data() { 34 data() {
32 return { 35 return {
33 - yoho: require('yoho') 36 + yoho: yoho
34 }; 37 };
  38 + },
  39 + props: {
  40 + title: 'String'
  41 + },
  42 + methods: {
  43 + share: function() {
  44 + yoho.goShare({
  45 + title: this.title || '',
  46 + des: '我在BLK发现了一个不错的商品,快来看看吧!',
  47 + url: location.href
  48 + });
  49 + }
35 } 50 }
36 }; 51 };
37 </script> 52 </script>