Forráskód Böngészése

点击热点后酌情执行自定义操作

任一存 2 éve
szülő
commit
1f1449d14e
1 módosított fájl, 26 hozzáadás és 3 törlés
  1. 26 3
      public/static/js/Hot.js

+ 26 - 3
public/static/js/Hot.js

@@ -37,8 +37,8 @@ window.initHot = function (model) {
     var getLink = function (link) {
         var querySectionInLink = link.split('?')[1]
         var langParam = "en" == manage.number("lang") ? "&lang=" + manage.number("lang") : "";
-        // return `http://192.168.20.16:8085/#/${browser.isMobile() ? 'mobile' : 'web'}/?${querySectionInLink}&time=${randomTime().getTime()}&id=${window.number}${langParam}`
-        return `/AnhuiDaily/hotspot/index.html#/${browser.isMobile() ? 'mobile' : 'web'}/?${querySectionInLink}&time=${randomTime().getTime()}&id=${window.number}${langParam}`
+        return `http://192.168.20.16:8085/#/${browser.isMobile() ? 'mobile' : 'web'}/?${querySectionInLink}&time=${randomTime().getTime()}&id=${window.number}${langParam}`
+        // return `/AnhuiDaily/hotspot/index.html#/${browser.isMobile() ? 'mobile' : 'web'}/?${querySectionInLink}&time=${randomTime().getTime()}&id=${window.number}${langParam}`
     }
     var removeSrcPostMark = function (url) {//去除texture.load时自动加上的'?'
         var index = url.indexOf('?')
@@ -1104,8 +1104,19 @@ window.initHot = function (model) {
           var needExamine = options.examine || (!settings.dontExamHot && this.info.actionType.examine)
           if (!openHot && !needExamine) return
         
-        
           if (openHot && this.info.linkType != "common" && this.info.iframe && this.info.iframe[0]) {
+            // // 注意,因为网站用了vue router, url里看上去像是查询片段的那一段其实是放在hash片段中的。
+            // const hotspotWebQuerySection = new URLSearchParams(this.info.iframe[0].split('?')[1])
+            // // console.log('111', hotspotWebQuerySection.get('m'));
+            
+            // const mainWebQuerySection = new URLSearchParams(location.href.split('?')[1])
+            // mainWebQuerySection.set('m', '1302')
+            // const newLocation = location.href.split('?')[0] + '?' + mainWebQuerySection.toString()
+            // location.assign(newLocation)
+            // location.reload(true)
+            
+            
+            
             var src = getLink(this.info.iframe[0])
         
             if (this.info.linkType == "jumpLink") {
@@ -1162,6 +1173,18 @@ window.initHot = function (model) {
           var popup = document.getElementById("popup")
         
           if (openHot) {
+            // // 注意,因为网站用了vue router, url里看上去像是查询片段的那一段其实是放在hash片段中的。
+            // const hotspotWebQuerySection = new URLSearchParams(this.info.link.split('?')[1])
+            // // console.log('222', hotspotWebQuerySection.get('m'));
+
+            // const mainWebQuerySection = new URLSearchParams(location.href.split('?')[1])
+            // mainWebQuerySection.set('m', '1302')
+            // const newLocation = location.href.split('?')[0] + '?' + mainWebQuerySection.toString()
+            // location.assign(newLocation)
+            // location.reload(true)
+            
+            
+            
             g_currentHot = this,
             popup.style.display = "block",
             popup.classList.add("wait")