hangtag/hangtag-ui/hangtag-ui-front/index.html

206 lines
5.8 KiB
HTML
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.

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="keywords"
content="东莞嘉晋OMS下单系统"
/>
<title>%VITE_APP_TITLE%</title>
<script src="/js/dom-to-image.js"></script>
<style>
/* 新增Edge推荐样式 */
.edge-recommend {
position: fixed;
top: 10%;
right: 20px;
align-items: center;
display: none;
gap: 8px;
padding: 8px 16px;
background-color: #f3f4f6;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
cursor: pointer;
z-index: 9999;
text-decoration: none;
color: #111827;
font-size: 14px;
transition: background-color 0.2s ease;
}
.edge-recommend:hover {
background-color: #e5e7eb;
}
.edge-icon {
width: 48px;
height: 48px;
}
.edge-recommend.show {
display: flex; /* 非Edge时显示 */
}
.edge-text {
line-height: 1;
font-size: 1.2rem;
}
.app-loading {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
flex-direction: column;
background: #f0f2f5;
}
.app-loading .app-loading-wrap {
position: absolute;
top: 50%;
left: 50%;
display: flex;
-webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
justify-content: center;
align-items: center;
flex-direction: column;
}
.app-loading .app-loading-title {
margin-bottom: 30px;
font-size: 20px;
font-weight: bold;
text-align: center;
}
.app-loading .app-loading-logo {
width: 100px;
margin: 0 auto 15px auto;
}
.app-loading .app-loading-item {
position: relative;
display: inline-block;
width: 60px;
height: 60px;
vertical-align: middle;
border-radius: 50%;
}
.app-loading .app-loading-outter {
position: absolute;
width: 100%;
height: 100%;
border: 4px solid #2d8cf0;
border-bottom: 0;
border-left-color: transparent;
border-radius: 50%;
animation: loader-outter 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
}
.app-loading .app-loading-inner {
position: absolute;
top: calc(50% - 20px);
left: calc(50% - 20px);
width: 40px;
height: 40px;
border: 4px solid #87bdff;
border-right: 0;
border-top-color: transparent;
border-radius: 50%;
animation: loader-inner 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
}
@-webkit-keyframes loader-outter {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loader-outter {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@-webkit-keyframes loader-inner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
@keyframes loader-inner {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
</style>
</head>
<body>
<a id="showDownBrowser" href="/download/MicrosoftEdgeSetup.exe" class="edge-recommend" target="_blank">
<img src="/img/edge.png" class="edge-icon" alt="Edge图标" />
<div>
<div class="edge-text">推荐使用Edge浏览器<br/>Recommend using Edge browser</div>
<div class="edge-text" style="margin-top: 6px">点击下载 Click Download</div>
</div>
</a>
<div id="app">
<div class="app-loading">
<div class="app-loading-wrap">
<div class="app-loading-title">
<!-- <img src="/logo.gif" class="app-loading-logo" alt="Logo" />-->
<!-- <div class="app-loading-title">%VITE_APP_TITLE%</div>-->
</div>
<div class="app-loading-item">
<div class="app-loading-outter"></div>
<div class="app-loading-inner"></div>
</div>
</div>
</div>
</div>
<script type="module" src="/src/main.ts">
</script>
<script>
// 检测是否为Edge浏览器包含Chromium内核Edge和传统Edge
function isEdgeBrowser() {
const userAgent = navigator.userAgent.toLowerCase();
// 匹配Chromium内核EdgeEdge/xxx或传统Edgeedg/xxx
return /edg(e)?\/\d+/.test(userAgent);
}
if (!isEdgeBrowser()) {
setTimeout(()=>{
const elementById = document.getElementById("showDownBrowser");
console.log("222",elementById)
if(elementById){
elementById.style.display= 'flex';
}
},600)
}
</script>
</body>
</html>