png) no-repeat -30px 9px;background-size: 159px 93px;height: 50px;}
#app .app h2{font-size: 15px;color: #ffffff;padding-top: 9px;line-height: 18px;}
#app .app h3{font-size: 10px;color: #ffffff;line-height: 14px;}
#app .download_close{position: absolute;right: 0;top: 0;padding-top: 10px;}
#app .download_close a{display: block;float: left;background-color: #29c971;color: white;line-height: 30px;height: 30px;width: 80px;border-radius: 3px;text-align: center;font-size: 12px;margin-right: 15px;}
#app .download_close button{border: none;width: 13px;height: 13px;background: url(/static/index7/images/forumAppDownload/download_3.png) no-repeat -146px -40px;background-size: 159px 93px;margin-right: 15px;margin-top: 9px;}
</style>
<div class="app_download" id="app" style="display: block; ">
<div class="app">
<h2>抢先体验 MIUI 10</h2>
<h3>点击下载&gt;&gt;</h3>
</div>
<div class="download_close">
<a id="appOpen" href="javascript:void(0)" onclick="appOn()">立即体验</a>
<button onclick="hideFloat()"></button>
</div>
<div id="iframe_container" style="display: none;"><iframe id="autoToApp" src="miuibbs://www.miui.com/forum.php?mod=viewthread&amp;tid=1613424" style="display: none; border: 0px; width: 0px; height: 0px;" allowfullscreen="true"></iframe></div>
<script type="text/javascript">
function showApp(){
var partern = /4306014|4512063|5935529/i;
if (!partern.test(window.location.href)) {
var float = document.getElementById('app');
float.style.display = "block";
};
if(partern.test(window.location.href)){
var iframeStr = '<iframe id="callapp_iframe_1446690600870" src="'+location.href.replace(/^http:/, 'miuibbs:')+'" style="display: none; border: 0px; width: 0px; height: 0px;"></iframe>';
var bodyElem = document.getElementById("iframe_container");
bodyElem.innerHTML = iframeStr;
}
}
showApp();
function hideFloat(){
var float = document.getElementById('app');
float.style.display = "none";
}
function XHR() {
var xhr;
try {xhr = new XMLHttpRequest();}
catch(e) {
var IEXHRVers =["Msxml3.XMLHTTP","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];
for (var i=0,len=IEXHRVers.length;i< len;i++) {
try {xhr = new ActiveXObject(IEXHRVers[i]);}
catch(e) {continue;}
}
}
return xhr;
}
function appOn(event){
try{
var url = "http://api.bbs.miui.com/app/index/stat";
var xhr = XHR();
//open方法 创建一个新的http请求,并指定此请求的方法、URL以及验证信息(用户名/密码)
xhr.open("post",url,true);
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
//另外,数据是通过send方法发送的
xhr.send("url=mobileAppOpen://" + window.location.hostname);
}
catch(e){};
var event = window.event || arguments.callee.caller.arguments[0];
event.preventDefault();
if(is_weixin()){
window.location.href = "http://a.app.qq.com/o/simple.jsp?pkgname=com.miui.miuibbs";
return false;
}
// var iframeStr = '<iframe id="callapp_iframe_1446690600870" src="miuibbs://www.miui.com/thread-4685420-1-1.html" style="display: none; border: 0px; width: 0px; height: 0px;"></iframe>'
var iframeStr = '<iframe id="callapp_iframe_1446690600870" src="'+location.href.replace(/^http:/, 'miuibbs:')+'" style="display: none; border: 0px; width: 0px; height: 0px;"></iframe>';
var bodyElem = document.getElementById("iframe_container");
bodyElem.innerHTML = iframeStr;
var initTime = new Date();
initTime = initTime.getTime();
setTimeout(function(){
var currentTime = new Date();
currentTime = currentTime.getTime()
console.log(currentTime - initTime)
if(currentTime - initTime <= 1000){
window.location.href = "http://www.miui.com/zt/download.html";
};
}, 300);
}
//判断是否为微信浏览器打开
function is_weixin(){
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)=="micromessenger") {
return true;
} else {
return false;
}
}
function autoToAPP(){
var iframeStr = '<iframe id="autoToApp" src="'+location.href.replace(/^http:/, 'miuibbs:')+'" style="display: none; border: 0px; width: 0px; height: 0px;"></iframe>';
var bodyElem = document.getElementById("iframe_container");
bodyElem.innerHTML = iframeStr;
}
autoToAPP();
</script>
</div></div><!--<style type="text/css">-->
<!--#scrollToTop{bottom: 65px !important;}-->
<!--.app_download{background-color: #4a4150;height: 50px;position: fixed;bottom: 0;left: 0;right: 0;display: none;}-->
<!--#app .app{padding-left: 60px;background: url(/static/index7/images/forumAppDownload/download_3.png) no-repeat -30px 9px;background-size: 159px 93px;height: 50px;}-->
<!--#app .app h2{font-size: 15px;color: #ffffff;padding-top: 9px;line-height: 18px;}-->
<!--#app .app h3{font-size: 10px;color: #ffffff;line-height: 14px;}-->
<!--#app .download_close{position: absolute;right: 0;top: 0;padding-top: 10px;}-->
<!--#app .download_close a{display: block;float: left;background-color: #29c971;color: white;line-height: 30px;height: 30px;width: 88px;border-radius: 3px;text-align: center;font-size: 12px;margin-right: 30px;}-->
<!--#app .download_close button{border: none;width: 13px;height: 13px;background: url(/static/index7/images/forumAppDownload/download_3.png) no-repeat -146px -40px;background-size: 159px 93px;margin-right: 15px;margin-top: 9px;}-->
<!--</style>-->
<!--<div class="app_download" id="app">-->
<!--<div class="app">-->
<!--<h2>签到赢小米Max</h2>-->
<!--<h3>APP专属:6.03-6.06</h3>-->
<!--</div>-->
<!--<div class="download_close">-->
<!--<a href="javascript:void(0)" onclick="appOn()">APP打开</a>-->
<!--<button onclick="hideFloat()"></button>-->
<!--</div>-->
<!--<div id="iframe_container" style="display: none;"></div>-->
<!--<script type="text/javascript">-->
<!--function showApp(){-->
<!--var partern = /4512063/i;-->
<!--if (!partern.test(window.location.href)) {-->
<!--var float = document.getElementById('app');-->
<!--float.style.display = "block";-->
<!--};-->
<!--}-->
<!--showApp();-->
<!--function hideFloat(){-->
<!--var float = document.

Prev | Next
Pg.: 1 2 3 4 5 6


Back to home | File page

Subscribe | Register | Login | N