chain-client/templates/redirect_page.ejs

50 lines
1.8 KiB
Plaintext

<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>任务详情</title>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="Content-Security-Policy" content="script-src 'nonce-rAnd0m'">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, minimal-ui" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="full-screen" content="true" />
<meta name="screen-orientation" content="portrait" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<meta name="apple-mobile-web-app-title" content="WJTX">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
</head>
<body>
<h1>请选择操作...</h1>
<p><a href="" id="href">点击跳转至操作页面</a></p>
<script nonce="rAnd0m">
(function() {
var urlBase = 'xwork.kingsome.cn/workflow/confirm/<%= id %>'
var urlMobile = `https://metamask.app.link/dapp/${urlBase}`
var url = `https://${urlBase}`
// if current devices is mobile, redirect url1, else redirect url2
if (/(iPhone|iPad|iPod|iOS|Android)/i.test(navigator.userAgent)) {
url = urlMobile
console.log(url)
document.getElementById('href').setAttribute('href', url)
} else {
location.href = url
}
})()
</script>
</body>
</html>