在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/HTML/ 微信分享接口問(wèn)題

微信分享接口問(wèn)題

直接上代碼了:

    $.ajax({
        url: '/wx/sdk',
        type: 'get',
        data:{
          url: encodeURIComponent(location.href.split('#')[0])
        } 
    }).done(function(msg) {
        wx.config({
          debug: true,
          appId: msg.appid,
          timestamp: msg.timestamp,
          nonceStr: msg.nonceStr,
          signature: msg.signature,
          jsApiList: ['onMenuShareTimeline']
        });//wx/config end

    wx.ready(function() {
        wx.onMenuShareTimeline({//分享朋友圈
            title: '小咳嗽',
            link: 'www.e-cough.com/product/100003',
            imgUrl: 'www.e-cough.com/uploads/1508250089609.jpeg',
            success: function(res) {
                alert('分享');
            },
            cancel: function(res) {
                alert('取消');
            }
        });//分享朋友圈 end
    });//ready end       
    });//ajax end

效果如圖:
圖片描述
圖片描述
圖片描述
圖片描述

debug沒(méi)錯(cuò)啊。很醉好嗎?求解答?。≈x謝

回答
編輯回答
編輯回答
你的瞳

很坑好嗎?'url'要加'http://'或者'https://'

2017年10月11日 07:19
編輯回答
笨小蛋

請(qǐng)問(wèn),你微信公眾號(hào)認(rèn)證了嗎,交錢(qián)了嗎,沒(méi)交的話(huà),就這個(gè)效果

2017年7月14日 10:19