|
@@ -2,10 +2,8 @@ var ceshi = '';
|
|
|
// var ceshi = 'http://192.168.0.135:8105';
|
|
|
var ceshi = 'http://47.107.252.54:8105';
|
|
|
|
|
|
-
|
|
|
-//var token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOm51bGwsIm1hbmFnZXIiOm51bGwsImlkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNTk2NTA0NDIyLCJpYXQiOjE1OTY0MTgwMjIsImp0aSI6IjRlNmZmZDgxLTUxMTUtNDZjNS1iNjlhLTY0ZDM2YzJmOGQ4ZiJ9.ou57-8znUElcMvT2e-XfJt9Vw4_BUfA3bHW37xjeQvc"//window.localStorage.dcj_token
|
|
|
-
|
|
|
-var token = window.localStorage.dcj_token
|
|
|
+var token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOm51bGwsIm1hbmFnZXIiOm51bGwsImlkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNTk2NzAxNjAyLCJpYXQiOjE1OTY2MTUyMDIsImp0aSI6Ijk0YjA5YTg1LWViY2ItNDE1Yy04OGVmLWU0MDM1M2UzYmIxYyJ9.Uzi95n0kYXp7bdpY77MdLtTpPL_Fq-jn0tE7gjg6AzA"
|
|
|
+//var token = window.localStorage.dcj_token
|
|
|
|
|
|
|
|
|
function reData(data,type) {
|
|
@@ -171,12 +169,14 @@ EditTools.prototype.saveAll = function () {
|
|
|
var info = {
|
|
|
name: $('#pjtName').val(),
|
|
|
summary: $('#info-summary').val(),
|
|
|
+ weixinDesc:$('#weixin-summary').val(),
|
|
|
backgroundMusic: $('#query-bgm').attr('href'),
|
|
|
hoticon: JSON.parse($(".hotStyle-item li.active").attr("data-val")),
|
|
|
camera_start: $('#camera-start')[0].data,
|
|
|
loadlogo: $("#loadlogo").is(':checked'),
|
|
|
special: $("#g_specialScene").is(':checked'),
|
|
|
vision_version: $("#twoData").is(':checked') ? "1.1.562.17209" : false,
|
|
|
+
|
|
|
/************************************** 方奕卓 场景可配置项 ******************************************/
|
|
|
hotImageScale: $("#hotImgScale").is(':checked'), // 热点图片可放大
|
|
|
hideFloorMarker: $("#hideFloorMarker").is(':checked'), // 地面标记
|
|
@@ -188,7 +188,7 @@ EditTools.prototype.saveAll = function () {
|
|
|
hotIconScale: $('#hotIconScale input').val(), // 热点缩放
|
|
|
supportsVR: $('#VRSwitch input').is(':checked'), // 开启VR功能
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
var overlayInfo = []
|
|
@@ -199,7 +199,7 @@ EditTools.prototype.saveAll = function () {
|
|
|
|
|
|
|
|
|
|
|
|
- info.weixinDesc = $('#weixin-summary').val();
|
|
|
+
|
|
|
$.ajax({
|
|
|
method: 'POST',
|
|
|
headers:{
|
|
@@ -256,7 +256,9 @@ SceneInformation.prototype.init = function (data, data2) {
|
|
|
$(".model-title2").text(data.model.name);
|
|
|
$('#pjtName').val(data.model.name);
|
|
|
$('#info-summary').val(data.model.summary);
|
|
|
- if (data2) $('#weixin-summary').val(data2.weixinDesc);
|
|
|
+ //if (data2) $('#weixin-summary').val(data2.weixinDesc);
|
|
|
+ $('#weixin-summary').val(data.weixinDesc);
|
|
|
+
|
|
|
|
|
|
for (var i = 0; i < $options.length; i++) {
|
|
|
if ($options.eq(i).attr('data-val') === JSON.stringify(data.hoticon)) {
|
|
@@ -264,21 +266,30 @@ SceneInformation.prototype.init = function (data, data2) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- $('#camera-start')[0].data = data.model.camera_start;
|
|
|
-
|
|
|
+ $('#camera-start')[0].data = data.camera_start;
|
|
|
+ $(".shotImg.innerBtn").on("click",()=>{
|
|
|
+ var EntryInfo = $('#camera-start')[0].data
|
|
|
+ if(EntryInfo){
|
|
|
+ var to = player.model.panos.get(EntryInfo.pano.uuid);
|
|
|
+ var q = new THREE.Quaternion().fromArray(EntryInfo.camera.quaternion);
|
|
|
+ var lookAtPoint = new THREE.Vector3(0, 0, -1).applyQuaternion(q).add(to.position);
|
|
|
+ player.flyToPano({ pano: to, lookAtPoint: lookAtPoint })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
/*************方奕卓 其他项的初始化操作 ************/
|
|
|
initColorElem(data);
|
|
|
addListener(); // 给其他元素绑定事件
|
|
|
if (data.momentTour === 'black') {
|
|
|
momentTour.prop('checked', true);
|
|
|
}
|
|
|
- if (data.showHotListSta === 'true') {
|
|
|
+ if (data.showHotListSta && data.showHotListSta != "false") {
|
|
|
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) {
|
|
|
hotIconScale.val(parseFloat(data.hotIconScale));
|
|
|
}
|
|
|
- if (data.supportsVR === 'true') {
|
|
|
+ if (data.supportsVR) {
|
|
|
VRSwitch.prop('checked', true);
|
|
|
}
|
|
|
/************************************************/
|
|
@@ -290,17 +301,17 @@ SceneInformation.prototype.init = function (data, data2) {
|
|
|
}
|
|
|
|
|
|
// 热点图片放大
|
|
|
- if (data.hotImageScale === 'true') {
|
|
|
+ if (data.hotImageScale && data.hotImageScale != "false") {
|
|
|
$hotImageScale[0].checked = true
|
|
|
}
|
|
|
|
|
|
// 隐藏地面标记
|
|
|
- if (data.hideFloorMarker === 'true') {
|
|
|
+ if (data.hideFloorMarker && data.hideFloorMarker != "false") {
|
|
|
$hideFloorMarker[0].checked = true
|
|
|
}
|
|
|
|
|
|
- // 隐藏鼠标标记
|
|
|
- if (data.hideMouseMarker === 'true') {
|
|
|
+ // 隐藏鼠标标记
|
|
|
+ if (data.hideMouseMarker && data.hideMouseMarker != "false") {
|
|
|
$hideMouseMarker[0].checked = true
|
|
|
}
|
|
|
|
|
@@ -370,29 +381,39 @@ function getSeft(seft) {
|
|
|
|
|
|
// 这部分内容需要配合main_2018.js中来进行修改
|
|
|
var snap = JSON.parse("{" + seft.getSnapAngleInfo() + "}")
|
|
|
- this.data.camera.position = snap.metadata.camera_position;
|
|
|
- this.data.camera.quaternion = snap.metadata.camera_quaternion; // 相机朝向
|
|
|
- this.data.pano.uuid = snap.metadata.scan_id; // 起始点位的id
|
|
|
+ this.data = {
|
|
|
+ camera :{
|
|
|
+ position : snap.metadata.camera_position,
|
|
|
+ quaternion : snap.metadata.camera_quaternion // 相机朝向
|
|
|
+ },
|
|
|
+ pano:{
|
|
|
+ uuid : snap.metadata.scan_id // 起始点位的id
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
var ev = document.createEvent("MouseEvent");//点击截取视图
|
|
|
g_snapShotWidth = 240;
|
|
|
g_snapShotHeight = 118;
|
|
|
window.screenSta = 'startScreen';
|
|
|
ev.initMouseEvent("snapshotBegin", true, true, document.defaultView, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
|
|
- ev.__callback = function (imgData, info) {
|
|
|
- initialPicture(imgData, info)
|
|
|
- }.bind(this);
|
|
|
+
|
|
|
+
|
|
|
+ ev.__callback = (imgData, info)=>{
|
|
|
+ uploadImg(imgData, (rs)=>{
|
|
|
+ if (rs.code === 0) {
|
|
|
+ $(".shotImg.innerBtn").css("background-image", "url(" + rs.data + ")")
|
|
|
+ this.data.thumbImg = rs.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
window.dispatchEvent(ev);
|
|
|
});
|
|
|
- //上传图片
|
|
|
- function initialPicture(imgData) {
|
|
|
- console.log(imgData);
|
|
|
- uploadImg(imgData, function (rs) {
|
|
|
- if (rs.code === 0) {
|
|
|
- $(".shotImg.innerBtn").css("background-image", "url(" + rs.data + ")")
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1207,7 +1228,7 @@ EditGuide.prototype.saveGuide = function () {
|
|
|
if (tourAudio[0].files.length > 0 && this.targetTourPoint[0].musicSta) { // 已添加导览音乐
|
|
|
new Promise(function (resolve, reject) {
|
|
|
uploadMiuse(tourAudio[0].files[0], function (res) {
|
|
|
- resolve(res.content);
|
|
|
+ resolve(res.data);
|
|
|
})
|
|
|
}).then(function (src) {
|
|
|
var audio = new Audio();
|
|
@@ -1362,8 +1383,8 @@ EditGuide.prototype.uploadGuide = function (urlData, guide, renew, target) {
|
|
|
delete that.tourAudio[oldId]; // 删除导览音频中的旧导览id
|
|
|
target.closest('li')[0].data = args; // 更新数据
|
|
|
target.closest('li').find('#tourBg')[0].style.backgroundImage = 'url(' + args.thumbnail_signed_src + ')';
|
|
|
- target.text(args.name); // 更新导览列表中的导览名称
|
|
|
- $('#tourEdit').find('#tourNameInput').val(args.name); // 修改输入框内容
|
|
|
+ args.name = $('#tourEdit').find('#tourNameInput').val()//target.text(args.name); // 更新导览列表中的导览名称 //不改名字
|
|
|
+ //$('#tourEdit').find('#tourNameInput').val(args.name); // 修改输入框内容
|
|
|
} else {
|
|
|
var index = $(".tourList ul li").length + 1;
|
|
|
var $li = $(editGuide.dom(index, args.name, args.thumbnail_signed_src));
|