Browse Source

feat: 广告配置;

qiansailong 1 year ago
parent
commit
8b7d5a87b9
1 changed files with 11 additions and 0 deletions
  1. 11 0
      pages/video/video.js

+ 11 - 0
pages/video/video.js

@@ -297,7 +297,18 @@ Page({
   formatVideoAdList(arr) {
     // 原生广告间隔,激励广告间隔
     let templateGap = 0,
+    rewardGap = 0
+    console.log(this.data.globalConfig)
+    if (this.data.globalConfig.isHomeTemplateAd === 1) {
+      templateGap = this.data.globalConfig.homeTemplateAdInterval
+    } else {
+      templateGap = 0
+    }
+    if (this.data.globalConfig.isHomeRewardAd) {
+      rewardGap = this.data.globalConfig.homeRewardAdInterval
+    } else {
       rewardGap = 0
+    }
 
     // 第二个固定是原生广告
     let result = [arr.shift(), {