Procházet zdrojové kódy

Merge branch 'dev5.9.0-log' of Software/android-cloud-H5 into master

tangdehang před 3 měsíci
rodič
revize
8014460a71
1 změnil soubory, kde provedl 6 přidání a 3 odebrání
  1. 6 3
      static/rtcEngine/js/logReport.js

+ 6 - 3
static/rtcEngine/js/logReport.js

@@ -3,7 +3,10 @@
  */
 
 export default class LogReport {
-  URL_API = 'http://www.androidscloud.com:8002';
+  URL_API = {
+    'http:': 'http://www.androidscloud.com:8002',
+    'https:': 'https://www.androidscloud.com:8003',
+  }
   URL_SWITCH = '/api/public/v5/log/card/getLinkLogReportSwitch'; // 日志开关查询接口地址
   URL_ADDRESS = '/api/public/v5/log/card/reportCardLinkLog';  // 日志上报地址
   
@@ -179,7 +182,7 @@ export default class LogReport {
   * }
   */ 
   getLinkLogReportSwitch() {
-    return this.$Request.get(this.URL_API + this.URL_SWITCH);
+    return this.$Request.get(this.URL_API[location.protocol] + this.URL_SWITCH);
   }
 
   // 采集日志, 等待日志收集到一定数量或一定时间后再上报
@@ -251,7 +254,7 @@ export default class LogReport {
   // 日志记录上报 字符串日志上报
   report() {
     this.logs.forEach(() => {
-      this.$Request.post(this.URL_API + this.URL_ADDRESS, { ...this.logs.shift() })
+      this.$Request.post(this.URL_API[location.protocol] + this.URL_ADDRESS, { ...this.logs.shift() })
       .then(res => {
         console.log('日志上报成功', res);
       });