Browse Source

添加注释,iframe类型的热点 样式优化

任一存 2 years ago
parent
commit
c1dfcfdaa6
2 changed files with 26 additions and 14 deletions
  1. 15 1
      README.md
  2. 11 13
      public/static/js/Hot.js

+ 15 - 1
README.md

@@ -1,2 +1,16 @@
 # 部署位置
-oss 4dkk-culture/华南1(深圳)AnhuiDaily/display/
+oss 4dkk-culture/华南1(深圳)AnhuiDaily/display/
+
+# 热点编辑规则
+
+## 场景跳转
+添加网页链接-跳转 填写目标场景url
+
+## 图片热点等等
+照常编辑
+
+## 外链-新窗口打开
+添加网页链接-跳转 填写 'external-' + url
+
+## 外链-iframe打开
+添加网页链接-iframe 填写url

+ 11 - 13
public/static/js/Hot.js

@@ -1088,8 +1088,8 @@ window.initHot = function (model) {
 
 
         examine(options = {}) {
-          console.log('打开热点,关闭背景音乐')
-        
+          console.log('打开热点,关闭背景音乐', this.info)
+
           // 判断当前背景音乐是开的还是关的
           let tempp = document.querySelector('#openMusic')
           if (tempp.style.display === 'block') {
@@ -1099,7 +1099,7 @@ window.initHot = function (model) {
             window.musicFlagNow = '音乐开'
             SoundManager.pause('bgm')
           }
-        
+
           /**
            * 图片、视频之类的热点
            * 
@@ -1112,8 +1112,8 @@ window.initHot = function (model) {
            * 热点编辑里添加网页链接——普通
            * 
            * link: 提供默认效果的链接
-           * linkType: 'jumpLink'
-           * iframe: ['http://47.112.166.173:8105/editPage/edit.html?m=1308']
+           * linkType: 'common'
+           * iframe: [填写的链接]
            */
 
           
@@ -1122,12 +1122,12 @@ window.initHot = function (model) {
            * 
            * link: 提供默认效果的链接
            * linkType: 'jumpLink'
-           * iframe: ['http://47.112.166.173:8105/editPage/edit.html?m=1308']
+           * iframe: [填写的链接]
            */
           
           /**
            * 热点编辑里添加网页链接——iframe
-           * 提供默认效果的链接
+           * link: 提供默认效果的链接
            * linkType: 'iframeDiv'
            * iframe: ['...']
            */
@@ -1182,8 +1182,7 @@ window.initHot = function (model) {
                 location.assign(newLocation)
                 location.reload(true)
               }
-            } else {
-              // 不是场景跳转
+            } else { // 不是场景跳转
               var src = this.info.iframe[0]
         
               if (this.info.linkType == "jumpLink") { // 新页面打开链接
@@ -1197,10 +1196,10 @@ window.initHot = function (model) {
                 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["z-index"] = "9999"
           
                 var exit = document.createElement("div")
-                exit.style["background-image"] = "url(images/vrOffImg.png)"
+                exit.style["background-image"] = "url(static/images/vrOffImg.png)"
                 exit.style.position = 'absolute'
                 exit.style.width = exit.style.height = "50px"
                 exit.style.left = '17px'; exit.style.top = "20px"
@@ -1232,8 +1231,7 @@ window.initHot = function (model) {
                 SoundManager.play('hot')
               }
             }
-          } else {
-            // 图片、视频之类的热点
+          } else { // 图片、视频之类的热点 或者 热点编辑里添加网页链接——普通
             if (!player.currentPano) return
           
             var popup = document.getElementById("popup")