wechat.min.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. !function() {
  2. var e = {
  3. title:"【学习强国】专属免流,积分赞不停!",
  4. desc: " 学霸!请接好这份属于你的通关秘籍!",
  5. link: window.location.href,
  6. imgUrl: "http://800.wo.cn/orderchannel/common/wximg/wx_qg.png"
  7. };
  8. $.ajax({
  9. url: getRootPath() + "-s1api" + '/jssdk/init',
  10. data: "url=" + encodeURIComponent(window.location.href),
  11. type: "get",
  12. dataType: "json",
  13. success: function(n) {
  14. wx.config({
  15. debug: !1,
  16. appId: n.appId,
  17. timestamp: n.timestamp,
  18. nonceStr: n.nonceStr,
  19. signature: n.signature,
  20. jsApiList: ["checkJsApi", "onMenuShareTimeline", "onMenuShareAppMessage"]
  21. }),
  22. wx.ready(function() {
  23. wx.checkJsApi({
  24. jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage"],
  25. success: function(e) {}
  26. }),
  27. wx.onMenuShareTimeline({
  28. title: e.title,
  29. link: e.link,
  30. imgUrl: e.imgUrl,
  31. success: function() {},
  32. cancel: function() {}
  33. }),
  34. wx.onMenuShareAppMessage({
  35. title: e.title,
  36. desc: e.desc,
  37. link: e.link,
  38. imgUrl: e.imgUrl,
  39. type: "link",
  40. dataUrl: "",
  41. success: function() {},
  42. cancel: function() {}
  43. }),
  44. wx.hideMenuItems({
  45. menuList: ["menuItem:copyUrl"]
  46. })
  47. })
  48. }
  49. })
  50. } ();