内网环境判断

This commit is contained in:
王卓煜
2025-07-21 11:00:33 +08:00
parent b9f23eb657
commit 81602506c7

View File

@@ -1386,7 +1386,7 @@
this.totalContent = rs.result.contents.length; this.totalContent = rs.result.contents.length;
//加载学习的数据 //加载学习的数据
this.loadStudyData(rs.result); this.loadStudyData(rs.result);
if (rs.result.course.isPermission){ if (rs.result.isPermission){
this.getInternet() this.getInternet()
console.log('需要内网环境') console.log('需要内网环境')
} }
@@ -1395,6 +1395,14 @@
} }
}); });
}, },
getXmlHttpRequest() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
}
else if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
},
// 检测是否为内网 // 检测是否为内网
getInternet() { getInternet() {
this.Internet = 3; this.Internet = 3;