/* //#ifdef H5 const url = encodeURIComponent(window.location.href.split('#')[0]); let params = 'url='+url getWeixinShareParams(params).then(res => { let {data,status,msg} = res; if(status === 10000){ let s = data; that.$wx.config({ debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId: s.appid, // 必填,公众号的唯一标识 timestamp: s.timestamp, // 必填,生成签名的时间戳 nonceStr: s.noncestr, // 必填,生成签名的随机串 signature: s.signature,// 必填,签名 jsApiList: ['onMenuShareAppMessage', 'onMenuShareTimeline'] // 必填,需要使用的JS接口列表 }); that.$wx.ready(function () { //分享到朋友 that.$wx.onMenuShareAppMessage({ title: "快戳我啊!让您享受白菜价网购的快感", // 分享标题 desc: "先领优惠券再下单享受折上折,各种大额优惠券让你领到手软呦!快戳我!快戳我!", // 分享描述 link: window.location.href, // 分享链接 imgurl: "https://himg.bdimg.com/sys/portrait/item/wise.1.ce97d70.5dsprhrSJv7ZbQlgHuspsg.jpg?time=4105", // 分享图标 type: 'link', // 分享类型,music、video或link,不填默认为link success: function () { //alert("分享成功"); that.$message.success('分享成功'); }, cancel: function () { //alert("未分享!"); that.$message.success('分享取消'); } }); that.$wx.onMenuShareTimeline({ title: "快戳我!让您享受白菜价网购的快感", // 分享标题 desc: "先领优惠券再下单享受折上折,各种大额优惠券让你领到手软呦!快戳我!快戳我!", // 分享描述 link: window.location.href, // 分享链接 imgurl: "https://himg.bdimg.com/sys/portrait/item/wise.1.ce97d70.5dsprhrSJv7ZbQlgHuspsg.jpg?time=4105", // 分享图标 trigger: function (res) { }, success: function (res) { that.$message.success('分享成功'); }, cancel: function (res) { that.$message.success('分享取消'); }, fail: function (res) { } }); }); } }); //#endif */
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。