或在微信公众号里搜索"红薯"{{else}}
微信公众号
微信内可长按识别
或在微信公众号里搜索"热血刊"{{if}}
!--底结束--!--代码开始--varsexfg'nv'varbid''varchapterid''格式化参数functionforatparasdata{vararrforvarnaedata{arrphendeuriponentnae+""+endeuriponentdatanae}arrph"v"+athrandorepce"",""returnarrjo"ap"}doonerrorfunctionerroressa,scripturi,lenuber,nnuber,errorobj{这里用原生的方法去截获if!scripturiapap!lenuberapap!nnuber{returntrue}varurl"jslogdexhtl"try{1创建xlreest对象这是xlreuest对象无部使用中最复杂的一步需要针对ie和其他类型的浏览器建立这个对象的不同方式写不同的代码varxlreestifdoxlreest{针对firefox,ozilr,opera,safari,ie7,ie8xlreestnexlreest针对某些特定版本的ozilr浏览器的bug进行修正ifxlreestoverrideietype{xlreestoverrideietype"textxl"}}elseifdoactivexobject{针对ie6,ie55,ie5两个可以用于创建xlreest对象的控件名称,保存在一个js的数组中排在前面的版本较新varactivexnae"sxl2xl","icroftxl"forvari0i300||xlreeststat-1||navigatorerantdexof"baidu"!-1{'liunqi'sho}!--代码结束--!--微信jssdk--varuadonavigatoreranttoloercasevarurlparseurl'','restsajaxechatcfg','do'ifuaatchicroessenri'icroessenr'{iftypeofeixjs
id"undefed"{ifdocuentaddeventlistener{docuentaddeventlistener'eixjs
idready',on
idready,false}elseifdocuentattachevent{docuentattachevent'eixjs
idready',on
idreadydocuentattachevent'oneixjs
idready',on
idready}}else{on
idready}functionon
idready{ajax{url:url,type:"post",data:{url:'htt:hongshuerlogdo?fuhtt3a2f2fhongshu2f2f1001172f361423do'},datatype:'jn',suess:functionjn{ifjnhanproperty'appid'apapjnappid{xnfigjnvarhreflocationhrefifhrefdexof'?'-1{hrefhref+'apsid772'}else{hrefhref+'?sid772'}xreadyfunctionres{varsharedata{title:'红薯',desc:'红薯',lk:href,分享链接igurl:'htt:ig2hongshupublicclienthtl5135iassharepng',分享图标type:'',分享类型,ic、video或lk,不填默认为lkdataurl:'',如果type是ic或video,则要提供数据链接,默认为空suess:function{用户确认分享后执行的回调函数ajax{url:"choujiangajaxtfenxiangdo",type:"post",data:'',suess:functionjn{ifjnurl{hggotourljnurl}else{dolocationreload}}}},cancel:function{用户取消分享后执行的回调函数nlelog'cancel'}}xonenhareappessasharedataxonenhareappessasharedataxonenhareqqsharedataxonenhareeibosharedataxonenhareqzonesharedata分享到朋友圈时只有标题,所这里拼接一下varpysharedate{}extendpysharedate,sharedatapysharedatetitlepysharedatetitle+""+pysharedatedescxonenharetielepysharedate}xerrorfunctionres{hgtoastreserrsg打印错误消息。及把debug:false,设置为debug:ture就可以直接在网页上看到弹出的错误提示}}}}}}!--微信jssdk--
手机站: