Bläddra i källkod

优化路径问题

shaogen1995 1 år sedan
förälder
incheckning
f28b00dda4
4 ändrade filer med 12 tillägg och 6 borttagningar
  1. 1 1
      scene/js/loadCAD.js
  2. 1 1
      scene/js/main_2020_edit.js
  3. 2 2
      scene/js/main_2020_show.js
  4. 8 2
      scene/js/manage.js

+ 1 - 1
scene/js/loadCAD.js

@@ -15,7 +15,7 @@ window.grendCAD = (function grendCAD() {
     if (initScript) return cb()
 
     let $script = document.createElement('script')
-    $script.src = '//www.4dmodel.com/CAD/bundle.js'
+    $script.src = '/scene/js/bundle.js'
     $script.onload = function() {
       initScript = true
       cb()

+ 1 - 1
scene/js/main_2020_edit.js

@@ -6667,7 +6667,7 @@ function o(a, s, l) {
 
                         if (l.attr("data-index", a),
                         //Ce.highlight.visible && l.find("img").attr("src",'https://'+tmp),
-                        Ce.highlight.visible && l.find("img").attr("src", 'http://'+tmp),// xzw改 导览图片 https在某些服务器打不开
+                        Ce.highlight.visible && l.find("img").attr("src", tmp),// xzw改 导览图片 https在某些服务器打不开
                         s.name) {
                             var c = $('<div class="overlay"></div>').text(s.name);
                             l.prepend(c)

+ 2 - 2
scene/js/main_2020_show.js

@@ -6793,9 +6793,9 @@ window.Modernizr = function(n, e, t) {
                        
                     var thumbUrl 
                     if(c.heroLocations){//有子项,选第一张截图
-                        thumbUrl = manage.dealURL(c.heroLocations[0].thumbUrl)//.replace('https://','').replace('http://','')
+                        thumbUrl = manage.dealURL(c.heroLocations[0].thumbUrl).replace('https://','').replace('http://','')
                     }else{
-                        thumbUrl = manage.dealURL(c.thumbUrl)//.replace('https://','').replace('http://','')
+                        thumbUrl = manage.dealURL(c.thumbUrl).replace('https://','').replace('http://','')
                     } 
                     h.attr("data-index", s)
                     

+ 8 - 2
scene/js/manage.js

@@ -1,10 +1,15 @@
   
 var g_ProjectName=window.location.pathname.substring(window.location.pathname.indexOf("/")+1,window.location.pathname.lastIndexOf("/"));
-var g_Prefix="https://sit-locbigsecen.4dage.com/";
+
+var g_Prefix=window.location.href.includes('&T=temp')?'https://sit-locbigsecen.4dage.com/':'/'
+
 // var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/index.html")+1);
 var s = window.location.href.split('/');
     s.pop();
 //var g_Prefix = s.join('/');
+window.isLocal = true
+
+
 var g_index=null;
 var g_modeldata=null;
 
@@ -90,6 +95,7 @@ var settings = {
     hotFastTran:false,
     transparentBg: false,
     bgImg:  null,
+    localPrefix: '',
      
     tileClass:{//默认全景贴图加载的清晰度
         pc:{
@@ -668,7 +674,7 @@ var Manage = function(){
     this.weixinURL = "https://res.wx.qq.com/open/js/jweixin-1.2.0.js",
     this.time = "?"+new Date().getTime();
     this.loadAudio();
-    this.loadWeixin();
+    // this.loadWeixin();
 }
 //动态加载js文件
 Manage.prototype.LoadJs = function(_files, succes){