|
@@ -14,9 +14,11 @@ |
|
@@ -14,9 +14,11 @@ |
14
|
</template>
|
14
|
</template>
|
15
|
|
15
|
|
16
|
<script>
|
16
|
<script>
|
|
|
17
|
+import {keys} from 'lodash';
|
17
|
import ArticleItemHeader from '../article/article-item-header';
|
18
|
import ArticleItemHeader from '../article/article-item-header';
|
18
|
import {getDetailShareData} from 'utils/share-handler';
|
19
|
import {getDetailShareData} from 'utils/share-handler';
|
19
|
import {mapState} from 'vuex';
|
20
|
import {mapState} from 'vuex';
|
|
|
21
|
+import Button from 'cube-ui/src/components/button/button';
|
20
|
|
22
|
|
21
|
export default {
|
23
|
export default {
|
22
|
name: 'ArticleDetailHeader',
|
24
|
name: 'ArticleDetailHeader',
|
|
@@ -84,7 +86,12 @@ export default { |
|
@@ -84,7 +86,12 @@ export default { |
84
|
}
|
86
|
}
|
85
|
},
|
87
|
},
|
86
|
onShare() {
|
88
|
onShare() {
|
87
|
- this.$yoho.share(getDetailShareData(this.data));
|
89
|
+ const share = getDetailShareData(this.data);
|
|
|
90
|
+
|
|
|
91
|
+ keys(this.data.atUserInfo).forEach(k => {
|
|
|
92
|
+ share.desc = share.desc.replace(new RegExp(`@${k}#`, 'gm'), `@${this.data.atUserInfo[k]}`);
|
|
|
93
|
+ });
|
|
|
94
|
+ this.$yoho.share(share);
|
88
|
},
|
95
|
},
|
89
|
onFollow() {
|
96
|
onFollow() {
|
90
|
return parseInt(this.step, 10) / 100;
|
97
|
return parseInt(this.step, 10) / 100;
|
|
@@ -94,6 +101,7 @@ export default { |
|
@@ -94,6 +101,7 @@ export default { |
94
|
}
|
101
|
}
|
95
|
},
|
102
|
},
|
96
|
components: {
|
103
|
components: {
|
|
|
104
|
+ Button,
|
97
|
ArticleItemHeader,
|
105
|
ArticleItemHeader,
|
98
|
}
|
106
|
}
|
99
|
};
|
107
|
};
|