PageSourceSearch

https://runfox.com/static/js/shareLib.js

js runfox.com collected 2026-09-24 11:52:42 UTC 2,372 bytes, 53 lines download raw bytes

1$(function () {
2
3    //获取js ticket
4    $.ajax({
5        url: 'http://debug.runfox.com/school/wx/getJsSign',
6        data: {reqUrl: location.href},
7        type: 'post',
8        success: function (data) {
9            console.log(data)
10            wx.config({
11                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
12                appId: data.appId, // 必填,公众号的唯一标识
13                timestamp: data.timestamp, // 必填,生成签名的时间戳
14                nonceStr: data.nonceStr, // 必填,生成签名的随机串
15                signature: data.signature,// 必填,签名
16                jsApiList: [
17                    'onMenuShareTimeline',
18                    'onMenuShareAppMessage'
19                ] // 必填,需要使用的JS接口列表
20            });
21        }
22
23    });
24
25});
26
27function shareConfig(title, desc, linkUrl, imgUrl){
28	// config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
29    wx.ready(function () {
30        //分享
31        wx.onMenuShareAppMessage({
32            title: title, // 分享标题
33            desc: desc, // 分享描述
34            link: linkUrl, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
35            imgUrl: imgUrl, // 分享图标
36            success: function () {
37                // 用户点击了分享后执行的回调函数
38            }
39        });
40
41        wx.onMenuShareTimeline({
42            title: title, // 分享标题
43            desc: desc, // 分享描述
44            link: linkUrl, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
45            imgUrl: imgUrl, // 分享图标
46            success: function () {
47                // 用户点击了分享后执行的回调函数
48            }
49        });
50
51    });
52}
53

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.