apzl_leasing/WebContent/appDownload.jsp
2018-10-17 16:06:08 +08:00

84 lines
3.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height">
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="Cache-Control" content="no-transform" />
<title>App应用下载</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery-1.11.0.min.js"></script>
<style type="text/css">
#weixin-tip{display:none;position:fixed;left:0;top:0;background:rgba(0,0,0,0.8);filter:alpha(opacity=80);width:100%;height:100%;z-index:100;}
#weixin-tip p{text-align:center;margin-top:10%;padding:0 5%;position:relative;}
#weixin-tip .close{color:#fff;padding:5px;font:bold 20px/24px simsun;text-shadow:0 1px 0 #ddd;position:absolute;top:0;left:5%;}
.butonpanle{width: 100%;margin-top:10%; height: 20%}
.android-btn{width:80%;height: 30%;padding-top: 2%;padding-bottom: 3%;border:0.5;background-color: #8DB6CD;color:white;fount-size:16;display: block;margin: 0 auto;}
img{display: block;margin: 0 auto;}
#tips{margin: 0 auto;width: 100%;color:red; white-space: pre-wrap; text-align: center;}
</style>
</head>
<%
String devType="android";
String userAgent = request.getHeader("user-agent");
if(userAgent.toLowerCase().indexOf("iphone")>=0){
devType="ios";
}
%>
<body style="background-color: #F4F4F4;width: 100%">
<div id="img-content">
<br/>
<br/>
<br/>
<img src="${pageContext.request.contextPath}/AppMain/Logon/logo_amarsoft.png"/>
<div class="butonpanle">
<button id="J_weixin" class="android-btn">
<labe>下载安装</label>
</button>
</div>
<br/>
<label id="tips"></label>
</div>
<div id="weixin-tip">
<p><img src="${pageContext.request.contextPath}/AppMain/AppLogo/down_wx_t.png" alt="微信扫描打开APP下载链接提示代码优化" alt="微信打开"/>
</div>
</body>
</html>
<script type="text/javascript">
var is_weixin = (function(){
return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
}
)();
window.onload = function() {
var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight; //兼容IOS不需要的可以去掉
var btn = document.getElementById('J_weixin');
var Testbtn = document.getElementById('J_Test');
var tip = document.getElementById('weixin-tip');
var close = document.getElementById('close');
var show = function(){
tip.style.height = winHeight + 'px'; //兼容IOS弹窗整屏
tip.style.display = 'block';
return false;
};
tip.onclick = function() {
tip.style.display = 'none';
};
btn.onclick = function(e) {
if(is_weixin){
show();
}else{
<%if("android".equalsIgnoreCase(devType)){%>
location.href="${pageContext.request.contextPath}/webapi/resf/files/downloadApp?devType=<%=devType%>";
<%}else{%>
location.href="itms-services:///?action=download-manifest&url=https://ret.ap-leasing.com/apzl_leasing/webapi/resf/files/downloadPlist";
<%}%>
setTimeout(function(){
$("#tips").html("");
},1000)
}
};
}
</script>