Files
xj-admin/public/static/apps/experEnd.html
T
weixin e629dc3fb0 update
1.替换所有小助手字样为全科医师
2.添加app下载地址
2025-11-03 13:37:05 +08:00

137 lines
3.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>APP下载</title>
</head>
<style>
html,body,#outer {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
box-sizing: border-box;
}
#text {
width: 100%;
height: 100%;
background: url('./images/noOpen.png') no-repeat;
background-size: 100% 100%;
display: none;
align-items: center;
justify-content: center;
}
#text1 {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.down-container {
width: 100%;
height: 100%;
background: url('./images/bg.png') no-repeat;
background-size: 100% 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.android {
width: 400px;
height: 400px;
background: url('./images/android1.png') no-repeat;
background-size: 100% 100%;
margin-top: 14%;
}
.ios {
width: 400px;
height: 400px;
background: url('./images/ios.png') no-repeat;
background-size: 100% 100%;
}
</style>
<body>
<div id="outer">
<div id="text">
</div>
<div id="text1">
<div class="down-container">
<!-- <div class="ios" onclick="down('ios')"></div>-->
<div class="android" onclick="down('android')"></div>
</div>
</div>
</div>
</body>
</html>
<script>
function isWeiXin() {
return navigator.userAgent.toLocaleLowerCase().indexOf('micromessenger') != -1;
}
function f() {
if (isWeiXin()) {
document.getElementById('text1').style.display = 'none';
document.getElementById('text').style.display = 'flex';
}
getTypeAPackage();
}
f();
function isType() {
let userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (userAgent.match(/iPad/i) || userAgent.match(/iPhone/i) || userAgent.match(/iPod/i)) {
return 'ios';
} else if (userAgent.match(/Android/i)) {
return 'android';
}
}
function androidLoad() {
// window.open('https://a.app.qq.com/o/simple.jsp?pkgname=com.sw.healthyclients');
fetch(`https://api.xjygjk.com/health-system/version/getSysVersionDetailByPackageName?androidOrIos=1&packageName=com.xjjk.healthexpertclient`)
.then(response => {
if (!response.ok) {
throw new Error('网络响应不正常');
}
return response.json();
})
.then(data => {
console.log(data);
if (data.code === 200) {
window.open(`https://api.xjygjk.com/file/down/${data.result.appUrl}`)
} else {
window.alert('网络异常');
}
})
.catch(error => {
console.error('请求失败:', error);
window.alert('网络异常');
});
}
function iosLoad() {
// // 响应App store
// const appID = '6483208440';
// const link = 'itms-apps://itunes.apple.com/app/id' + appID;
// window.location.href = 'https://api.cqygjk.com/health-system/api/anon/sys/toAppDown?pkg=com.escortUP.EscortProject&type=2';
}
function down(type) {
if (type === 'ios') {
iosLoad();
} else {
androidLoad();
}
}
function getTypeAPackage() {
const url = window.location.href;
const arr = url.indexOf('?') !== -1 ? url.split('?')[1].replace('#/', '') : '';
let strArr = arr.split('&')
let params = {};
for (const item of strArr) {
params[item.substring(0, item.indexOf('='))] = item.substring(item.indexOf('=') + 1);
}
}
</script>