Browse Source

修改bug

huangxiaojing 2 years ago
parent
commit
87105fecb4
2 changed files with 36 additions and 2 deletions
  1. 19 2
      static/screenAndroid/WXtrialInterface.html
  2. 17 0
      static/screenIos/WXtrialInterface.html

+ 19 - 2
static/screenAndroid/WXtrialInterface.html

@@ -703,7 +703,7 @@
       });
     }
 
-    /*var hidden, visibilityChange;
+    var hidden, visibilityChange;
     if (typeof document.hidden !== 'undefined') {
       // Opera 12.10 and Firefox 18 and later support
       hidden = 'hidden';
@@ -747,7 +747,7 @@
         isFeed = false;
         myVideo.pause();
       }
-    }*/
+    }
 
     myVideo.addEventListener('pause', function () {
       isFeed = false;
@@ -1367,6 +1367,7 @@
       }).then(function (res) {
         if (res.status === 0) {
           let time = res.data;
+          startTime();
           residueTimer = setInterval(() => {
             if (time > 0) {
               time--;
@@ -1382,6 +1383,22 @@
       });
     }
 
+    // 客户端成功进入云手机后调用
+    function startTime() {
+      if (sourceType !== 5) {
+        return
+      }
+      return $.ajax({
+        url: baseUrl + `/api/resources/yearMember/startTime?userCardId=${userCardId}`,
+        headers: {
+          Authorization: token,
+        },
+        type: 'get',
+        dataType: 'json',
+        contentType: 'application/json;charset=UTF-8',
+      }).then(function (res) {});
+    }
+
     // 秒转化为时分秒
     function getResultTime(time) {
       let theTime = parseInt(time);// 秒

+ 17 - 0
static/screenIos/WXtrialInterface.html

@@ -1354,6 +1354,7 @@
       }).then(function (res) {
         if (res.status === 0) {
           let time = res.data;
+          startTime();
           residueTimer = setInterval(() => {
             if (time > 0) {
               time--;
@@ -1369,6 +1370,22 @@
       });
     }
 
+    // 客户端成功进入云手机后调用
+    function startTime() {
+      if (sourceType !== 5) {
+        return
+      }
+      return $.ajax({
+        url: baseUrl + `/api/resources/yearMember/startTime?userCardId=${userCardId}`,
+        headers: {
+          Authorization: token,
+        },
+        type: 'get',
+        dataType: 'json',
+        contentType: 'application/json;charset=UTF-8',
+      }).then(function (res) {});
+    }
+
     // 秒转化为时分秒
     function getResultTime(time) {
       let theTime = parseInt(time);// 秒