68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
<html>
|
|
|
|
<head>
|
|
<script src="./jquery.min.js"></script>
|
|
<style>
|
|
#weixinTip{
|
|
position:fixed;
|
|
top:0;
|
|
left:0;
|
|
bottom:0;
|
|
right:0;
|
|
z-index: 999;
|
|
display: none;
|
|
background-color:rgba(0,0,0,0.8);
|
|
filter:alpha(opacity=80);
|
|
}
|
|
|
|
#weixinTip p{
|
|
text-align:center;
|
|
margin-top:10%;
|
|
padding-left:5%;
|
|
padding-right:5%;
|
|
}
|
|
</style>
|
|
</head>
|
|
<!--<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">-->
|
|
<body>
|
|
<header class="yl_logo" style="text-align: center; ">
|
|
<img src="./yl.png" style="display: block;max-width: 100%;height: auto; margin: 18% auto;">
|
|
</header>
|
|
<div id="weixinTip"><p><img src="./live_weixin.png" alt="微信打开"/></p></div>
|
|
|
|
<script>
|
|
/// 是否微信打开
|
|
function is_wechat() {
|
|
return 'undefined' != typeof WeixinJSBridge;
|
|
}
|
|
|
|
function download(filename) {
|
|
if (is_wechat()) { /// 如果是微信打开
|
|
$('#weixinTip').show();
|
|
} else {
|
|
window.location = filename;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
<?php
|
|
if (strcasecmp('android', $_REQUEST['file']) == 0)
|
|
$filename = 'android.apk';
|
|
elseif (strcasecmp('ios', $_REQUEST['file']) == 0)
|
|
$filename = 'ios.ipz';
|
|
else
|
|
$filename = $_SERVER['PHP_SELF'];
|
|
|
|
///header('Content-Type: application/force-download');
|
|
///header('Content-Disposition: attachment; filename=' . basename($filename));
|
|
///readfile($filename);
|
|
|
|
echo "<center><button style=' padding: 6px 12px; display: block; height: 160px; width: 67%; margin-top: 20%;font-size: 68px;' onclick=\"download('{$filename}')\">下载</button></center>";
|
|
?>
|
|
</body>
|
|
</html>
|
|
|
|
|