挂壁式气化炉案例
挂壁式气化炉案例

$('body').bind('touchmove',function(event){event.preventDefault;
//code
});
var platform = identifyUA();
var link;
switch(platform){
case 'ios':
link = 'http://www.pgyer.com/aEJs';
break;
case 'android':
link = 'http://m.malldx.com/app/Android/DuoXiangMall.apk';
$('html').bind('click',function(){
window.location.href=link;
});
break;
default:
link = '/';
}
var userAgent = navigator.userAgent.toLowerCase();
var wx = userAgent.indexOf('micromessenger');
if (wx != -1) {
$('#link').click(function(event) {
event.preventDefault();
$('.floating').show();
});
}
try{
WeixinApi.ready(function(){
$('#link').click(function(event) {
event.preventDefault();
$('.floating').show();
});
})
}
catch(err){}
$('#link').attr('href', link);
function identifyUA() {
var userAgent = navigator.userAgent.toLowerCase();
var platform ='';
if(userAgent == null || userAgent == ''){
platform = 'web' ;
}else{
if(userAgent.indexOf("android") != -1 ){
platform = 'android';
}else if(userAgent.indexOf("ios") != -1 || userAgent.indexOf("iphone") != -1){
platform = 'ios';
}else if(userAgent.indexOf("ipad") != -1) {
platform = 'ios';
}else if(userAgent.indexOf("windows phone") != -1 ){
platform = 'windowsphone';
}else{
platform = 'web';
}
}
return platform;
}