Authored by Aiden Xu

商品详情

1 <template> 1 <template>
2 <div class="top-nav"> 2 <div class="top-nav">
3 - <a class="left no-intercept" href="javascript:void(0);" @click="yoho.goBack()"> 3 + <a class="left" href="javascript:void(0);" @click="yoho.goBack()">
4 <span class="icon icon-left"></span> 4 <span class="icon icon-left"></span>
5 </a> 5 </a>
6 6
7 - <a class="right no-intercept" href="javascript:void(0);" @click="yoho.goShare()"> 7 + <a class="right" href="javascript:void(0);" @click="share()">
8 <span class="icon icon-share"></span> 8 <span class="icon icon-share"></span>
9 </a> 9 </a>
10 </div> 10 </div>
@@ -16,7 +16,6 @@ @@ -16,7 +16,6 @@
16 font-size: 40px; 16 font-size: 40px;
17 padding: 30px; 17 padding: 30px;
18 width: 100%; 18 width: 100%;
19 - top: 60px;  
20 19
21 .left { 20 .left {
22 float: left; 21 float: left;
@@ -25,14 +24,29 @@ @@ -25,14 +24,29 @@
25 .right { 24 .right {
26 float: right; 25 float: right;
27 } 26 }
  27 +
28 } 28 }
29 </style> 29 </style>
30 <script> 30 <script>
  31 + const yoho = require('yoho');
  32 +
31 module.exports = { 33 module.exports = {
32 data() { 34 data() {
33 return { 35 return {
34 - yoho: require('yoho') 36 + yoho: yoho
35 }; 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 + }
36 } 50 }
37 }; 51 };
38 </script> 52 </script>