|
|
@@ -28,7 +28,7 @@
|
|
|
<a>
|
|
|
<img rel="tooltip" title="" :src="require('@/assets/images/icon/pause.png')" width="24" height="24"
|
|
|
data-original-title="暂停" />
|
|
|
- <div class="btmText" :style="{ marginLeft: screenWidth < 700 ? '0px' : '-12px' }">自动漫游</div>
|
|
|
+ <div class="btmText" :style="{ marginLeft: screenWidth < 1280 ? '0px' : '-12px' }">自动漫游</div>
|
|
|
</a>
|
|
|
</div>
|
|
|
<div id="next" class="next desktop-only ui-icon wide" style="display: none">
|
|
|
@@ -206,6 +206,10 @@ export default {
|
|
|
}
|
|
|
window.initCamera = this.initCamera
|
|
|
|
|
|
+ window.savePano = this.savePano
|
|
|
+
|
|
|
+ window.initCameraByPano = this.initCameraByPano
|
|
|
+
|
|
|
window.closeHotListIcon = function () {
|
|
|
_this.isOpenHotList = false
|
|
|
console.log('外部点击关闭')
|
|
|
@@ -214,7 +218,8 @@ export default {
|
|
|
let timeA = -1;
|
|
|
|
|
|
timeA = window.setInterval(() => {
|
|
|
- if (window.hotData) {
|
|
|
+ if (window.myHotList.length > 0) {
|
|
|
+ console.log('热点数据准备完毕')
|
|
|
clearInterval(timeA);
|
|
|
if (window.parent && window.parent.window.handleRobot) {
|
|
|
window.parent.window.handleRobot('greeting')
|
|
|
@@ -255,30 +260,66 @@ export default {
|
|
|
window.parent.window.openPricePageFu()
|
|
|
}
|
|
|
},
|
|
|
- // 跳转到制定热点
|
|
|
+ // 跳转到指定热点
|
|
|
initCamera(locId) {
|
|
|
- const current = window.myHotList.find((item) => {
|
|
|
- return item.info.sid == locId;
|
|
|
- });
|
|
|
- const c =
|
|
|
- current.closestPanoTowardTag(
|
|
|
- window.player.mode,
|
|
|
- window.player.currentPano
|
|
|
- ) || window.player.currentPano;
|
|
|
+ setTimeout(() => {
|
|
|
+ const current = window.myHotList.find((item) => {
|
|
|
+ return item.info.sid == locId;
|
|
|
+ });
|
|
|
+ const c =
|
|
|
+ current.closestPanoTowardTag(
|
|
|
+ window.player.mode,
|
|
|
+ window.player.currentPano
|
|
|
+ ) || window.player.currentPano;
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ window.player.flyToPano({
|
|
|
+ // 移动到点位
|
|
|
+ pano: c,
|
|
|
+ // 移动视角
|
|
|
+ quaternion: new window.THREE.Quaternion(
|
|
|
+ current.quaternion.x,
|
|
|
+ current.quaternion.y,
|
|
|
+ current.quaternion.z,
|
|
|
+ current.quaternion.w
|
|
|
+ ),
|
|
|
+ });
|
|
|
+ }, 100);
|
|
|
+ }, 500)
|
|
|
+ },
|
|
|
|
|
|
+ // 根据点位信息初始化镜头(游戏返回后回到之前点位)
|
|
|
+ initCameraByPano(locId) {
|
|
|
setTimeout(() => {
|
|
|
window.player.flyToPano({
|
|
|
// 移动到点位
|
|
|
- pano: c,
|
|
|
+ pano: window.player.model.panos.index[locId.id],
|
|
|
// 移动视角
|
|
|
quaternion: new window.THREE.Quaternion(
|
|
|
- current.quaternion.x,
|
|
|
- current.quaternion.y,
|
|
|
- current.quaternion.z,
|
|
|
- current.quaternion.w
|
|
|
+ locId.x,
|
|
|
+ locId.y,
|
|
|
+ locId.z,
|
|
|
+ locId.w
|
|
|
),
|
|
|
});
|
|
|
- });
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ localStorage.removeItem('currentPano')
|
|
|
+ }, 1000)
|
|
|
+ }, 1000)
|
|
|
+
|
|
|
+ },
|
|
|
+ // 跳转游戏页面之前保存当前点位信息在本地缓存中
|
|
|
+ savePano() {
|
|
|
+ console.log('跳转前保存当前点位信息在缓存中', window.player.currentPano, window.player.quaternion)
|
|
|
+ // localStorage.setItem('currentPano', JSON.stringify({
|
|
|
+ // id: window.player.currentPano.id,
|
|
|
+ // x: window.player.quaternion._x,
|
|
|
+ // y: window.player.quaternion._y,
|
|
|
+ // z: window.player.quaternion._x,
|
|
|
+ // w: window.player.quaternion._w,
|
|
|
+ // }))
|
|
|
+ localStorage.setItem('currentPanoPath', `&firstView=pano:${window.player.currentPano.id},qua:${window.player.quaternion._x},${window.player.quaternion._y},${window.player.quaternion._z},${window.player.quaternion._w}&qs=1`)
|
|
|
},
|
|
|
hotListChange() {
|
|
|
if (window.parent.window.hotListShowChangeFu) {
|
|
|
@@ -474,7 +515,8 @@ export default {
|
|
|
>div {
|
|
|
margin-right: @margin;
|
|
|
|
|
|
- @media screen and (max-width: 700px) {
|
|
|
+ @media screen and (max-width: 700px),
|
|
|
+ (orientation: portrait) {
|
|
|
margin-bottom: @margin;
|
|
|
}
|
|
|
|
|
|
@@ -541,7 +583,8 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
|
|
|
- @media screen and (max-width: 700px) {
|
|
|
+ @media screen and (max-width: 700px),
|
|
|
+ (orientation: portrait) {
|
|
|
width: 50px;
|
|
|
}
|
|
|
|
|
|
@@ -549,7 +592,8 @@ export default {
|
|
|
width: @wh;
|
|
|
margin-bottom: 5px;
|
|
|
|
|
|
- @media screen and (max-width: 700px) {
|
|
|
+ @media screen and (max-width: 700px),
|
|
|
+ (orientation: portrait) {
|
|
|
margin-bottom: 10px !important;
|
|
|
}
|
|
|
}
|
|
|
@@ -562,7 +606,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
.toHomeBox2 {
|
|
|
- @media screen and (max-width: 700px) {
|
|
|
+
|
|
|
+ @media screen and (max-width: 700px),
|
|
|
+ (orientation: portrait) {
|
|
|
margin: 10px 0;
|
|
|
}
|
|
|
}
|
|
|
@@ -599,7 +645,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
// 移动端
|
|
|
-@media screen and (max-width: 1000px) {
|
|
|
+@media screen and (max-width: 1000px),
|
|
|
+(orientation: portrait) {
|
|
|
.hoverTit {
|
|
|
opacity: 0 !important;
|
|
|
}
|