瀏覽代碼

bugfix:处理刷新后无法返回上个页面的问题

leo 1 年之前
父節點
當前提交
fc79c8bb23
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      static/webRtcYJ/WXtrialInterface.html

+ 7 - 4
static/webRtcYJ/WXtrialInterface.html

@@ -453,7 +453,7 @@
       );
       window.addEventListener('message', function (e) {
         let data = e.data;
-        if (data.bool && isVideo) {
+        if (data.bool && isVideo && !$('#playCanvas').is(':visible')) {
           document.getElementById('playVideo').play();
           debounceSwitchingScreens();
         }
@@ -1966,9 +1966,12 @@
             url: '/pages/home/home',
           });
         } else {
-          uni.webView.navigateBack({
-            delta: 1,
-          });
+          // uni.webView.navigateBack({
+          //   delta: 1,
+          // });
+          parent.postMessage({
+            type: 'exit'
+          }, '*')
         }
       }