国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - WeChat "Share to Moments" customized sharing content cannot successfully call the jssdk interface, I don't know why
滿(mǎn)天的星座
滿(mǎn)天的星座 2017-07-05 10:59:14
0
5
1201

WeChat "Share to Moments" customizes the jssdk interface for sharing content. For some reason, the result is not the set title description and picture.
√The official account has been certified.
√The js safe domain name in the function settings is the same as the domain name of the opened page.
√debug: true When turned on, there is no problem with the configuration.
√checkJsApi also pops up the support interface.

but! ! ! The results turned out to be incompatible! The result is that the title description and image are not set.
Who knows? ?

code show as below:

var wechat_img={$wechat_share}[0];
var wechat_title={$wechat_share}[1];
var wechat_desc={$wechat_share}[2];    
wx.config({
    debug: true,
    appId: {$signPackage}["appid"],
    timestamp: {$signPackage}["timestamp"]+'',
    nonceStr: {$signPackage}["nonceStr"],
    signature: {$signPackage}["signature"],
    jsApiList: [
        'checkJsApi',
        'onMenuShareTimeline',
        'onMenuShareAppMessage'                
    ]
});

wx.ready(function(){     
    wx.checkJsApi({
        jsApiList: ['onMenuShareTimeline'], // 需要檢測(cè)的JS接口列表,所有JS接口列表見(jiàn)附錄2,
    });

    wx.onMenuShareTimeline({
        title: wechat_tile, // 分享標(biāo)題
        link: {$signPackage}["url"], // 分享鏈接
        imgUrl: wechat_img, // 分享圖標(biāo)
        success: function () { 
            alert('thanks for share');
        },
        cancel: function () { 
            // 用戶(hù)取消分享后執(zhí)行的回調(diào)函數(shù)
        }
    });

    wx.onMenuShareAppMessage({
        title: wechat_tile, // 分享標(biāo)題
        desc: wechat_desc, // 分享描述
        link: {$signPackage}["url"], // 分享鏈接
        imgUrl: wechat_img, // 分享圖標(biāo)
        type: '', // 分享類(lèi)型,music、video或link,不填默認(rèn)為link
        dataUrl: '', // 如果type是music或video,則要提供數(shù)據(jù)鏈接,默認(rèn)為空
        success: function () { 
            alert('thanks for share');
        },
        cancel: function () { 
            // 用戶(hù)取消分享后執(zhí)行的回調(diào)函數(shù)
        }
    });

});



##

滿(mǎn)天的星座
滿(mǎn)天的星座

reply all(5)
過(guò)去多啦不再A夢(mèng)

The final solution to the problem is to use multiple different events to trigger wx.onMenuShareAppMessage.
Every imaginable event is used, windows.onoad, document.ontouchstart...

女神的閨蜜愛(ài)上我

Is link also a safe domain name?

My situation was similar to yours before, that is, the link was not a secure domain name set by the official account.

三叔

First check if there is any problem with the waiting time
Directly adjust the share method in ready to see if it has any effect

三叔

mark it

ringa_lee

If you are testing now, the domain name must be registered

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template