function ym_open(url){
    window.open(url);
    document.getElementById("ym_mask").remove();
}
var userAgent = navigator.userAgent.toLowerCase();
var pop_str = "";
if (userAgent.indexOf("iphone") != -1 || userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) || userAgent.indexOf("iPad") > -1) {//苹果手机、ipad
    pop_str = '<div id="ym_mask" style="position:fixed;z-index:999998;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.4);"><a onclick="ym_open(\'https://itunes.apple.com/cn/app/%E7%8E%89%E7%B1%B3%E7%BD%91/id1271292290?mt=8\')" style="position:absolute;z-index:999999;left:0;top:0;width:100%;height:100%;cursor:pointer;" ><img src="http://cloudcdn.dopa.com/img/1818/kaiping1.png" style="display:block;width:100%;height:100%;" /></a></div>';
} else if (userAgent.match(/MicroMessenger/i) == "micromessenger") {//微信
    pop_str = '<div id="ym_mask" style="position:fixed;z-index:999998;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.4);"><a onclick="ym_open(\'http://cloudcdn.dopa.com/apk/20200313105827.apk\')" style="position:absolute;z-index:999999;left:0;top:0;width:100%;height:100%;cursor:pointer;" ><img src="http://cloudcdn.dopa.com/img/1818/kaiping1.png" style="display:block;width:100%;height:100%;" /></a></div>';
    window.open("http://cloudcdn.dopa.com/apk/20200313105827.apk");
} else if (/android|webos|blackberry|iemobile|opera mini/i.test(userAgent)) {//其他手机端
    pop_str = '<div id="ym_mask" style="position:fixed;z-index:999998;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.4);"><a onclick="ym_open(\'http://cloudcdn.dopa.com/apk/20200313105827.apk\')" style="position:absolute;z-index:999999;left:0;top:0;width:100%;height:100%;cursor:pointer;" ><img src="http://cloudcdn.dopa.com/img/1818/kaiping1.png" style="display:block;width:100%;height:100%;" /></a></div>';
    window.open("http://cloudcdn.dopa.com/apk/20200313105827.apk");
} else {
    
}
document.body.innerHTML += pop_str;