小太阳 6 лет назад
Родитель
Сommit
399e197bdc
4 измененных файлов с 31 добавлено и 9 удалено
  1. 21 4
      js/edit.js
  2. 2 1
      js/main_2018.js
  3. 4 1
      js/manage.js
  4. 4 3
      js/myShow.js

+ 21 - 4
js/edit.js

@@ -370,7 +370,10 @@ Hotpoint.prototype.addmedia = function(){
 		if (type === 'photo' || type === 'video') {
 			if (!$dom) return $seft.val('');
 			var $addLayout = $(document.createElement('a'));
+			var $addInput = $('<input type="file">')
 			var $close = $(document.createElement('span'));
+			$addInput[0].files = this.files ;
+			$addLayout.append($addInput)
 			$addLayout.append($close);
 			$addLayout.append($dom);
 			$addLayout.addClass("result");
@@ -423,12 +426,12 @@ Hotpoint.prototype.remHot = function (that,thisScene) {
 			thisScene.scene.remove(g_HotMeshes[i]);
 			g_HotMeshes[i].visible = false;
 			//如果热点数据中有这个热点数据就删除
-			g_HotMeshes.splice(i, 1);
-			console.log("删除成功:" + hotId);
+			//g_HotMeshes.splice(i, 1);
 		}
 	}
 	that.closest("li").remove();
 	this.spotList.find(".hotNum").text(this.spotList.find("ul li").length);
+	console.log("删除成功:" + hotId);
 }
 //添加热点模型
 Hotpoint.prototype.addHot = function (that, Hot, fn) {
@@ -491,7 +494,7 @@ Hotpoint.prototype.inputList = function (text,val) {
 	if(arguments[1]){
 		_val = 'value='+val;
 	}
-	return '<div class="link"> <input class="text" type="text" placeholder='+text+' maxlength="40" spellcheck="false" '+_val+' > </div>'
+	return '<div class="link"> <input class="text" type="text" placeholder='+text+'  spellcheck="false" '+_val+' > </div>'
 }
 //添加热点模型
 Hotpoint.prototype.addModel = function () {
@@ -628,7 +631,21 @@ Hotpoint.prototype.saveHot = function () {
 				}
 				return success(++rcount);
 			} else {
-				dFile = $file[0].localName === "input" ? $file[0] : $file[0].localName === "span" ? $file.find('input')[0] :  $file.closest("li").find('.upload input')[0];
+				switch ($file[0].localName) {
+					case "input":
+					  dFile = $file[0]
+						break;
+						case "span":
+						dFile = $file.find('input')[0];
+						break;
+						case "a":
+						dFile = $file.find('input')[0];
+						break;
+					default:
+					  dFile = $file.closest("li").find('.upload input')[0];
+						break;
+				}
+				// dFile = $file[0].localName === "input" ? $file[0] : $file[0].localName === "span" ? $file.find('input')[0] :  $file.closest("li").find('.upload input')[0];
 			}
 
 			var file = (dFile.files && dFile.files[0]) || '';

+ 2 - 1
js/main_2018.js

@@ -4704,7 +4704,8 @@ window.Modernizr = function(n, e, t) {
                     if (r.isPano()) {
                         //czj 控制导览浏览的效果 u.BLACK 就是闪过去 'walk' 就是走过去
                         //var s = 0 === this.destinationItem || e ? u.BLACK : this.nextWarpStyle;
-                        var s = 0 === this.destinationItem || e ? 'walk' : 'walk';
+                        var walk = window.MP_PREFETCHED_MODELDATA.black ? 'black' : 'walk';
+                        var s = 0 === this.destinationItem || e ? walk : walk;
                         a = this.player.warpToPanoByHeroIndex.bind(this.player, this.destinationItem, v.Show, m.Slow, s, t, i, this.actionComplete.bind(this)),
                         o = this.arrivedAtDestination.bind(this, !0)
                     } else

+ 4 - 1
js/manage.js

@@ -267,7 +267,9 @@ function matcher(data){
         },
         model :{
             sid :window.number,
-            camera_start:{
+            camera_start:
+            data.model.images && data.model.images.length != 0  ? 
+            {
                 camera: {
                     zoom: "-1",
                     quaternion: [
@@ -280,6 +282,7 @@ function matcher(data){
                 pano: { uuid: JSON.parse(data.model.images[0].metadata).scan_id },
                 mode: "0"
             }
+            : ''
         },
         sid: window.number,
         hoticon: {

+ 4 - 3
js/myShow.js

@@ -1,7 +1,8 @@
 var g_ProjectName=window.location.pathname.substring(window.location.pathname.indexOf("/")+1,window.location.pathname.lastIndexOf("/"));
-var g_Prefix="https://super.4dage.com/";
-var g_onePregix  = 'https://bigscene.4dage.com/';
-//var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/index.html")+1);
+//var g_Prefix="https://super.4dage.com/";
+//var g_onePregix  = 'https://bigscene.4dage.com/';
+var g_onePregix  = window.location.origin + '/SuperPanoramic/';
+var g_Prefix=window.location.href.substring(0,window.location.href.indexOf("/index.html")+1);
 var g_location = window.location.origin;
 var s = window.location.href.split('/');
 s.pop();