|
@@ -37,7 +37,7 @@ window.initHot = function (model) {
|
|
|
var getCommonHotspotUrl = function (link) {
|
|
|
var querySectionInLink = link.split('?')[1]
|
|
|
var langParam = "en" == manage.number("lang") ? "&lang=" + manage.number("lang") : ""
|
|
|
- // return `http://192.168.20.16:8082/#/${browser.isMobile() ? 'mobile' : 'web'}/?${querySectionInLink}&time=${randomTime().getTime()}&id=${window.number}${langParam}`
|
|
|
+ // return `http://192.168.20.16:8081/#/${browser.isMobile() ? 'mobile' : 'web'}/?${querySectionInLink}&time=${randomTime().getTime()}&id=${window.number}${langParam}`
|
|
|
return `/XuzhouHanStoneReliefArtMuseum/hotspot/index.html#/${browser.isMobile() ? 'mobile' : 'web'}/?${querySectionInLink}&time=${randomTime().getTime()}&id=${window.number}${langParam}`
|
|
|
}
|
|
|
var removeSrcPostMark = function (url) {//去除texture.load时自动加上的'?'
|
|
@@ -1147,40 +1147,11 @@ window.initHot = function (model) {
|
|
|
const currentLocationQuerySection = new URLSearchParams(location.href.split('?')[1])
|
|
|
const currentSceneCode = currentLocationQuerySection.get('m')
|
|
|
|
|
|
- if (currentSceneCode === '1300' && targetSceneCode === '1302') {
|
|
|
- const iframeElem = document.createElement('iframe')
|
|
|
- iframeElem.style.position = 'absolute'
|
|
|
- iframeElem.style.top = '50%'
|
|
|
- iframeElem.style.left = '50%'
|
|
|
- iframeElem.style.width = '600px'
|
|
|
- iframeElem.style.height = '800px'
|
|
|
- iframeElem.style.transform = 'translate(-50%, -50%)'
|
|
|
- iframeElem.style.zIndex = '9999'
|
|
|
- iframeElem.style.boxShadow = '0 0 0 1000px rgba(0, 0, 0, 0.85)'
|
|
|
- // iframeElem.src = 'http://192.168.20.16:8081/#/topic'
|
|
|
- iframeElem.src = '/AnhuiDaily/quiz/index.html#/topic'
|
|
|
- document.documentElement.appendChild(iframeElem)
|
|
|
-
|
|
|
- const onMsg = (msg) => {
|
|
|
- console.log('message received!', msg)
|
|
|
- window.removeEventListener('message', onMsg, false)
|
|
|
- if (msg.data === 'quiz over') {
|
|
|
- // 跳转到新场景
|
|
|
- currentLocationQuerySection.set('m', targetSceneCode)
|
|
|
- const newLocation = location.href.split('?')[0] + '?' + currentLocationQuerySection.toString()
|
|
|
- location.assign(newLocation)
|
|
|
- location.reload(true)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- window.addEventListener('message', onMsg, false)
|
|
|
- } else {
|
|
|
- // 跳转到新场景
|
|
|
- currentLocationQuerySection.set('m', targetSceneCode)
|
|
|
- const newLocation = location.href.split('?')[0] + '?' + currentLocationQuerySection.toString()
|
|
|
- location.assign(newLocation)
|
|
|
- location.reload(true)
|
|
|
- }
|
|
|
+ // 跳转到新场景
|
|
|
+ currentLocationQuerySection.set('m', targetSceneCode)
|
|
|
+ const newLocation = location.href.split('?')[0] + '?' + currentLocationQuerySection.toString()
|
|
|
+ location.assign(newLocation)
|
|
|
+ location.reload(true)
|
|
|
} else {
|
|
|
// 不是场景跳转
|
|
|
var src = this.info.iframe[0]
|
|
@@ -1192,9 +1163,11 @@ window.initHot = function (model) {
|
|
|
} else if (this.info.linkType == "iframeDiv") { // iframe里打开链接
|
|
|
var div = document.createElement("div")
|
|
|
div.style.position = 'fixed'
|
|
|
- div.style.width = div.style.height = "100%"
|
|
|
- div.style.left = div.style.top = '0'
|
|
|
- div.style["z-index"] = "999"
|
|
|
+ div.style.width = "100%"
|
|
|
+ div.style.height = "100%"
|
|
|
+ div.style.left = '0'
|
|
|
+ div.style.top = '0'
|
|
|
+ div.style["z-index"] = "10006"
|
|
|
|
|
|
var exit = document.createElement("div")
|
|
|
exit.style["background-image"] = "url(images/vrOffImg.png)"
|
|
@@ -1210,9 +1183,7 @@ window.initHot = function (model) {
|
|
|
exit.style["z-index"] = "3"
|
|
|
exit.onclick = () => {
|
|
|
$(div).remove()
|
|
|
-
|
|
|
Hot.closePopup()
|
|
|
-
|
|
|
}
|
|
|
|
|
|
var myElement = document.createElement("iframe")
|
|
@@ -1233,12 +1204,12 @@ window.initHot = function (model) {
|
|
|
// 图片、视频之类的热点
|
|
|
if (!player.currentPano) return
|
|
|
|
|
|
- var popup = document.getElementById("popup")
|
|
|
+ var popupElem = document.getElementById("popup")
|
|
|
|
|
|
if (openHot) {
|
|
|
g_currentHot = this,
|
|
|
- popup.style.display = "block",
|
|
|
- popup.classList.add("wait")
|
|
|
+ popupElem.style.display = "block",
|
|
|
+ popupElem.classList.add("wait")
|
|
|
var n = document.createElement("iframe")
|
|
|
|
|
|
SoundManager.play('hot')
|
|
@@ -1270,7 +1241,7 @@ window.initHot = function (model) {
|
|
|
|
|
|
var done = function () {
|
|
|
player.flyingToTag = !1
|
|
|
- openHot && popup.classList.remove("wait")
|
|
|
+ openHot && popupElem.classList.remove("wait")
|
|
|
}.bind(this)
|
|
|
|
|
|
if (!needExamine) {
|