首页 > 移动平台 > 详细

App内嵌H5页面联调接口

时间:2017-12-27 11:29:05      阅读:286      评论:0      收藏:0      [点我收藏+]
//分享接口
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+"";
	
}

  

App内嵌H5页面联调接口

原文:https://www.cnblogs.com/vinn7/p/8124534.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!