PageSourceSearch

http://www.people.cn/img/2016wb//WeiXinDatatit2020.js

js people.cn collected 2026-10-02 02:13:00 UTC 2,894 bytes, 105 lines download raw bytes

1var shareWXData = function() {
2	peopleWXConfig.debug = false;
3	peopleWXConfig.jsApiList = [
4		'checkJsApi',
5		'onMenuShareTimeline',
6		'onMenuShareAppMessage',
7		'onMenuShareQQ',
8		'onMenuShareWeibo'
9	];
10
11	wx.config(peopleWXConfig);
12
13	wx.ready(function() {
14		wx.onMenuShareTimeline({
15			title: wxData.title, // 分享标题
16			link: wxData.link, // 分享链接
17			imgUrl: wxData.imgUrl, // 分享图标
18			success: function() {
19
20			},
21			cancel: function() {
22				// 用户取消分享后执行的回调函数
23			}
24		});
25
26		wx.onMenuShareAppMessage({
27			title: wxData.title, // 分享标题
28			link: wxData.link, // 分享链接
29			imgUrl: wxData.imgUrl, // 分享图标
30			desc: wxData.desc, // 分享描述
31			type: '', // 分享类型,music、video或link,不填默认为link
32			dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
33			success: function() {
34				// 用户确认分享后执行的回调函数
35				// alert(wxData.link + "|" + wxData.imgUrl);
36			},
37			cancel: function() {
38				// 用户取消分享后执行的回调函数
39
40			}
41		});
42
43		wx.onMenuShareQQ({
44			title: wxData.title, // 分享标题
45			link: wxData.link, // 分享链接
46			imgUrl: wxData.imgUrl, // 分享图标
47			desc: wxData.desc, // 分享描述
48			success: function() {
49				// 用户确认分享后执行的回调函数
50			},
51			cancel: function() {
52				// 用户取消分享后执行的回调函数
53			}
54		});
55
56		wx.onMenuShareWeibo({
57			title: wxData.title, // 分享标题
58			link: wxData.link, // 分享链接
59			imgUrl: wxData.imgUrl, // 分享图标
60			desc: wxData.desc, // 分享描述
61			success: function() {
62				// 用户确认分享后执行的回调函数
63			},
64			cancel: function() {
65				// 用户取消分享后执行的回调函数
66			}
67		});
68
69
70
71	});
72
73
74
75	wx.error(function(res) {
76		//alert('验证出错:' + JSON.stringify(res))
77			// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
78
79	});
80}
81
82$(function() {
83	//var src = "http://58.68.146.12/weixin/JS.js?url=" + encodeURIComponent(this.location);
84	var src = "//wx-api.people.com.cn/weixin/JS.js?url=" + encodeURIComponent(this.location);
85	var ua = navigator.userAgent.toLowerCase();//获取判断用的对象
86	if (ua.match(/MicroMessenger/i) == "micromessenger") {
87		importJs(src);//在微信中打开
88	}
89	function importJs(src) {
90		
91		var script = document.createElement('script');
92		script.src = src;
93		script.onload = script.onreadystatechange = function() {
94
95			if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
96				script.onload = script.onreadystatechange = null;				
97				setTimeout(function() {
98					shareWXData();
99				}, 200)
100			}
101		};
102		document.body.appendChild(script);
103	};
104
105})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.