xzw 1 tahun lalu
induk
melakukan
cf5f36bb10
3 mengubah file dengan 18 tambahan dan 15 penghapusan
  1. 1 1
      js/Hot.js
  2. 1 1
      js/main_2020_edit.js
  3. 16 13
      js/manage.js

+ 1 - 1
js/Hot.js

@@ -759,7 +759,7 @@ window.initHot = function(model){
             }
             
             this.visible = visibility != void 0 ? visibility : (!this.info.visiblePanos || 
-               type == 'every' ? panos.every(pano=>this.info.visiblePanos.includes(pano.id)) : panos.some(pano=>this.info.visiblePanos.includes(pano.id)))//type为every时,需要panos中每个都可见才显示
+               (type == 'every' ? panos.every(pano=>this.info.visiblePanos.includes(pano.id)) : panos.some(pano=>this.info.visiblePanos.includes(pano.id))))//type为every时,需要panos中每个都可见才显示
             this.titleElem && this.titleElem.setVisible(this.visible, 'hotVisible', 1)
             
             if (this.texType == 'video'){

+ 1 - 1
js/main_2020_edit.js

@@ -21168,7 +21168,7 @@ function o(a, s, l) {
                 !0)
             }
             ), 
-            t.prototype.switchCameraMode = function(mode, quaternion, target, position, {currentScale, fitBoundSize}) {
+            t.prototype.switchCameraMode = function(mode, quaternion, target, position, {currentScale, fitBoundSize}={}) {
                 var control = this.cameraControls.controls[mode]
                   , camera = control.camera;
                 if(mode == V.PANORAMA){

+ 16 - 13
js/manage.js

@@ -805,7 +805,7 @@ Manage.prototype.loadWeixin = function() {
 
 
 Manage.prototype.weixinShare = function() {
-    console.log("weixinShare")
+    console.log({str:"weixinShare",level:1})
     $.ajax({    
         url:'https://www.4dage.com/wechat/jssdk/', 
         type: "post",
@@ -814,9 +814,9 @@ Manage.prototype.weixinShare = function() {
         }, 
         dataType:"jsonp",     
         jsonpCallback:"success_jsonp",         
-        success:function(data,textStatus){
-            console.log("weixinShare success")
-            console.log(data.appId)
+        success:function(data, textStatus){
+            console.log({str:"微信 success,"+data.appId,  level:1})
+         
             
             wx.config({
                 // debug : true,
@@ -840,13 +840,13 @@ Manage.prototype.weixinShare = function() {
                         'openCard' ]
             });
         },    
-        error:function(XMLHttpRequest,textStatus,errorThrown){    
-            console.log("jsonp.error:"+textStatus);    
+        error:function(XMLHttpRequest,textStatus,errorThrown){   
+            console.error({str:"微信分享失败! textStatus:"+textStatus,  level:1})            
         }    
     }); 
     
     var success_jsonp = function(json){
-        console.log(json);
+        console.log({str:"success_jsonp:"+json,  level:1});
     };
 
 
@@ -854,7 +854,9 @@ Manage.prototype.weixinShare = function() {
         // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行〿
         //对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中〿
         //分享到朋友圈 
-        console.log(g_weixinObj)
+        
+        console.log({str:"微信 ready",level:1})
+        
         wx.onMenuShareTimeline({ 
             title: g_weixinObj.title, // 分享标题 
             link: g_weixinObj.lineLink, // 分享链接 
@@ -1412,6 +1414,10 @@ function initByTHREE(THREE){
         },
         
     }
+ 
+         
+    Object.assign(Manage.prototype, THREE.EventDispatcher.prototype)
+
 
     let labels = []
 
@@ -2111,6 +2117,7 @@ Manage.prototype.switchBgmState = function(state){//按钮的状态完全代表
         SoundManager.pause('bgm')
     }
     
+    this.dispatchEvent && this.dispatchEvent({type:'switchBgmState'})
     
     /* if(!g_bgAudio || !g_bgAudio.src) return;
     
@@ -2145,11 +2152,7 @@ Manage.prototype.switchBgmState = function(state){//按钮的状态完全代表
     g_bgAudio.pauseByHot = false
     g_bgAudio.pauseByTour = false */
 }    
-    
-    
-    
-    
-    
+
 var manage = new Manage();