document.write(""); function wxint(wxconfig){ wx.config({ debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 appId: "wx93a9ca7b02a99f4d", // 必填,公众号的唯一标识 timestamp: 1764991477, // 必填,生成签名的时间戳 nonceStr: 'bilnn', // 必填,生成签名的随机串 signature: '94e30db3455987fcdbe8cdfaee693fbb69aaa97a',// 必填,签名,见附录1 jsApiList: ["checkJsApi", "updateAppMessageShareData", "updateTimelineShareData"] }); wx.ready(function(){ wx.updateTimelineShareData({ title: wxconfig.shareTitle, // 分享标题 link: wxconfig.shareUrl, // 分享链接 imgUrl: wxconfig.imgUrl, // 分享图标 success: function () { // 用户确认分享后执行的回调函数 $.ajax({url:"/?c=api&a=share",async:false}); $(".bargain").hide(); $(".mybargain").hide(); } }); wx.updateAppMessageShareData({ title: wxconfig.shareTitle, // 分享标题 desc: wxconfig.shareTxt, // 分享描述 link: wxconfig.shareUrl, // 分享链接 imgUrl: wxconfig.imgUrl, // 分享图标 success: function () { // 用户确认分享后执行的回调函数 $.ajax({url:"/?c=api&a=share",async:false}); $(".bargain").hide(); $(".mybargain").hide(); } }); wx.error(function(res){ alert(res.errMsg); }); wx.checkJsApi({ jsApiList: [ 'getNetworkType', 'previewImage' ], success: function (res) { //alert(JSON.stringify(res)); } }); }); }