|
|
|
@ -9,7 +9,6 @@ Vue.prototype.wxShare = function(params) { |
|
|
|
var params = params || {}; |
|
|
|
|
|
|
|
wxShareModel.getShare(params).then(response => { |
|
|
|
console.log('2222222') |
|
|
|
if (response.code != 0) { |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -17,7 +16,7 @@ Vue.prototype.wxShare = function(params) { |
|
|
|
var jsApiSignConfig = response.response.jsApiSignConfig; |
|
|
|
var shareConfig = response.response.shareConfig; |
|
|
|
wx.config({ |
|
|
|
debug: false, // 开启调试模式,开发时可以开启
|
|
|
|
debug: true, // 开启调试模式,开发时可以开启
|
|
|
|
appId: jsApiSignConfig.appId, // 必填,公众号的唯一标识 由接口返回
|
|
|
|
timestamp: jsApiSignConfig.timestamp, // 必填,生成签名的时间戳 由接口返回
|
|
|
|
nonceStr: jsApiSignConfig.nonceStr, // 必填,生成签名的随机串 由接口返回
|
|
|
|
@ -30,9 +29,7 @@ Vue.prototype.wxShare = function(params) { |
|
|
|
"onMenuShareQZone" |
|
|
|
] |
|
|
|
}); |
|
|
|
console.log('shareConfig.link:'+shareConfig.url) |
|
|
|
wx.ready(() => { |
|
|
|
console.log('shareConfig.link:'+shareConfig.url) |
|
|
|
//获取“分享给朋友”按钮点击状态及自定义分享内容接口
|
|
|
|
wx.onMenuShareAppMessage({ |
|
|
|
// 分享给朋友
|
|
|
|
|