When Wechat shared, the title, thumbnail and description didn't work well.

    
 <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js?v=${RES_VERSION}"></script>
    <script>
        wx.config({
            debug: false,
            appId: "${jsapiSign.appId}", 
            timestamp: "${jsapiSign.timestamp}", 
            nonceStr: "${jsapiSign.nonceStr}", 
            signature: "${jsapiSign.signature}",
            jsApiList: [
                "onMenuShareTimeline",
                "onMenuShareAppMessage",
                "onMenuShareQQ",
                "onMenuShareWeibo",
                "onMenuShareQZone",
                "chooseWXPay"
            ]
        });
    
        wx.ready(function () {
            var title = "${name}";
            var desc = "${summary}";
            var link = "${jsapiSign.url}";
            var img = "${pic}";
            
            wx.onMenuShareAppMessage({
                title: title, // 
                desc: desc, // 
                link: link, // 
                imgUrl: img, // 
                type: "", // ,musicvideolinklink
                dataUrl: "", // typemusicvideo
                success: function () { 
                    // 
                    //alert("");
                },
                cancel: function () { 
                    // 
                }
            });
    
            wx.onMenuShareTimeline({
                title: title, // 
                link: link, // 
                desc: desc,
                imgUrl: img, // 
                success: function () { 
                    // 
                    //alert("");
                },
                cancel: function () { 
                    // 
                }
            });
            
             wx.onMenuShareQQ({
                title: title, // 
                link: link, // 
                imgUrl: img, // 
                desc: desc, // 
                success: function () { 
                    //alert("");
                   // 
                },
                cancel: function () { 
                   // 
                }
            });
            
             wx.onMenuShareWeibo({
                title: title, // 
                link: link, // 
                imgUrl: img, // 
                desc: desc, // 
                success: function () { 
                   // 
                },
                cancel: function () { 
                   // 
                }
            });
            
            wx.onMenuShareQZone({
                title: title, // 
                link: link, // 
                imgUrl: img, // 
                desc: desc, // 
                success: function () { 
                   // 
                },
                cancel: function () { 
                   // 
                }
            }); 
            
          });
    </script>
    </head>
    <body>
    
Mar.22,2021

  1. jssdk uses version 1.0.0. It is recommended to upgrade to above 1.2.0, otherwise iOS will have potential compatibility problems
  2. The value of the
  3. timestamp entry is not a string, but a large integer

13323

< font color= "red" > 12321312 < font > < / font > p > ziti < font > < < / font > / p > 12321412 < / font >

Menu