mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-23 08:46:45 +08:00
Merge branch 'feature/添加pc模式下载按钮' into release/0817
This commit is contained in:
@@ -1,44 +1,145 @@
|
||||
<!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>
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
body {
|
||||
height: 100vh;
|
||||
}
|
||||
.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 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
}
|
||||
.img {
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
height: 40vh;
|
||||
}
|
||||
.download {
|
||||
width: 27%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.btn {
|
||||
width: 150px;
|
||||
height: 50px;
|
||||
margin-top: 57px;
|
||||
}
|
||||
.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: 25px;
|
||||
border-radius: 5px;
|
||||
background-color: #ee0a24;
|
||||
color: #fff;
|
||||
padding-left: 30px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.and {
|
||||
background-image: url(images/and.png);
|
||||
}
|
||||
.ios {
|
||||
background-image: url(images/ios.png);
|
||||
}
|
||||
.left,
|
||||
.right {
|
||||
height: 40vh;
|
||||
position: relative;
|
||||
}
|
||||
.left::before,
|
||||
.right::before {
|
||||
position: absolute;
|
||||
top: -35px;
|
||||
}
|
||||
.left::before {
|
||||
content: '请扫码下载';
|
||||
|
||||
#coverImg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
left: 10px;
|
||||
}
|
||||
.right::before {
|
||||
content: '请点击下载';
|
||||
}
|
||||
.left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.left img {
|
||||
border: 1px solid #e5e5e5;
|
||||
padding: 3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<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')
|
||||
<body>
|
||||
<img id="coverImg" src="" alt="" />
|
||||
<div class="pc" id="pc" style="display: none;">
|
||||
<!-- <div class="img">
|
||||
<img src="images/logo.png" alt="" />
|
||||
</div> -->
|
||||
|
||||
<div class="download">
|
||||
<div class="left">
|
||||
<img src="images/prdDowload.png" alt="" srcset="" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<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>
|
||||
</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'
|
||||
}
|
||||
|
||||
} else if (isIDevice) {
|
||||
location.replace(URL.ios_download_url)
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
if (isAndroid) {
|
||||
location.replace(URL.android_download_url)
|
||||
document.body.setAttribute('class', 'android_bg')
|
||||
|
||||
</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'
|
||||
document.getElementById('pc').style.display = 'flex'
|
||||
document.getElementById('coverImg').style.display = 'none'
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
public/images/and.png
Normal file
BIN
public/images/and.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 566 B |
BIN
public/images/ios.png
Normal file
BIN
public/images/ios.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 783 B |
BIN
public/images/logo.png
Normal file
BIN
public/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/images/prdDowload.png
Normal file
BIN
public/images/prdDowload.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Reference in New Issue
Block a user