89 lines
2.8 KiB
HTML
89 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<script>
|
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
|
CSS.supports('top: constant(a)'))
|
|
document.write(
|
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
|
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
|
</script>
|
|
|
|
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" /> -->
|
|
<link rel="icon" href="/favicon.ico" />
|
|
<script src="./config.js"></script>
|
|
<script src="https://ucmp-static.sf-express.com/assets/sdks/microservice-1.0.4.min.js"></script>
|
|
<script>
|
|
const sf = new SFUIP.SfMicroservice(window?.config?.ENV??'sit')
|
|
window.sf = sf
|
|
// function loadScript(url, retry = 3) {
|
|
// return new Promise((resolve, reject) => {
|
|
// const script = document.createElement('script')
|
|
// script.src = url
|
|
// script.async = true
|
|
|
|
// script.onload = () => {
|
|
// resolve()
|
|
// }
|
|
|
|
// script.onerror = () => {
|
|
// if (retry > 0) {
|
|
// console.warn('脚本加载失败,重试中...', retry)
|
|
// setTimeout(() => {
|
|
// loadScript(url, retry - 1)
|
|
// .then(resolve)
|
|
// .catch(reject)
|
|
// }, 1000)
|
|
// } else {
|
|
// reject(new Error('脚本加载失败'))
|
|
// }
|
|
// }
|
|
|
|
// document.head.appendChild(script)
|
|
// })
|
|
// }
|
|
// loadScript(
|
|
// 'https://ucmp-static.sf-express.com/assets/sdks/microservice-1.0.4.min.js',
|
|
// 3
|
|
// ).then(() => {
|
|
// console.log('SDK加载成功')
|
|
// const sf = new SFUIP.SfMicroservice(window?.config?.ENV??'sit')
|
|
// window.sf = sf
|
|
// }).catch(err => {
|
|
// console.error('最终加载失败', err)
|
|
// })
|
|
|
|
</script>
|
|
<script>
|
|
// // 获取当前路径名
|
|
// const currentPath = window.location.pathname;
|
|
// var currentDomain = window.location.origin;
|
|
// // 定义跳转逻辑
|
|
// function checkAndRedirect() {
|
|
// const screenWidth =document.documentElement.clientWidth;
|
|
// if (screenWidth >= 900 && !(currentPath.indexOf('/h5/index.html') ==-1)) {
|
|
// window.location.href =currentDomain+ '/';
|
|
// } else if (screenWidth < 900 && (currentPath.indexOf('/h5/index.html') ==-1)) {
|
|
// window.location.href =currentDomain+ '/h5/index.html';
|
|
// }
|
|
// }
|
|
|
|
// // // 初始检查
|
|
// checkAndRedirect();
|
|
|
|
// // 监听屏幕宽度变化
|
|
// window.addEventListener('resize', () => {
|
|
// checkAndRedirect();
|
|
// });
|
|
</script>
|
|
<title>城市迷你仓</title>
|
|
<!--preload-links-->
|
|
<!--app-context-->
|
|
</head>
|
|
<body>
|
|
<div id="app"><!--app-html--></div>
|
|
<script type="module" src="/main.js"></script>
|
|
</body>
|
|
</html>
|