This article mainly introduces the common components of micro-letter sharing, used in micro-trust browser to browse the Web page of the definition of sharing information, need friends can refer to the following
I. Customizable information 1, share the logo displayed, 2, share the width of the logo, 3, share the height of the logo, 4, share out the title of the display (default call page title); 5, share out the description of the display (default call page title); 6, share links ( Defaults to the URL of the current page). 7. Share the AppID of micro-letters (generally empty). II, using methods 1, the introduction of micro-letter sharing components JS: Code as follows:/******************************* * Author:Mr.Think * Description: Micro-letter sharing common code * use method: _wxshare (' share display logo ', ' logo width ', ' logo height ', ' share title ', ' Share description ', ' Share link ', ' Micro-letter AppID (general not fill) '); *******************************/function _wxshare (img,width,height,title,desc,url,appid) { / Initialization parameters Img=img| | ' Ico-share.png '; Width=width| | 100; Height=height| | 100; Title=title| | Document.title; Desc=desc| | Document.title; Url=url| | Document.location.href; appid=appid| | '; /micro-letter built-in method function _sharefriend () { Weixinjsbridge.invoke (' sendappm Essage ', { ' AppID ': AppID, &NBSP ; ' img_url ': IMG, ' img_width ': width, ' img_height ': height, ' link ': URL, &N Bsp ' desc ': desc, ' title ': Title &N Bsp }, function (res) { _report (' send_msg ', res.err_msg); }) } function _sharetl () { Weix Injsbridge.invoke (' Sharetimeline ', { ' Img_url ': IMG, ' img_width ': width, ' img_height ': height, &nb Sp ' link ': URL, ' desc ': desc, &nbs P ' title ': Title }, function (res) {&nbs P _report (' Timeline ', res.err_msg); }); } function _sharewb () { Weixinjsbridge.invoke (' Shareweibo ', {  ; ' content ': desc, ' url ': URL, &n Bsp {}, function (res) { _report (' Wei Bo ', res.err_msg); }); } //The Weixinjsbridgeready event is triggered when the micro-mail built-in browser is initialized. Document.addeventlistener (' Weixinjsbridgeready ', function Onbridgeready () { & nbsp //Send to friends Weixinjsbridge.on (' Menu:share:appmessage ', function (argv) { _sharefriend () }); //share to Friend Circle Weixinjsbridge.on (' m Enu:share:timeline ', function (argv) { _sharetl () &NB Sp }); //share to micro-blog Weixinjsbridge.on (' Men U:share:weibo ', function (argv) { _SHAREWB (); & nbsp }); }, FALSE); }