React ios调用微信jssdk分享的问题

#1
 url=Global.url;
        formData.append('url',url)
        fetch(webURL+'share',{method:'POST',body:formData}).then((response) => response.json()).then((responseText) => {
            let configmsg={
                debug: false,
                appId: responseText.data.appid,
                timestamp: responseText.data.time,
                nonceStr: responseText.data.nonce,
                signature: responseText.data.signature,
                jsApiList: ['showMenuItems','hideMenuItems','onMenuShareAppMessage','onMenuShareTimeline']}
            window.wx.config(configmsg);
            window.wx.ready(function(){
                window.wx.onMenuShareTimeline({
                    title: desc,
                    link:link,
                    imgUrl: 'http://gongzuolaile.oss-cn-beijing.aliyuncs.com/icon/logo.png',
                    success:function () {
                        console.log('success')
                        window.TDAPP.onEvent("分享",desc,Global.uid);
                    },
                    fail:function(){
                        alert('error')
                    }
                });
            });
        })

路由用的是react-router,在第一次进入的时候将window.location.href保存为全局变量,每个页面获取签名的时候都是用的这个url,config都ok,第一次进入页面的时候分享也都正常,但是页面一旦跳转分享的链接等设置就又都为默认,config也都显示ok,已经排除签名失败、安全域名等问题。
这个问题已经困扰我很久了,恳请各位大神帮忙解决。

#2

监听路由变化,每次跳转页面后重新进行一下微信config

#3

现在就是这样,还是不行

#4

你定义的分享链接注意要在同一个域名下才行