feat: 优化后台界面与报表样式
This commit is contained in:
82
test/all-iframes-1888.html
Normal file
82
test/all-iframes-1888.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>1XAUD All Iframes - merchant 1888</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
background: #0f1218;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
.frame-wrap {
|
||||
position: relative;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto 28px;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
background: #151921;
|
||||
}
|
||||
|
||||
iframe {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window._ = {
|
||||
getVar(name) {
|
||||
return name === "merchantId" ? "1888" : "";
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="frame-wrap">
|
||||
<iframe id="partnershipIframe" src="https://1xaud.em7bd7.co/embed/partnership/partnership.asp" style="min-height:600px;"></iframe>
|
||||
</div>
|
||||
|
||||
<div class="frame-wrap">
|
||||
<iframe id="gameRtpIframe" src="https://1xaud.em7bd7.co/embed/game-rtp/game-rtp.asp" style="min-height:900px;"></iframe>
|
||||
</div>
|
||||
|
||||
<div class="frame-wrap">
|
||||
<iframe id="domainstatusIframe" src="https://1xaud.em7bd7.co/embed/domain-status/domain-status.asp" style="min-height:700px;"></iframe>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(() => {
|
||||
const merchantId = (typeof _ !== "undefined" && typeof _.getVar === "function") ? (_.getVar("merchantId") ?? "") : "";
|
||||
if (!merchantId) {
|
||||
console.log("merchantId not found");
|
||||
return;
|
||||
}
|
||||
|
||||
function init(id, heightMessageType, extraHeight) {
|
||||
const iframe = document.getElementById(id);
|
||||
if (!iframe) {
|
||||
console.log(id + " not found");
|
||||
return;
|
||||
}
|
||||
iframe.addEventListener("load", function() {
|
||||
iframe.contentWindow.postMessage({ type: "setIframeData", clientMerchant: merchantId }, "*");
|
||||
});
|
||||
window.addEventListener("message", function(event) {
|
||||
if (event.data && event.data.type === heightMessageType) {
|
||||
iframe.style.height = event.data.height + extraHeight + "px";
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
init("partnershipIframe", "setPartnershipIframeHeight", 0);
|
||||
init("gameRtpIframe", "setGameRtpIframeHeight", 50);
|
||||
init("domainstatusIframe", "setDomainStatusIframeHeight", 0);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user