wechat.min.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //!
  2. //function() {
  3. // var e = {
  4. // title: "嗨翻国庆",
  5. // desc: "头条系10G流量,首月免",
  6. // link: window.location.href,
  7. // imgUrl: "http://800.wo.cn/orderchannel/tt/images/dg_logo_10.png"
  8. // };
  9. !
  10. function() {
  11. var e = {
  12. title:"头条系流量攻略,首月免10GB流量",
  13. desc: "嗨翻国庆,头条系10G流量首月免,国庆期间订购头条流量包,次月返9元话费呦!",
  14. link: window.location.href,
  15. imgUrl: "http://800.wo.cn/orderchannel/tt/images/dg_logo_10.png"
  16. };
  17. $.ajax({
  18. url: getRootPath() + "-s1api" + '/jssdk/init',
  19. data: "url=" + encodeURIComponent(window.location.href),
  20. type: "get",
  21. dataType: "json",
  22. success: function(n) {
  23. wx.config({
  24. debug: !1,
  25. appId: n.appId,
  26. timestamp: n.timestamp,
  27. nonceStr: n.nonceStr,
  28. signature: n.signature,
  29. jsApiList: ["checkJsApi", "onMenuShareTimeline", "onMenuShareAppMessage"]
  30. }),
  31. wx.ready(function() {
  32. wx.checkJsApi({
  33. jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage"],
  34. success: function(e) {}
  35. }),
  36. wx.onMenuShareTimeline({
  37. title: e.title,
  38. link: e.link,
  39. imgUrl: e.imgUrl,
  40. success: function() {},
  41. cancel: function() {}
  42. }),
  43. wx.onMenuShareAppMessage({
  44. title: e.title,
  45. desc: e.desc,
  46. link: e.link,
  47. imgUrl: e.imgUrl,
  48. type: "link",
  49. dataUrl: "",
  50. success: function() {},
  51. cancel: function() {}
  52. }),
  53. wx.hideMenuItems({
  54. menuList: ["menuItem:copyUrl"]
  55. })
  56. })
  57. }
  58. })
  59. } ();