|
@@ -1,19 +1,36 @@
|
|
|
<script setup>
|
|
|
import { onMounted, ref } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
+import LoadingPage from "./loadog.vue";
|
|
|
const route = useRoute();
|
|
|
const srcUrl = ref("");
|
|
|
const pc = ref("");
|
|
|
+const loadingShow = ref(true);
|
|
|
onMounted(() => {
|
|
|
document.domain = "hzinsights.com";
|
|
|
+ const iframe = document.querySelector("#iframe");
|
|
|
srcUrl.value = decodeURIComponent(route.query.url);
|
|
|
pc.value = route.query.pc || "";
|
|
|
+ if (iframe.attachEvent) {
|
|
|
+ iframe.attachEvent("onload", () => {
|
|
|
+ setTimeout(() => {
|
|
|
+ loadingShow.value = false;
|
|
|
+ }, 300);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ iframe.onload = () => {
|
|
|
+ setTimeout(() => {
|
|
|
+ loadingShow.value = false;
|
|
|
+ }, 300);
|
|
|
+ };
|
|
|
+ }
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div :class="[pc ? 'container-strategy-pc' : 'container-strategy']">
|
|
|
- <iframe :src="srcUrl" class="strategy-iframe" frameborder="0" />
|
|
|
+ <iframe :src="srcUrl" class="strategy-iframe" frameborder="0" id="iframe" />
|
|
|
+ <LoadingPage :loadingShow="loadingShow" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|