wechatcj.min.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. !
  2. function() {
  3. var e = {
  4. title:"新年新享受,头条系10GB流量豪礼不断",
  5. desc: "抖音放肆刷!次月还有话费相赠哦!",
  6. link: window.location.href,
  7. imgUrl: "http://800.wo.cn/orderchannel/hd/Dy/images/dyfx.png"
  8. };
  9. $.ajax({
  10. url: getRootPath() + "-s1api" + '/jssdk/init',
  11. data: "url=" + encodeURIComponent(window.location.href),
  12. type: "get",
  13. dataType: "json",
  14. success: function(n) {
  15. wx.config({
  16. debug: !1,
  17. appId: n.appId,
  18. timestamp: n.timestamp,
  19. nonceStr: n.nonceStr,
  20. signature: n.signature,
  21. jsApiList: ["checkJsApi", "onMenuShareTimeline", "onMenuShareAppMessage"]
  22. }),
  23. wx.ready(function() {
  24. wx.checkJsApi({
  25. jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage"],
  26. success: function(e) {}
  27. }),
  28. wx.onMenuShareTimeline({
  29. title: e.title,
  30. link: e.link,
  31. imgUrl: e.imgUrl,
  32. success: function() {},
  33. cancel: function() {}
  34. }),
  35. wx.onMenuShareAppMessage({
  36. title: e.title,
  37. desc: e.desc,
  38. link: e.link,
  39. imgUrl: e.imgUrl,
  40. type: "link",
  41. dataUrl: "",
  42. success: function() {},
  43. cancel: function() {}
  44. }),
  45. wx.hideMenuItems({
  46. menuList: ["menuItem:copyUrl"]
  47. })
  48. })
  49. }
  50. })
  51. } ();