App内嵌H5页面联调接口
//分享接口 function ShareLp(query,pkid){ var shareUrl=""; var shareImg=""; var shareTll=""; var shareInfo=""; var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 if(isAndroid==true){ shareAndroid(shareUrl,shareImg,shareTll,shareInfo); }else if(isIOS==true){ ShareIOS(shareUrl,shareImg,shareTll,shareInfo); } } function shareAndroid(shareUrl,shareImg,shareTll,shareInfo){ window.schoolhealth.callAppFunc("",shareUrl,shareImg,shareTll,shareInfo);//安卓要求五个参数,多传了个空值 } function ShareIOS(shareUrl,shareImg,shareTll,shareInfo){ window.location.href = url + "?method=teachIndex@@@ShareCanvas@@@"+shareUrl+"@@@"+shareImg+"@@@"+shareTll+"@@@"+shareInfo+""; }