47 lines
1.4 KiB
HTML
47 lines
1.4 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/public/favicon.ico" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>开元云元境 - 一站式AI创作平台</title>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script>
|
|
;(function () {
|
|
var syncPath = '#/getCookie'
|
|
var reloadPrefix = 'yuanjing-get-cookie-reload:'
|
|
|
|
function isGetCookieRoute() {
|
|
return window.location.hash.indexOf(syncPath) === 0
|
|
}
|
|
|
|
function reloadOnce(reason) {
|
|
if (!isGetCookieRoute()) return
|
|
|
|
var key = reloadPrefix + reason + ':' + window.location.hash
|
|
if (window.sessionStorage.getItem(key)) return
|
|
|
|
window.sessionStorage.setItem(key, '1')
|
|
var url = new URL(window.location.href)
|
|
url.searchParams.set('_syncReload', Date.now().toString())
|
|
window.location.replace(url.toString())
|
|
}
|
|
|
|
window.addEventListener('hashchange', function () {
|
|
reloadOnce('hashchange')
|
|
})
|
|
|
|
window.setTimeout(function () {
|
|
var app = document.getElementById('app')
|
|
if (app && app.childElementCount === 0) {
|
|
reloadOnce('empty-app')
|
|
}
|
|
}, 1200)
|
|
})()
|
|
</script>
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html>
|