index-legacy-357dcc23.js 1.3 KB

1
  1. System.register(["./index-legacy-0155d8eb.js","./index-legacy-ea795493.js"],(function(e,n){"use strict";var t,a;return{setters:[e=>{t=e.D},e=>{a=e.w}],execute:function(){e("u",(function(e,n,i){const o=t=>{a.config({debug:!1,appId:t.appId,timestamp:t.timestamp,nonceStr:t.nonceStr,signature:t.signature,jsApiList:["updateAppMessageShareData","updateTimelineShareData","onMenuShareAppMessage","onMenuShareTimeline"]}),a.ready((function(){console.log("wx.ready called"),a.updateAppMessageShareData({title:e,desc:n,link:window.location.href,imgUrl:i,success:function(){console.log("updateAppMessageShareData 设置成功")}}),a.onMenuShareAppMessage({title:e,desc:n,link:window.location.href,imgUrl:i,type:"link",success:function(){console.log("onMenuShareAppMessage 设置成功")},cancel:function(){}}),a.onMenuShareTimeline({title:e,link:window.location.href,imgUrl:i,success:function(){console.log("onMenuShareTimeline 设置成功")},cancel:function(){}}),a.updateTimelineShareData({title:e,link:window.location.href,imgUrl:i,success:function(){console.log("updateTimelineShareData 设置成功")}})})),a.error((function(e){}))};return{getAppSignature:()=>{t.get("/edu-app/open/wechat/getSignature",{params:{url:window.location.href}}).then((e=>{200===e.code?o(e.data):console.log("获取微信分享签名失败")}))}}}))}}}));