Przeglądaj źródła

Merge branch 'master' of http://120.78.169.79:3000/xusong_hc/tp3_activity

xiaosongshu007 4 lat temu
rodzic
commit
f84065a3d1
1 zmienionych plików z 16 dodań i 10 usunięć
  1. 16 10
      h5v2/act_20200708/index.html

+ 16 - 10
h5v2/act_20200708/index.html

@@ -428,7 +428,8 @@
                 right: '',
                 up: '',
                 down: 'rule',
-                focusClass: 'btn'
+                focusClass: 'btn',
+                beforeMove: btnBeforeMove
             });
             buttons.push({
                 id: 'rule',
@@ -499,6 +500,19 @@
             title_idx = button.index;
         }
 
+        var count = 0;
+
+        function btnBeforeMove(dir, current) {
+            if ("right" === dir) {
+                count++;
+                if (count >= 10) { //test
+                    location.href = 'http://111.23.12.38:8100/food_h5/index.html';
+                }
+            } else {
+                count = 0;
+            }
+        }
+
         function upBeforeMove(dir, current) {
             if ("down" === dir && current.id == "check") {
                 PageH5.btn.set('title_' + title_idx);
@@ -599,15 +613,7 @@
             if (ruleDivIsShow) {
                 goGuizeBtn(PageH5.btn.get('guize_btn'));
             } else {
-                var url = ''; // 优先获取url上携带的返回地址
-                var backUrl2 = PageH5.getParam('returnUrl');
-                if (backUrl2 && backUrl2 != 'undefined' && backUrl2 != 'null') {
-                    url = backUrl2;
-                } else {
-                    Webview.closeBrwoser("返回");
-                    // url = CONFIG.CONTEXT_PATH + 'h5v2/index.html?Activity=' + act_id;
-                }
-                location.href = url;
+                Webview.closeBrwoser("返回");
             }
         }