|
@@ -1,10 +1,9 @@
|
|
|
-var ceshi = '';
|
|
|
-// var ceshi = 'http://192.168.0.135:8105';
|
|
|
- var ceshi = 'http://47.107.252.54:8105';
|
|
|
|
|
|
-//var token ="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOm51bGwsIm1hbmFnZXIiOm51bGwsImlkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNTk2Nzk1NjczLCJpYXQiOjE1OTY3MDkyNzMsImp0aSI6IjBjOWE1OTA0LTM5NzgtNDY4Yi05ODA5LWRmMjY4NDdiMWVmZCJ9.ihux4chiWgbY1cxiwVKrI6XaPHGCgWuoj6uVF1KRfOo"
|
|
|
-//var token = window.localStorage.dcj_token
|
|
|
- var token = window.localStorage.bigscenetoken//军史馆
|
|
|
+
|
|
|
+var _musicMaxWeight = 8//M
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
function reData(data,type) {
|
|
|
return JSON.stringify(data) == type ? null : data
|
|
@@ -253,9 +252,9 @@ SceneInformation.prototype.init = function (data, data2) {
|
|
|
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);
|
|
|
$('#weixin-summary').val(data.weixinDesc);
|
|
|
|
|
@@ -316,12 +315,12 @@ SceneInformation.prototype.init = function (data, data2) {
|
|
|
}
|
|
|
|
|
|
//特殊大场景
|
|
|
- if (data.special === "true" || data.model.special) {
|
|
|
+ if (data.special === "true" || data.special) {
|
|
|
$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
|
|
|
}
|
|
|
|
|
@@ -346,12 +345,14 @@ function initColorElem(data, elem) {
|
|
|
// 事件监听
|
|
|
$floorMarkerColor.on('change', function (e) {
|
|
|
$('#floorMarkerColorTex').attr('placeholder', e.target.value)
|
|
|
+
|
|
|
})
|
|
|
$floorMarkerColorTex.on('blur keydown', function (e) {
|
|
|
(e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $floorMarkerColor, this);
|
|
|
})
|
|
|
$mouseMarkerColor.on('change', function (e) {
|
|
|
$('#mouseMarkerColorTex').attr('placeholder', e.target.value)
|
|
|
+
|
|
|
})
|
|
|
$mouseMarkerColorTex.on('blur keydown', function (e) {
|
|
|
(e.type === 'blur' || e.type === 'keydown' && e.keyCode === 13) && setColor(e, $mouseMarkerColor, this);
|
|
@@ -650,6 +651,7 @@ Hotpoint.prototype.addmedia = function () {
|
|
|
if (ev.target.tagName.toUpperCase() === 'INPUT') {
|
|
|
fileHandle.call(ev.target)
|
|
|
}
|
|
|
+ ev.target.value = null
|
|
|
})
|
|
|
$('.edit-fun-images').on('click', function (ev) {
|
|
|
var $tag = $(ev.target)
|
|
@@ -817,7 +819,7 @@ Hotpoint.prototype.addHot = function (that, Hot, fn) {
|
|
|
}
|
|
|
}
|
|
|
//创建热点列表的dom
|
|
|
-Hotpoint.prototype.creatDom = function (data, index) {
|
|
|
+Hotpoint.prototype.createDom = function (data, index) {
|
|
|
var _index = +index + 1;
|
|
|
return "<li data-spid=" + data.name + " id=ggg_s" + index + ">" +
|
|
|
"<div class=icon></div>" +
|
|
@@ -830,7 +832,7 @@ Hotpoint.prototype.creatDom = function (data, index) {
|
|
|
//添加热点列表
|
|
|
Hotpoint.prototype.addHotList = function (data, index) {
|
|
|
if (!data) return;
|
|
|
- this.spotList.children("ul").append(this.creatDom(data, index));
|
|
|
+ this.spotList.children("ul").append(this.createDom(data, index));
|
|
|
//保存热点信息到热点dom元素中
|
|
|
var spotList = $(".spotList ul").children("#ggg_s" + index);
|
|
|
spotList[0].hotAttribute = g_HotMeshes[index];
|
|
@@ -1047,13 +1049,14 @@ var EditMiuse = function () {
|
|
|
this.mediaUpload.find("input").val("");
|
|
|
};
|
|
|
var that = this;
|
|
|
- $('#upload-bgm').on('change', function () {
|
|
|
+ $('#upload-bgm').on('change', function (e) {
|
|
|
var file = this.files[0];
|
|
|
uploadMiuse(file, function (rs, file) {
|
|
|
if (rs.code === 0) {
|
|
|
that.success(file.name, rs.data)
|
|
|
}
|
|
|
})
|
|
|
+ e.target.value = null
|
|
|
});
|
|
|
//删除音乐
|
|
|
this.mediaUpload.on("click", ".delete", function () {
|
|
@@ -1080,7 +1083,7 @@ var EditGuide = function () {
|
|
|
* @description 新增参数data2, 表示data2.js中的数据
|
|
|
*/
|
|
|
EditGuide.prototype.init = function (data, data2) {
|
|
|
- this.creatDom(data, data2);
|
|
|
+ this.createDom(data, data2);
|
|
|
this.addTourMusic(); // 添加导览音乐
|
|
|
this.tourAudio = data2.tourAudio || {};
|
|
|
var that = this;
|
|
@@ -1131,6 +1134,7 @@ EditGuide.prototype.init = function (data, data2) {
|
|
|
}
|
|
|
}).on("change", function (ev) {
|
|
|
this.inputDone(ev)
|
|
|
+ ev.target.value = null
|
|
|
}.bind(this))
|
|
|
$('.tourList ul input').on('blur', function (ev) {
|
|
|
this.inputDone(ev)
|
|
@@ -1299,7 +1303,7 @@ EditGuide.prototype.addTourMusic = function () {
|
|
|
* @param {object} data someData.js中的模型数据
|
|
|
* @param {object} data2 data2.js中的导览和热点数据
|
|
|
*/
|
|
|
-EditGuide.prototype.creatDom = function (data, data2) {
|
|
|
+EditGuide.prototype.createDom = function (data, data2) {
|
|
|
var $lis = [];
|
|
|
var that = this;
|
|
|
var tourAudio = data2.tourAudio || {};
|
|
@@ -1442,13 +1446,16 @@ var uploadMiuse = function (file, callback) {
|
|
|
return false;
|
|
|
}
|
|
|
//限制大小不大于8m
|
|
|
- if (!restrictedSize(file, 8)) {
|
|
|
+ if (!restrictedSize(file, _musicMaxWeight)) {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
uploadFile(file, 'audio', callback);
|
|
|
}
|
|
|
|
|
|
+$(".toolRight .music .itemTitle span").text(`背景音乐 (<${_musicMaxWeight}M)`)
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//上传图片
|
|
|
function uploadImg(urlData, callback) {
|
|
@@ -1477,7 +1484,24 @@ function uploadFile(file, type, callback) {
|
|
|
formData.append('name', number)
|
|
|
formData.append('dir', type)
|
|
|
formData.append('random', true)
|
|
|
- formData.append('file', file)
|
|
|
+ formData.append('file', file, getRandomSid()+".jpg")
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
+var blob = dataURLtoBlob(fileObj.file);
|
|
|
+ form.append("file", blob, fileObj.name);
|
|
|
+ } else {
|
|
|
+ if (fileObj.isBlob) {
|
|
|
+ console.log('上传的文件:' + fileObj.name)
|
|
|
+ form.append("file", fileObj.file, fileObj.name);
|
|
|
+ } else {
|
|
|
+ var file = fileObj.file;
|
|
|
+ form.append("file", file, fileObj.name);
|
|
|
+ } */
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
$.ajax({
|
|
|
url: ceshi + '/manage/scene/upload/'+number,
|