Skip to content

Commit 6fb13d9

Browse files
committed
Demo: MultiDataSource 解决 APIAuto 在快速多次操作后,可能用例列表等显示的不是最新的(切换分组导致先发后至)
1 parent f6d8925 commit 6fb13d9

File tree

1 file changed

+8
-0
lines changed
  • APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js

1 file changed

+8
-0
lines changed

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/static/api/js/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5147,7 +5147,15 @@ https://github.com/Tencent/APIJSON/issues
51475147
}
51485148
},
51495149

5150+
lastCaseReqTime: 0,
51505151
onTestCaseListResponse: function(show, url, res, err) {
5152+
var time = res == null || res.config == null || res.config.metadata == null ? 0 : (res.config.metadata.startTime || 0)
5153+
if (time < this.lastCaseReqTime) {
5154+
return
5155+
}
5156+
5157+
this.lastCaseReqTime = time;
5158+
51515159
this.onResponse(url, res, err)
51525160

51535161
var rpObj = res.data

0 commit comments

Comments
 (0)