Authored by ityuany

微信分享@

... ... @@ -14,9 +14,11 @@
</template>
<script>
import {keys} from 'lodash';
import ArticleItemHeader from '../article/article-item-header';
import {getDetailShareData} from 'utils/share-handler';
import {mapState} from 'vuex';
import Button from 'cube-ui/src/components/button/button';
export default {
name: 'ArticleDetailHeader',
... ... @@ -84,7 +86,12 @@ export default {
}
},
onShare() {
this.$yoho.share(getDetailShareData(this.data));
const share = getDetailShareData(this.data);
keys(this.data.atUserInfo).forEach(k => {
share.desc = share.desc.replace(new RegExp(`@${k}#`, 'gm'), `@${this.data.atUserInfo[k]}`);
});
this.$yoho.share(share);
},
onFollow() {
return parseInt(this.step, 10) / 100;
... ... @@ -94,6 +101,7 @@ export default {
}
},
components: {
Button,
ArticleItemHeader,
}
};
... ...
{
"name": "yoho-community-web",
"version": "6.9.8-beta43",
"version": "6.9.8-beta44",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...