liyongli 5 달 전
부모
커밋
2b34872e77
4개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  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())

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
sdk/adList.min.js


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


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
src/tool/adList.min.js


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.