整合前端

This commit is contained in:
砂糖
2026-04-13 17:04:38 +08:00
parent 69609a2cb1
commit 5d4794c9bd
915 changed files with 144259 additions and 0 deletions

39
ruoyi-ui/test/parent.html Normal file
View File

@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>父窗口 - 发送消息</title>
</head>
<body>
<iframe src="http://localhost/index" frameborder="0"></iframe>
<script>
const iframe = document.querySelector('iframe');
// 等待iframe加载完成
iframe.onload = function () {
// 发送字符串消息
// iframe.contentWindow.postMessage('hello', 'http://localhost');
// 发送对象消息
// const complexData = {
// type: 'greeting',
// message: '你好',
// timestamp: new Date().getTime()
// };
// iframe.contentWindow.postMessage(complexData, 'http://localhost');
const loginData = {
type: 'token',
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJsMjhkSkc3ZGh1Zlp0VWl5eE1PVlFqNWFXclU4ODJHSCIsInVzZXJJZCI6MX0.O4RYVn_H3CCtqBdVkB26Qo-_8MMvhBTTDDri3V7TeQI',
redirect: '/finance/profit'
};
iframe.contentWindow.postMessage(loginData, 'http://localhost');
}
</script>
</body>
</html>