Click to share to moments in the react project component, and there is no response.

problem description

in the react project, the configuration information of Wechat official account has been successfully configured in a component entry js file. When you click the button in the sub-components of this component, you can share to moments and other sharing functions. Button clicks can be monitored locally, but Wechat shares no response. What should I do? Did I write it wrong? Or how do you want to test it?

the environmental background of the problems and what methods you have tried

1. Wechat notarization account configuration information has been configured, prompting {"errMsg": "config:ok"}
2, react project, Wechat configuration information is placed in the component entry, Wechat sharing events are placed in the public sub-components
3, tested in Wechat on the phone and Wechat developer tools, click on non-response
4, local development, using IP address. The js security domain name of the test number is filled in with the local test address
5, and the post request method is encapsulated by myself

.

related codes

A.js
class A extends Component{
    componentWillMount() {
        let params = {...}
        post("/wx/xxxx", params).then(data => {
          window.wx.config({
            debug: true, // ,apialertpclogpc
            appId: ***, // 
            timestamp: ***, // 
            nonceStr: ***, // 
            signature: ***,// 
            jsApiList: *** // JS
          });
        })
     }
     render(){
         return(
             <div>
                 ...
                 <Child />
             </div>
         )
     }
  }
  
  :Child.js
  class Child extends Component{
      share = () => {
          console.log("--share start--")   //
          window.wx.onMenuShareTimeline({        //
            title: "",
            link: "http://192.168.1.26:5002/activity/share", // JS
            imgUrl: "",
            success: function () {
                alert("")
            }
        });
      }
      
      getElement() {
        return (
            <div>
               ...
                <Button onClick={()=> this.share()}></Button>  //
            </div>
        )
      }
      render(){
          return (
              <div>
                  ...
                  {this.props.xxx ? this.getElement(): <B /> }
              </div>
          )
      }
  }


what result do you expect? What is the error message actually seen?

Interface prompt {"errMsg": "config:ok"}
console print:-- share start--
Gods, is my code wrong? Or is my test method wrong?
set up an official account for the first time. I don"t know if it is right or wrong, and I don"t know how to modify it. Please give me some advice. Thank you ~


Wechat sharing can only be shared in the upper right corner. The API window.wx.onMenuShareTimeline is the sharing configuration information shared to the moments. According to the above, the logic should be: click the button, set the sharing information to the moments, and click the upper right corner to see the set sharing information

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30500-2aa4a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30500-2aa4a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?