PageSourceSearch

https://www.jimei.cn/static/js/wxshare.js

js jimei.cn collected 2026-10-04 15:57:06 UTC 2,113 bytes, 64 lines download raw bytes

1$(function(){
2
3    var url =window.location.href.split('#')[0];//用户要分享的网址
4    var title  = $(document).attr("title");//分享的标题
5    var shareUrl = $("meta[name=image]").prop('content')
6    var img = shareUrl.indexOf('http') === -1 ? location.origin + shareUrl: shareUrl;//分享的图片
7    var desc = $("meta[name=description]").prop("content");//分享的描述信息
8
9    var ua = navigator.userAgent.toLowerCase();//获取判断用的对象s
10    if (ua.match(/MicroMessenger/i) == "micromessenger") {
11        //微信分享
12        $.ajax({
13            url:"https://www.jimei.cn/front/wx/share?url="+url,
14            type: "get",
15            dateType: "json",
16            success:function(res){
17                wx.config({
18                    debug: false,
19                    appId: res.data.appId,
20                    timestamp: res.data.timestamp,
21                    nonceStr: res.data.nonceStr,
22                    signature: res.data.signature,
23                    jsApiList: [
24                        'checkJsApi',
25                        'onMenuShareTimeline',
26                        'onMenuShareAppMessage',
27                        'onMenuShareQQ',
28                        'onMenuShareWeibo',
29                        'onMenuShareQZone'
30                    ]
31                });
32            },
33            error:function () {
34            }
35        });
36
37        var shareConfig={
38            title: title, // 分享标题
39            desc: desc, // 分享描述
40            link: url, // 分享链接
41            imgUrl: img, // 分享图标
42            success: function () {
43            },
44            cancel: function () {
45                // 用户取消分享后执行的回调函数
46            }
47        };
48
49        wx.ready(function(){
50            //微信朋友圈
51            wx.onMenuShareTimeline(shareConfig);
52            //发送给微信好友
53            wx.onMenuShareAppMessage(shareConfig);
54            //腾讯微博
55            wx.onMenuShareWeibo(shareConfig);
56            //QQ空间
57            wx.onMenuShareQZone(shareConfig);
58        });
59    }
60});
61
62
63
64

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.