Skip to content

Commit 95e4c01

Browse files
committed
不允许对APIJSON Server接口做回归测试
1 parent 181ddc3 commit 95e4c01

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

js/main.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,14 +1182,23 @@
11821182
4-类型改变,红色;
11831183
*/
11841184
test: function () {
1185+
var baseUrl = App.getBaseUrl() || ''
1186+
if (baseUrl == '') {
1187+
alert('请先输入有效的URL!')
1188+
return
1189+
}
1190+
if (baseUrl.indexOf('/apijson.cn') >= 0 || baseUrl.indexOf('/39.108.143.172') >= 0) {
1191+
alert('请把URL改成你自己的!')
1192+
return
1193+
}
11851194
const list = App.remotes || []
11861195
const allCount = list.length - 1
11871196
App.testProcess = allCount <= 0 ? '' : '正在测试: ' + 0 + '/' + allCount
11881197
if (allCount <= 0) {
11891198
alert('请先获取测试用例文档\n点击[查看共享]图标按钮')
11901199
return
11911200
}
1192-
var baseUrl = App.getBaseUrl()
1201+
11931202
for (var i = 0; i < list.length; i ++) {
11941203
const item = list[i]
11951204
if (item == null || item.name == null) {

0 commit comments

Comments
 (0)