YZProjectCloud/yanzhu-ui-vue3/public/att.html

38 lines
1.1 KiB
HTML
Raw Normal View History

2025-06-26 14:49:00 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="/cdn/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
haha
<script>
window.addEventListener(
"message",
(data) => {
console.log("iframe->", data);
let postData={data:data.data};
let url = "http://localhost/dev-api/manage/attendancePost/add";
$.post({
url: url,
contentType: "application/json", // 设置内容类型为 JSON
data: JSON.stringify(postData), // 将数据转换为 JSON 字符串
success: function (response) {
// 处理成功响应
console.log("成功响应:", response);
},
error: function (xhr, status, error) {
// 处理错误响应
console.error("错误响应:", error);
},
});
},
false
);
</script>
</body>
</html>