修改无锡测试bug

This commit is contained in:
guanj
2025-10-27 08:55:54 +08:00
parent 7c8917a2cd
commit ea14a290b7
17 changed files with 556 additions and 201 deletions

View File

@@ -22,7 +22,8 @@
<script setup lang="ts">
import { ref, watch, onMounted, onUnmounted } from "vue";
import { getActive } from "@/api/manage_wx/index";
import { useStore } from "vuex";
const store = useStore();
const props = defineProps<{
project: { id: string; name: string } | null;
}>();
@@ -37,6 +38,7 @@ watch(
// window.location.origin
iframeSrc.value =
window.location.origin +
// "http://192.168.1.128:4001" +
`/zutai/?id=${newVal.id}&&name=${encodeURIComponent(
newVal.name
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
@@ -50,17 +52,25 @@ watch(
onMounted(() => {
// 监听来自 eventStatistics 组件的消息
window.addEventListener("message", handleMessage);
getActive({}).then((res: any) => {
if (res.code == "A0000") {
// window.location.origin
iframeSrc.value =
window.location.origin +
// "http://192.168.1.128:4001" +
`/zutai/?id=${res.data.id}&&name=${encodeURIComponent(
res.data.name
)}&&preview=true&&display=true&&graphicDisplay=wx#/preview`;
}
});
// 子页面
const iframe = document.getElementById("iframeLeft");
// 监听 iframe 加载完成事件
iframe.addEventListener("load", function () {
// 通知父页面:我已加载完毕
store.dispatch("setIframeLoad", true);
});
});
onUnmounted(() => {
@@ -107,7 +117,6 @@ const sendKeysToIframe = (keyList: string[]) => {
); // 在生产环境中应该指定具体的域名而不是 '*'
}
};
</script>
<style lang="scss" scoped>
.plan {