kefu/static/templates/default/extend_fastgpt.html

36 lines
936 B
HTML

{{template "header" }}
<div id="app" style="width:100%">
<template>
<el-container>
<el-main class="mainMain">
<iframe id="fastGptIframe" src="https://fastgpt.hnenergygroup.com/autologin" width="100%" height="100%"></iframe>
</el-main>
</el-container>
</template>
</div>
</body>
<script>
console.log("执行p1")
document.addEventListener('DOMContentLoaded', (event) => {
console.log("执行p2")
const iframe = document.getElementById('fastGptIframe').contentWindow;
console.log("执行p3")
setInterval(function () {
console.log("执行p4")
console.log("执行postMessage")
iframe.postMessage('{username:root,pwd:1234}', '*'); // '*' 表示允许所有源接收消息,出于安全考虑,应指定具体的目标源
}, 10000);
});
</script>
{{template "setting_bottom" .}}