//判断是否为微信小程序环境
$.isWeixinMiniProgarm = function() {
return window.__wxjs_environment === "miniprogram" || ((/micromessenger/i).test(navigator.userAgent) && (/miniprogram/i).test(navigator.userAgent));
};
//判断是ios或Android
var userAgent = navigator.userAgent;
var isAndroid = userAgent.indexOf('Android') > -1 || userAgent.indexOf('Adr') > -1; //android终端
var isIOS = !!userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端