1

onLoad: function (opt) {
wx.showShareMenu({

  withShareTicket: true

  })
if (opt){
// let haha =JSON.parse(opt);
console.log(JSON.parse(opt.ones));
}
},
 
 
 
onShareAppMessage: function () {
let arrChe = this.data.ones;
return {
title: '小程序自定义转发标题',
path: '/pages/newone/newone?ones=' + JSON.stringify(arrChe) ,
success: function (res) {
var shareTickets = res.shareTickets;
console.log(shareTickets + "初始shareTickets ")
if (shareTickets.length == 0) {
return false;
}
wx.getShareInfo({
shareTicket: shareTickets[0],
success: function (res) {
var encryptedData = res.encryptedData;
var iv = res.iv;
console.log(encryptedData+"初始数据")
}
})
},

fail: function (res) {
console.log(res+"失败")
// 转发失败

}

}
}
posted @ 2018-02-03 07:44  ThisCall  阅读(144)  评论(0编辑  收藏  举报