PageSourceSearch

https://txdzw.com/Content/_Common/Base/js/power-weixinshare.js?v=vrnnaoTelt14PojzkQzv3MAUYAnFHbfF1kq5oeGNM7c

js txdzw.com collected 2026-10-04 05:19:14 UTC 3,850 bytes, 123 lines download raw bytes

1(function ($) {
2    var appId,
3        timeStamp,
4        nonceStr,
5        signature,
6        imgUrl,
7        title,
8        desc;
9
10    if (isWeiXinBrowser()) {
11        getWeixinShareParameters();
12    }
13
14    function setImgUrl() {
15        imgUrl = $('meta[name="Image"]').attr("content");
16    }
17
18    function setTitle() {
19        title = $('meta[name="ArticleTitle"]').attr('content');
20    }
21
22    function setDesc() {
23        title = $('meta[name="description"]').attr('content');
24    }
25
26    function getWeixinShareParameters() {
27        setImgUrl();
28        setTitle();
29        setDesc();
30        if (imgUrl || title || desc) {
31            $.ajax({
32                type: "get",
33                url: "/weixin/home/AjaxGetWeixinShareParameters",
34                dataType: 'json',
35                async: false,
36                data: { currentUrl: window.location.href },
37                success: function (data) {
38                    if (data !== false) {
39                        appId = data.appId;
40                        timeStamp = data.timestamp;
41                        nonceStr = data.nonceStr;
42                        signature = data.signature;
43                        setWxConfig();
44                    }
45                }
46            });
47        }
48    }
49
50    function setWxConfig() {
51        wx.config({
52            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
53            appId: appId, // 必填,公众号的唯一标识
54            timestamp: timeStamp, // 必填,生成签名的时间戳
55            nonceStr: nonceStr, // 必填,生成签名的随机串
56            signature: signature, // 必填,签名
57            jsApiList: [
58                "checkJsApi",
59                'onMenuShareTimeline',
60                'onMenuShareAppMessage',
61                'onMenuShareQQ',
62                'onMenuShareWeibo',
63                'hideMenuItems',
64                'showMenuItems',
65                'hideAllNonBaseMenuItem',
66                'showAllNonBaseMenuItem',
67                'translateVoice',
68                'startRecord',
69                'stopRecord',
70                'onRecordEnd',
71                'playVoice',
72                'pauseVoice',
73                'stopVoice',
74                'uploadVoice',
75                'downloadVoice',
76                'chooseImage',
77                'previewImage',
78                'uploadImage',
79                'downloadImage',
80                'getNetworkType',
81                'openLocation',
82                'getLocation',
83                'hideOptionMenu',
84                'showOptionMenu',
85                'closeWindow',
86                'scanQRCode',
87                'chooseWXPay',
88                'openProductSpecificView',
89                'addCard',
90                'chooseCard',
91                'openCard'
92            ]
93        });
94
95        wx.error(function (res) {
96            console.log(res);
97            console.warn('微信验证失败,分享功能无法正常使用!');
98        });
99
100        wx.ready(function () {
101            wx.onMenuShareTimeline({
102                title: title,
103                desc: desc,
104                imgUrl: imgUrl
105            });
106
107            wx.onMenuShareAppMessage({
108                title: title,
109                desc: desc,
110                imgUrl: imgUrl
111            });
112        });
113    }
114
115    function isWeiXinBrowser() {
116        var userAgent = window.navigator.userAgent.toLowerCase();
117        if (userAgent.match(/MicroMessenger/i) == 'micromessenger') {
118            return true;
119        } else {
120            return false;
121        }
122    }
123})(jQuery);

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.