mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 01:46:43 +08:00
添加pc模式下载按钮
This commit is contained in:
@@ -1,44 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title>金掌桂-应用下载</title>
|
||||
<style>
|
||||
.android_bg {
|
||||
margin-top: 5vh;
|
||||
height: 100%;
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title>金掌桂-应用下载</title>
|
||||
<style>
|
||||
.android_bg {
|
||||
height: 100%;
|
||||
background-color: #000;
|
||||
}
|
||||
#coverImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.pc {
|
||||
margin-top: 10vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
#coverImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
flex-direction: column;
|
||||
}
|
||||
.img {
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
height: 50vh;
|
||||
}
|
||||
.download {
|
||||
width: 25%;
|
||||
display: flex;
|
||||
|
||||
<body>
|
||||
<img id="coverImg" src="" alt="" />
|
||||
<script>
|
||||
var userAgent = navigator.userAgent
|
||||
var isAndroid = /android/gi.test(userAgent)
|
||||
var isIDevice = /iphone|ipad/gi.test(userAgent)
|
||||
var URL = {
|
||||
android_download_url: 'https://iagentsales-sr.e-guofu.com:8443/gfrs/apk/GfLife.apk',
|
||||
ios_download_url: 'https://apps.apple.com/cn/app/id1483906479'
|
||||
}
|
||||
if (isAndroid) {
|
||||
location.replace(URL.android_download_url)
|
||||
document.body.setAttribute('class', 'android_bg')
|
||||
justify-content: space-between;
|
||||
}
|
||||
.btn {
|
||||
width: 150px;
|
||||
height: 50px;
|
||||
}
|
||||
.down_btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
background-repeat: no-repeat;
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
background-size: 20%;
|
||||
background-position-y: center;
|
||||
background-position-x: 30px;
|
||||
border-radius: 5px;
|
||||
background-color: #ee0a24;
|
||||
color: #fff;
|
||||
padding-left: 14px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.and {
|
||||
background-image: url(images/and.png);
|
||||
}
|
||||
.ios {
|
||||
background-image: url(images/ios.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<img id="coverImg" src="" alt="" />
|
||||
<div class="pc">
|
||||
<div class="img">
|
||||
<img src="https://iagentsales-sr.e-guofu.com:8443/images/logo.png" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="download">
|
||||
<div class="btn">
|
||||
<a class="down_btn and" href="https://iagentsales-sr.e-guofu.com:8443/gfrs/apk/GfLife.apk">下载</a>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<a class="down_btn ios" href="https://apps.apple.com/cn/app/id1483906479"><span>下载</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var userAgent = navigator.userAgent
|
||||
var isAndroid = /android/gi.test(userAgent)
|
||||
var isIDevice = /iphone|ipad/gi.test(userAgent)
|
||||
var coverImg = document.getElementById('coverImg')
|
||||
coverImg.src = 'https://mobile.dingchenglife.com.cn:7001/images/cover_bg.png'
|
||||
var URL = {
|
||||
android_download_url: 'https://iagentsales-sr.e-guofu.com:8443/gfrs/apk/GfLife.apk',
|
||||
ios_download_url: 'https://apps.apple.com/cn/app/id1483906479'
|
||||
}
|
||||
if (isAndroid) {
|
||||
location.replace(URL.android_download_url)
|
||||
document.body.setAttribute('class', 'android_bg')
|
||||
|
||||
} else if (isIDevice) {
|
||||
location.replace(URL.ios_download_url)
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
coverImg.src = 'https://mobile.dingchenglife.com.cn:7001/images/cover_bg.png'
|
||||
} else if (isIDevice) {
|
||||
location.replace(URL.ios_download_url)
|
||||
} else {
|
||||
//coverImg.src = 'https://iagentsales-sr.e-guofu.com:8443/images/logo.png'
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user