jinx 6 месяцев назад
Родитель
Сommit
03133faede
2 измененных файлов с 10 добавлено и 2 удалено
  1. 8 1
      src/views/home/iframeView/index.vue
  2. 2 1
      src/views/home/index.vue

+ 8 - 1
src/views/home/iframeView/index.vue

@@ -4,7 +4,7 @@
     <div class="close-btn" @click="close"></div>
 
     <div class="iframe-box" v-if="iframeData.type == '3D'">
-      <iframe :src="iframeData.modelUrl" frameborder="0"></iframe>
+      <iframe :src="handlerModelLink(iframeData.modelUrl)" frameborder="0"></iframe>
     </div>
     <div v-else-if="iframeData.type == '2D'" class="image-box">
       <div class="swiper-dom view-container">
@@ -73,6 +73,13 @@ watch(
 );
 const myViewer = ref(null);
 const dom = ref(null);
+const handlerModelLink = (link) => {
+  if (link) {
+    return link.replace("https://4dscene.4dage.com", "https://ysxwyzl.4dage.com");
+  } else {
+    return link;
+  }
+};
 const handlerPicList = () => {
   if (props.iframeData.deatilsImg) {
     //按规则截取字符串

+ 2 - 1
src/views/home/index.vue

@@ -265,7 +265,8 @@ const changeIframe = (item) => {
 };
 
 const loadJosnData = () => {
-  fetch("./json/data.json")
+  let time =new Date().getTime()
+  fetch(`./json/data.json?t=${time}`)
     .then((res) => res.json())
     .then((res) => {
       swiperData.value = res;