|
@@ -253,9 +253,9 @@ SceneInformation.prototype.init = function (data, data2) {
|
|
let VRSwitch = $('#VRSwitch input'); // VR功能开启
|
|
let VRSwitch = $('#VRSwitch input'); // VR功能开启
|
|
/***********************************************************************************/
|
|
/***********************************************************************************/
|
|
|
|
|
|
- $(".model-title2").text(data.model.name);
|
|
|
|
- $('#pjtName').val(data.model.name);
|
|
|
|
- $('#info-summary').val(data.model.summary);
|
|
|
|
|
|
+ $(".model-title2").text(data.name);
|
|
|
|
+ $('#pjtName').val(data.name);
|
|
|
|
+ $('#info-summary').val(data.summary);
|
|
//if (data2) $('#weixin-summary').val(data2.weixinDesc);
|
|
//if (data2) $('#weixin-summary').val(data2.weixinDesc);
|
|
$('#weixin-summary').val(data.weixinDesc);
|
|
$('#weixin-summary').val(data.weixinDesc);
|
|
|
|
|
|
@@ -283,7 +283,7 @@ SceneInformation.prototype.init = function (data, data2) {
|
|
if (data.momentTour === 'black') {
|
|
if (data.momentTour === 'black') {
|
|
momentTour.prop('checked', true);
|
|
momentTour.prop('checked', true);
|
|
}
|
|
}
|
|
- if (data.showHotListSta && data.showHotListSta != "false") {
|
|
|
|
|
|
+ if (data.showHotListSta) {
|
|
hotListSwitch.prop('checked', true);
|
|
hotListSwitch.prop('checked', true);
|
|
}
|
|
}
|
|
if (data.hotIconScale && parseFloat(data.hotIconScale) <= 1.5 && parseFloat(data.hotIconScale) >= 0.3) {
|
|
if (data.hotIconScale && parseFloat(data.hotIconScale) <= 1.5 && parseFloat(data.hotIconScale) >= 0.3) {
|
|
@@ -301,27 +301,27 @@ SceneInformation.prototype.init = function (data, data2) {
|
|
}
|
|
}
|
|
|
|
|
|
// 热点图片放大
|
|
// 热点图片放大
|
|
- if (data.hotImageScale && data.hotImageScale != "false") {
|
|
|
|
|
|
+ if (data.hotImageScale) {
|
|
$hotImageScale[0].checked = true
|
|
$hotImageScale[0].checked = true
|
|
}
|
|
}
|
|
|
|
|
|
// 隐藏地面标记
|
|
// 隐藏地面标记
|
|
- if (data.hideFloorMarker && data.hideFloorMarker != "false") {
|
|
|
|
|
|
+ if (data.hideFloorMarker) {
|
|
$hideFloorMarker[0].checked = true
|
|
$hideFloorMarker[0].checked = true
|
|
}
|
|
}
|
|
|
|
|
|
// 隐藏鼠标标记
|
|
// 隐藏鼠标标记
|
|
- if (data.hideMouseMarker && data.hideMouseMarker != "false") {
|
|
|
|
|
|
+ if (data.hideMouseMarker) {
|
|
$hideMouseMarker[0].checked = true
|
|
$hideMouseMarker[0].checked = true
|
|
}
|
|
}
|
|
|
|
|
|
//特殊大场景
|
|
//特殊大场景
|
|
- if (data.special === "true" || data.model.special) {
|
|
|
|
|
|
+ if (data.special) {
|
|
$g_specialScene[0].checked = true
|
|
$g_specialScene[0].checked = true
|
|
}
|
|
}
|
|
|
|
|
|
//启动二代的数据
|
|
//启动二代的数据
|
|
- if (data.vision_version === "1.1.562.17209" || data.model.vision_version) {
|
|
|
|
|
|
+ if (data.vision_version === "1.1.562.17209" || data.vision_version) {
|
|
$twoData[0].checked = true
|
|
$twoData[0].checked = true
|
|
}
|
|
}
|
|
|
|
|
|
@@ -346,12 +346,14 @@ function initColorElem(data, elem) {
|
|
// 事件监听
|
|
// 事件监听
|
|
$floorMarkerColor.on('change', function (e) {
|
|
$floorMarkerColor.on('change', function (e) {
|
|
$('#floorMarkerColorTex').attr('placeholder', e.target.value)
|
|
$('#floorMarkerColorTex').attr('placeholder', e.target.value)
|
|
|
|
+
|
|
})
|
|
})
|
|
$floorMarkerColorTex.on('blur keydown', function (e) {
|
|
$floorMarkerColorTex.on('blur keydown', function (e) {
|
|
(e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $floorMarkerColor, this);
|
|
(e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $floorMarkerColor, this);
|
|
})
|
|
})
|
|
$mouseMarkerColor.on('change', function (e) {
|
|
$mouseMarkerColor.on('change', function (e) {
|
|
$('#mouseMarkerColorTex').attr('placeholder', e.target.value)
|
|
$('#mouseMarkerColorTex').attr('placeholder', e.target.value)
|
|
|
|
+
|
|
})
|
|
})
|
|
$mouseMarkerColorTex.on('blur keydown', function (e) {
|
|
$mouseMarkerColorTex.on('blur keydown', function (e) {
|
|
(e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $mouseMarkerColor, this);
|
|
(e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $mouseMarkerColor, this);
|
|
@@ -392,8 +394,8 @@ function getSeft(seft) {
|
|
}
|
|
}
|
|
|
|
|
|
var ev = document.createEvent("MouseEvent");//点击截取视图
|
|
var ev = document.createEvent("MouseEvent");//点击截取视图
|
|
- g_snapShotWidth = 240;
|
|
|
|
- g_snapShotHeight = 118;
|
|
|
|
|
|
+ g_snapShotWidth = 240*4;
|
|
|
|
+ g_snapShotHeight = 118*4;
|
|
window.screenSta = 'startScreen';
|
|
window.screenSta = 'startScreen';
|
|
ev.initMouseEvent("snapshotBegin", true, true, document.defaultView, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
|
ev.initMouseEvent("snapshotBegin", true, true, document.defaultView, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
|
|
|
|
|
@@ -497,7 +499,7 @@ Hotpoint.prototype.editHot = function (target) {
|
|
this.hotpointDetail.removeClass("atRight");
|
|
this.hotpointDetail.removeClass("atRight");
|
|
|
|
|
|
$("#hotpointDetail .audio.mediaUpload").find("input").val(''); // 点击编辑导览清空上一次文件
|
|
$("#hotpointDetail .audio.mediaUpload").find("input").val(''); // 点击编辑导览清空上一次文件
|
|
- var playIcon = '139.159.225.37:85/images/play.png';
|
|
|
|
|
|
+ var playIcon = 'images/play.png';
|
|
var $layout = $("#hotpointDetail")[0];
|
|
var $layout = $("#hotpointDetail")[0];
|
|
$layout.targetDOM = target.closest("li")[0];//closest匹配选择器的第一个祖先元素
|
|
$layout.targetDOM = target.closest("li")[0];//closest匹配选择器的第一个祖先元素
|
|
//编辑时将热点列表唯一标识带入,以便后期保存使用识别
|
|
//编辑时将热点列表唯一标识带入,以便后期保存使用识别
|
|
@@ -650,6 +652,7 @@ Hotpoint.prototype.addmedia = function () {
|
|
if (ev.target.tagName.toUpperCase() === 'INPUT') {
|
|
if (ev.target.tagName.toUpperCase() === 'INPUT') {
|
|
fileHandle.call(ev.target)
|
|
fileHandle.call(ev.target)
|
|
}
|
|
}
|
|
|
|
+
|
|
})
|
|
})
|
|
$('.edit-fun-images').on('click', function (ev) {
|
|
$('.edit-fun-images').on('click', function (ev) {
|
|
var $tag = $(ev.target)
|
|
var $tag = $(ev.target)
|
|
@@ -817,7 +820,7 @@ Hotpoint.prototype.addHot = function (that, Hot, fn) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//创建热点列表的dom
|
|
//创建热点列表的dom
|
|
-Hotpoint.prototype.creatDom = function (data, index) {
|
|
|
|
|
|
+Hotpoint.prototype.createDom = function (data, index) {
|
|
var _index = +index + 1;
|
|
var _index = +index + 1;
|
|
return "<li data-spid=" + data.name + " id=ggg_s" + index + ">" +
|
|
return "<li data-spid=" + data.name + " id=ggg_s" + index + ">" +
|
|
"<div class=icon></div>" +
|
|
"<div class=icon></div>" +
|
|
@@ -830,7 +833,7 @@ Hotpoint.prototype.creatDom = function (data, index) {
|
|
//添加热点列表
|
|
//添加热点列表
|
|
Hotpoint.prototype.addHotList = function (data, index) {
|
|
Hotpoint.prototype.addHotList = function (data, index) {
|
|
if (!data) return;
|
|
if (!data) return;
|
|
- this.spotList.children("ul").append(this.creatDom(data, index));
|
|
|
|
|
|
+ this.spotList.children("ul").append(this.createDom(data, index));
|
|
//保存热点信息到热点dom元素中
|
|
//保存热点信息到热点dom元素中
|
|
var spotList = $(".spotList ul").children("#ggg_s" + index);
|
|
var spotList = $(".spotList ul").children("#ggg_s" + index);
|
|
spotList[0].hotAttribute = g_HotMeshes[index];
|
|
spotList[0].hotAttribute = g_HotMeshes[index];
|
|
@@ -925,7 +928,7 @@ Hotpoint.prototype.saveHot = function () {
|
|
args.images = imgUrls
|
|
args.images = imgUrls
|
|
//获取热点视频所有的路径
|
|
//获取热点视频所有的路径
|
|
return new Promise(function (resolve, reject) {
|
|
return new Promise(function (resolve, reject) {
|
|
- upload($videos, 'images', resolve)
|
|
|
|
|
|
+ upload($videos, 'videos', resolve)
|
|
})
|
|
})
|
|
}).then(function (videoUrls) {
|
|
}).then(function (videoUrls) {
|
|
args.video = videoUrls
|
|
args.video = videoUrls
|
|
@@ -1047,13 +1050,14 @@ var EditMiuse = function () {
|
|
this.mediaUpload.find("input").val("");
|
|
this.mediaUpload.find("input").val("");
|
|
};
|
|
};
|
|
var that = this;
|
|
var that = this;
|
|
- $('#upload-bgm').on('change', function () {
|
|
|
|
|
|
+ $('#upload-bgm').on('change', function (e) {
|
|
var file = this.files[0];
|
|
var file = this.files[0];
|
|
uploadMiuse(file, function (rs, file) {
|
|
uploadMiuse(file, function (rs, file) {
|
|
if (rs.code === 0) {
|
|
if (rs.code === 0) {
|
|
that.success(file.name, rs.data)
|
|
that.success(file.name, rs.data)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ e.target.value = null
|
|
});
|
|
});
|
|
//删除音乐
|
|
//删除音乐
|
|
this.mediaUpload.on("click", ".delete", function () {
|
|
this.mediaUpload.on("click", ".delete", function () {
|
|
@@ -1080,7 +1084,7 @@ var EditGuide = function () {
|
|
* @description 新增参数data2, 表示data2.js中的数据
|
|
* @description 新增参数data2, 表示data2.js中的数据
|
|
*/
|
|
*/
|
|
EditGuide.prototype.init = function (data, data2) {
|
|
EditGuide.prototype.init = function (data, data2) {
|
|
- this.creatDom(data, data2);
|
|
|
|
|
|
+ this.createDom(data, data2);
|
|
this.addTourMusic(); // 添加导览音乐
|
|
this.addTourMusic(); // 添加导览音乐
|
|
this.tourAudio = data2.tourAudio || {};
|
|
this.tourAudio = data2.tourAudio || {};
|
|
var that = this;
|
|
var that = this;
|
|
@@ -1123,6 +1127,7 @@ EditGuide.prototype.init = function (data, data2) {
|
|
var choice = confirm("你确定删除吗?"); // 删除导览
|
|
var choice = confirm("你确定删除吗?"); // 删除导览
|
|
if (choice) {
|
|
if (choice) {
|
|
$seft.closest('li').remove();
|
|
$seft.closest('li').remove();
|
|
|
|
+ reIndexTourList()
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
return false
|
|
return false
|
|
@@ -1130,6 +1135,7 @@ EditGuide.prototype.init = function (data, data2) {
|
|
}
|
|
}
|
|
}).on("change", function (ev) {
|
|
}).on("change", function (ev) {
|
|
this.inputDone(ev)
|
|
this.inputDone(ev)
|
|
|
|
+ ev.target.value = null
|
|
}.bind(this))
|
|
}.bind(this))
|
|
$('.tourList ul input').on('blur', function (ev) {
|
|
$('.tourList ul input').on('blur', function (ev) {
|
|
this.inputDone(ev)
|
|
this.inputDone(ev)
|
|
@@ -1173,9 +1179,16 @@ EditGuide.prototype.init = function (data, data2) {
|
|
}
|
|
}
|
|
_animate(dragingRect, draging);
|
|
_animate(dragingRect, draging);
|
|
_animate(targetRect, target);
|
|
_animate(targetRect, target);
|
|
|
|
+ reIndexTourList()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+function reIndexTourList(){
|
|
|
|
+ Array.from($(".tourList ul li")).forEach((li,index)=>{
|
|
|
|
+ $(li).find("div:first-child span").text(index+1);
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author fyz 编辑导览数据
|
|
* @author fyz 编辑导览数据
|
|
@@ -1291,13 +1304,13 @@ EditGuide.prototype.addTourMusic = function () {
|
|
* @param {object} data someData.js中的模型数据
|
|
* @param {object} data someData.js中的模型数据
|
|
* @param {object} data2 data2.js中的导览和热点数据
|
|
* @param {object} data2 data2.js中的导览和热点数据
|
|
*/
|
|
*/
|
|
-EditGuide.prototype.creatDom = function (data, data2) {
|
|
|
|
|
|
+EditGuide.prototype.createDom = function (data, data2) {
|
|
var $lis = [];
|
|
var $lis = [];
|
|
var that = this;
|
|
var that = this;
|
|
var tourAudio = data2.tourAudio || {};
|
|
var tourAudio = data2.tourAudio || {};
|
|
data.model.images.forEach(function (i, index) {
|
|
data.model.images.forEach(function (i, index) {
|
|
if (i.thumbnail_signed_src) {
|
|
if (i.thumbnail_signed_src) {
|
|
- var $li = $(that.dom(index, i.name, i.thumbnail_signed_src));
|
|
|
|
|
|
+ var $li = $(that.dom(index+1, i.name, i.thumbnail_signed_src));
|
|
$li[0].data = i
|
|
$li[0].data = i
|
|
// 挂载当前导览点对应的音频链接
|
|
// 挂载当前导览点对应的音频链接
|
|
if (i.sid in tourAudio && tourAudio[i.sid].music && tourAudio[i.sid].music !== '') {
|
|
if (i.sid in tourAudio && tourAudio[i.sid].music && tourAudio[i.sid].music !== '') {
|
|
@@ -1434,13 +1447,16 @@ var uploadMiuse = function (file, callback) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
//限制大小不大于8m
|
|
//限制大小不大于8m
|
|
- if (!restrictedSize(file, 8)) {
|
|
|
|
|
|
+ if (!restrictedSize(file, _musicMaxWeight)) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
|
|
|
|
uploadFile(file, 'audio', callback);
|
|
uploadFile(file, 'audio', callback);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+$(".toolRight .music .itemTitle span").text(`背景音乐 (<${_musicMaxWeight}M)`)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
//上传图片
|
|
//上传图片
|
|
function uploadImg(urlData, callback) {
|
|
function uploadImg(urlData, callback) {
|