App内嵌H5页面联调接口
16lz
2022-07-28
//分享接口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+"";}
转载于:https://www.cnblogs.com/vinn7/p/8124534.html
更多相关文章
- mybatisplus的坑 insert标签insert into select无参数问题的解决
- Python技巧匿名函数、回调函数和高阶函数
- python list.sort()根据多个关键字排序的方法实现
- android中文api(89)——ViewManager
- Android调用天气预报的WebService简单例子
- Android(安卓)Activity的启动
- Android(安卓)Studio & ADT 快捷键配置文件所在目录,自定义后可导
- 2011年Android(安卓)Camera学习笔记之一
- Android(安卓)N 指纹框架