Authored by 郭成尧

sharelink

1 <template> 1 <template>
2 - <div>  
3 - <brand-top-component v-bind:share-data="123456"></brand-top-component>  
4 - </div> 2 + <brand-top-component v-bind:share-Link="shareLink"></brand-top-component>
5 </template> 3 </template>
6 -<style>  
7 4
8 -</style>  
9 <script> 5 <script>
10 const brandTopComponent = require('channel/brand-top.vue'); 6 const brandTopComponent = require('channel/brand-top.vue');
11 7
  8 + let shareLink = 'http://www.yohobuy.com';
  9 +
12 module.exports = { 10 module.exports = {
  11 + data() {
  12 + return {
  13 + shareLink: shareLink
  14 + };
  15 + },
13 components: { 16 components: {
14 brandTopComponent 17 brandTopComponent
15 } 18 }
@@ -10,6 +10,8 @@ @@ -10,6 +10,8 @@
10 const resources = require('channel/resources.vue'); 10 const resources = require('channel/resources.vue');
11 const letterList = require('channel/letter-list.vue'); 11 const letterList = require('channel/letter-list.vue');
12 12
  13 + require('common/vue-filter');
  14 +
13 module.exports = { 15 module.exports = {
14 components: { 16 components: {
15 resources, 17 resources,
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <i class="back"></i> 3 <i class="back"></i>
4 <div class="right"> 4 <div class="right">
5 <i class="favorite"></i> 5 <i class="favorite"></i>
6 - <a class="share" href="{{shareData}}"></a> 6 + <a class="share" href="{{ shareLink }}"></a>
7 <i class="filter"></i> 7 <i class="filter"></i>
8 </div> 8 </div>
9 </div> 9 </div>
@@ -57,6 +57,15 @@ @@ -57,6 +57,15 @@
57 57
58 <script> 58 <script>
59 module.exports = { 59 module.exports = {
60 - props: ['shareData'] 60 + props: {
  61 + shareLink: {
  62 + type: String
  63 + }
  64 + },
  65 + methods: {
  66 + getShareLink() {
  67 + return '1234';
  68 + }
  69 + }
61 }; 70 };
62 </script> 71 </script>