liyongli 5 ay önce
ebeveyn
işleme
2b34872e77
4 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 4 2
      sdk/adList.js
  2. 0 0
      sdk/adList.min.js
  3. 0 0
      sdk/index.html
  4. 0 0
      src/tool/adList.min.js

+ 4 - 2
src/tool/adList.js → sdk/adList.js

@@ -10,7 +10,9 @@
  * @param {string[]} ad_cover 广告图片
  */
 document.addEventListener('DOMContentLoaded', function () {
-  const base = 'http://10.30.160.129:8082/'
+  const agreement =
+    location.origin === 'http://' ? 'http:' : location.origin === 'https://' ? 'https:' : 'http://'
+  const base = agreement + '10.30.160.129:8082/'
   /**
    * 广告初始化
    * @param config 广告配置
@@ -361,7 +363,7 @@ document.addEventListener('DOMContentLoaded', function () {
   }
   // 轮播End
   const script = document.querySelector('#sxtv-ad-id')
-  const CFG = 'http://cxzx.smcic.net/ad/catalog/' + script.getAttribute('ad_id') + '.json'
+  const CFG = agreement + 'cxzx.smcic.net/ad/catalog/' + script.getAttribute('ad_id') + '.json'
   try {
     fetch(CFG + '?' + Date.now())
       .then((res) => res.json())

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
sdk/adList.min.js


+ 0 - 0
src/tool/index.html → sdk/index.html


Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
src/tool/adList.min.js


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor