Bläddra i källkod

fix(推流广告): 改用touchstart事件

曾志翔 3 år sedan
förälder
incheckning
34ecc8f88e
1 ändrade filer med 11 tillägg och 7 borttagningar
  1. 11 7
      screenIos/WXtrialInterface.html

+ 11 - 7
screenIos/WXtrialInterface.html

@@ -348,17 +348,20 @@
         disconnectionFlag = false,
         getDate = false;
 
+      // 开发环境
+      var isDev =
+        /^192\.168\./.test(location.host) || /^localhost/.test(location.host);
+      if (isDev) {
+        baseUrl = 'http://gntest.phone.androidscloud.com:1280';
+        sourceType = 2;
+      }
+
       var topwinHeight = window.screen.height - window.innerHeight + 30; //计算title top 头部
       var url = window.location.href;
       url = url.split('/');
       var baseUrl = url[0] + '//' + url[2];
       console.log(baseUrl);
-      // if (
-      //   /^192\.168\./.test(location.host) ||
-      //   /^localhost/.test(location.host)
-      // ) {
-      //   baseUrl = 'http://gntest.phone.androidscloud.com:1280';
-      // }
+
       var parameters = GetRequest();
       var form = {};
       form.token = parameters['token'];
@@ -1106,7 +1109,8 @@
           }
         })().then(function () {
           console.log(adType);
-          this.$('#playCanvas').on('touchmove', playAD);
+          this.$('#playCanvas').on('touchstart', playAD);
+          // this.$('#playCanvas').on('touchmove', playAD);
           getAD();
         });
       }