Commit b3494b2e authored by wildfirecode13's avatar wildfirecode13

u

parent 97a40010
import { start, WeixinMini, updateShare } from '@spark/share'
// import { start, WeixinMini, updateShare } from '@spark/share'
export const startShare=()=>{
console.log('start WeixinMini')
start([WeixinMini], (way, success, payload) => {
console.log('分享' + success ? '成功' : '失败');
console.log('wx.miniProgram.postMessage')
// start([WeixinMini], (way, success, payload) => {
// console.log('分享' + success ? '成功' : '失败');
updateShare({
title: '我正在参加d\'zzit拆盲盒', //分享标题
content: '一起来吧~惊喜好物等着你', //分享内容
url: 'https://85337.activity-1.m.duiba.com.cn/projectx/pf80f49cf/index.html?appID=85337&iscustom=1&issharepage=1', //分享链接
thumbnail: 'https://yun.duiba.com.cn/db_games/disulogo.jpg', //分享缩略图
});
// updateShare({
// title: '我正在参加d\'zzit拆盲盒', //分享标题
// content: '一起来吧~惊喜好物等着你', //分享内容
// url: 'https://85337.activity-1.m.duiba.com.cn/projectx/pf80f49cf/index.html?appID=85337&iscustom=1&issharepage=1', //分享链接
// thumbnail: 'https://yun.duiba.com.cn/db_games/disulogo.jpg', //分享缩略图
// });
});
// });
//@ts-ignore
wx.miniProgram.postMessage(
{
dataIntent:1,//必传 1参数用于分享
limitation:0,//进入条件 0随便进;1开卡会员;2认证会员
sharable:1,//被分享者打开后能否进行分享 0不能;1可以
title:"我正在参加d\'zzit拆盲盒",
imageUrl:"https://yun.duiba.com.cn/db_games/disulogo.jpg",//分享弹窗显示的图片
h5url:"https://85337.activity-1.m.duiba.com.cn/projectx/pf80f49cf/index.html?appID=85337&iscustom=1&issharepage=1",//分享的链接(不需要encode)
}
)
}
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