|
@@ -3,7 +3,10 @@
|
|
*/
|
|
*/
|
|
|
|
|
|
export default class LogReport {
|
|
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_SWITCH = '/api/public/v5/log/card/getLinkLogReportSwitch'; // 日志开关查询接口地址
|
|
URL_ADDRESS = '/api/public/v5/log/card/reportCardLinkLog'; // 日志上报地址
|
|
URL_ADDRESS = '/api/public/v5/log/card/reportCardLinkLog'; // 日志上报地址
|
|
|
|
|
|
@@ -179,7 +182,7 @@ export default class LogReport {
|
|
* }
|
|
* }
|
|
*/
|
|
*/
|
|
getLinkLogReportSwitch() {
|
|
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() {
|
|
report() {
|
|
this.logs.forEach(() => {
|
|
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 => {
|
|
.then(res => {
|
|
console.log('日志上报成功', res);
|
|
console.log('日志上报成功', res);
|
|
});
|
|
});
|