1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //!
- //function() {
- // var e = {
- // title: "嗨翻国庆",
- // desc: "头条系10G流量,首月免",
- // link: window.location.href,
- // imgUrl: "http://800.wo.cn/orderchannel/tt/images/dg_logo_10.png"
- // };
- !
- function() {
- var e = {
- title:"头条系流量攻略,首月免10GB流量",
- desc: "嗨翻国庆,头条系10G流量首月免,国庆期间订购头条流量包,次月返9元话费呦!",
- link: window.location.href,
- imgUrl: "http://800.wo.cn/orderchannel/tt/images/dg_logo_10.png"
- };
- $.ajax({
- url: getRootPath() + "-s1api" + '/jssdk/init',
- data: "url=" + encodeURIComponent(window.location.href),
- type: "get",
- dataType: "json",
- success: function(n) {
- wx.config({
- debug: !1,
- appId: n.appId,
- timestamp: n.timestamp,
- nonceStr: n.nonceStr,
- signature: n.signature,
- jsApiList: ["checkJsApi", "onMenuShareTimeline", "onMenuShareAppMessage"]
- }),
- wx.ready(function() {
- wx.checkJsApi({
- jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage"],
- success: function(e) {}
- }),
- wx.onMenuShareTimeline({
- title: e.title,
- link: e.link,
- imgUrl: e.imgUrl,
- success: function() {},
- cancel: function() {}
- }),
- wx.onMenuShareAppMessage({
- title: e.title,
- desc: e.desc,
- link: e.link,
- imgUrl: e.imgUrl,
- type: "link",
- dataUrl: "",
- success: function() {},
- cancel: function() {}
- }),
- wx.hideMenuItems({
- menuList: ["menuItem:copyUrl"]
- })
- })
- }
- })
- } ();
|