var ua = navigator.userAgent.toLowerCase();
var isWeixin = ua.indexOf('micromessenger') != -1;
var isAndroid = ua.indexOf('android') != -1;
var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1);
if (isWeixin || isAndroid || isIos) {//手机访问
}else{//电脑访问
}
if (isWeixin) {//微信访问
}
if (isAndroid) {//安卓访问
}
if (isIos) {//苹果访问
}