Commit c93bd61d authored by Xuguangxing's avatar Xuguangxing

fix

parent a2fb8c4f
...@@ -13,14 +13,6 @@ export default [ ...@@ -13,14 +13,6 @@ export default [
}, },
component: () => import('../components/error') component: () => import('../components/error')
}, },
{
path: '/share-test',
name: 'share-test',
meta: {
title: '出错了'
},
component: () => import('../views/test/share-test.vue')
},
{ {
path: '*', path: '*',
name: 'notFound', name: 'notFound',
......
<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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment