dataease-dm/frontend/public/link.html

46 lines
1.0 KiB
HTML
Raw Normal View History

2021-03-25 18:58:05 +08:00
<!DOCTYPE html>
<html lang="zh">
2021-12-09 10:49:32 +08:00
2021-03-25 18:58:05 +08:00
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
2021-12-09 10:49:32 +08:00
2021-03-25 18:58:05 +08:00
</head>
2021-12-09 10:49:32 +08:00
2021-05-19 17:23:46 +08:00
<body style="height: 100%;">
2021-12-09 10:49:32 +08:00
<div id="link"></div>
2021-03-25 18:58:05 +08:00
</body>
2021-11-26 11:38:25 +08:00
<script>
2021-12-09 10:49:32 +08:00
function getQueryVariable(variable) {
let query = window.location.search.substring(1)
let vars = []
if (!query) {
query = document.cookie
vars = query.split(';')
} else {
vars = query.split('&')
2021-11-26 11:38:25 +08:00
}
2021-12-09 10:49:32 +08:00
for (var i = 0; i < vars.length; i++) {
const pair = vars[i].split('=')
if (pair[0].trim() === variable) {
return pair[1]
}
}
return (false)
}
const link = getQueryVariable('link')
2021-12-19 14:46:33 +08:00
const user = getQueryVariable('user')
2021-12-09 10:49:32 +08:00
const terminal = getQueryVariable('terminal')
let url = "/#/delink?link=" + encodeURIComponent(link)
if (terminal) {
url += '&terminal=' + terminal
}
2021-12-19 14:46:33 +08:00
if (user) {
url += '&user=' + user
}
2021-12-09 10:49:32 +08:00
window.location.href = url
2021-11-26 11:38:25 +08:00
</script>
2021-12-09 10:49:32 +08:00
2021-03-25 18:58:05 +08:00
</html>