<template>
  <button style="width: 80%; height: 35px; background:#f00" @click="share">分享</button>
</template>
<script>
import Bridge from '@qg/js-bridge';
export default {
  methods: {
    share() {
      const nativeBridge = new Bridge();
      const data = {
        event: 'showShareView',
        data: {
          platform: ['weChat', 'timeLine', 'QQ', 'QQZone', 'CopyLink', 'GeneratePoster'], //依次分别是微信、朋友圈、QQ好友、QQ空间、复制链接
          shareDic: {
            title: 'aaaa',
            desc: 'bbbb',
            link: `https://www.baidu.com`, // 页面地址
            imgUrl: 'https://kdspstatic.q-gp.com/FnPUaThQoK23qZjhXTG9C8XopI4y', // 图片地址
            posterUrl: 'https://kdspstatic.q-gp.com/FnPUaThQoK23qZjhXTG9C8XopI4y' // 海报地址
          }
        }
      };
      nativeBridge.showShareView(data);
    }
  }
};
</script>
