瀏覽代碼

观看广告次数上报

heyang 2 年之前
父節點
當前提交
e8f706dfc0
共有 2 個文件被更改,包括 33 次插入0 次删除
  1. 16 0
      static/screenAndroid/WXtrialInterface.html
  2. 17 0
      static/screenIos/WXtrialInterface.html

+ 16 - 0
static/screenAndroid/WXtrialInterface.html

@@ -1268,6 +1268,9 @@
       }
       //关闭广告
       $('.time-close-wrap')[0].addEventListener('click', () => {
+        if(videoTime == 0) {
+          reportFrequency()
+        }
         $('.buy-phone-wrap').eq(0).show();
       });
       // 点击取消
@@ -1358,6 +1361,19 @@
           success: function (res) {},
         });
       }
+      // 观看广告次数上报
+      function reportFrequency() {
+        $.ajax({
+          url: baseUrl + '/api/resoures/v1/trial/reportFrequency/' + form.userCardId,
+          headers: {
+            Authorization: form.token
+          },
+          type: 'post',
+          contentType: 'application/json',
+          dataType: 'json',
+          success: function (res) {},
+        });
+      }
       function quit() {
         if (navigator.userAgent.toLowerCase().includes('toutiaomicroapp')) {
           tt.miniProgram.switchTab({

+ 17 - 0
static/screenIos/WXtrialInterface.html

@@ -1046,6 +1046,9 @@
       }
       //关闭广告
       $('.time-close-wrap')[0].addEventListener('click', () => {
+        if(videoTime == 0) {
+          reportFrequency()
+        }
         $('.buy-phone-wrap').eq(0).show();
       });
       // 点击取消
@@ -1149,6 +1152,20 @@
         });
       }
 
+      // 观看广告次数上报
+      function reportFrequency() {
+        $.ajax({
+          url: baseUrl + '/api/resoures/v1/trial/reportFrequency/' + form.userCardId,
+          headers: {
+            Authorization: form.token
+          },
+          type: 'post',
+          contentType: 'application/json',
+          dataType: 'json',
+          success: function (res) {},
+        });
+      }
+
       function Close() {
         // webworker 关闭,清理
         var cmd = {