File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -364,9 +364,9 @@ var JSONResponse = {
364364 var tThrw = target . throw ;
365365 var rThrw = real . throw ;
366366
367+ var exceptions = target . exceptions || [ ] ;
367368 if ( rCode != tCode || rThrw != tThrw ) {
368369
369- var exceptions = target . exceptions || [ ] ;
370370 var find = null ;
371371 for ( var i = 0 ; i < exceptions . length ; i ++ ) {
372372 var ei = exceptions [ i ] ;
@@ -418,6 +418,14 @@ var JSONResponse = {
418418 real . throw = rThrw ;
419419 }
420420
421+ if ( exceptions . length > 0 && ( target . repeat || 0 ) <= 0 && ( result || { } ) . code < JSONResponse . COMPARE_VALUE_CHANGE ) {
422+ return {
423+ code : JSONResponse . COMPARE_VALUE_CHANGE ,
424+ msg : '状态码' + codeName + ' 违背首次成功、后续失败的趋势' ,
425+ path : folder == null ? '' : folder
426+ }
427+ }
428+
421429 return result ;
422430 } ,
423431
Original file line number Diff line number Diff line change 35403540 + '\nAPIJSON - C# 版: https://github.com/liaozb/APIJSON.NET '
35413541 + '\nAPIJSON - PHP版: https://github.com/qq547057827/apijson-php '
35423542 + '\nAPIJSON -Node版: https://github.com/kevinaskin/apijson-node '
3543- + '\nAPIJSON - Go 版: https://github.com/crazytaxi824/APIJSON '
35443543 + '\nAPIJSON -Python: https://github.com/zhangchunlin/uliweb-apijson '
35453544 + '\n感谢热心的作者们的贡献,GitHub 右上角点 ⭐Star 支持下他们吧 ^_^' ;
35463545 }
35613560 '\n\n\n## 文档 \n\n 通用文档见 [APIJSON通用文档](https://github.com/Tencent/APIJSON/blob/master/Document.md#3.2) \n### 数据字典\n自动查数据库表和字段属性来生成 \n\n' + d
35623561 + '<h3 align="center">简介</h3>'
35633562 + '<p align="center">本站为 APIAuto-自动化接口管理平台'
3564- + '<br>提供 接口和文档托管、机器学习自动化测试、自动生成文档和代码 等服务 '
3563+ + '<br>提供 接口和文档托管、机器学习自动化测试、自动生成文档和代码 等支持 '
35653564 + '<br>由 <a href="https://github.com/TommyLemon/APIAuto" target="_blank">APIAuto(前端网页工具)</a>, <a href="https://github.com/Tencent/APIJSON" target="_blank">APIJSON(后端接口服务)</a> 等提供技术支持'
35663565 + '<br>遵循 <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache-2.0 开源协议</a>'
35673566 + '<br>Copyright © 2016-' + new Date ( ) . getFullYear ( ) + ' Tommy Lemon<br><br></p>'
50675066 }
50685067 }
50695068 }
5069+ else {
5070+ stddObj . repeat = ( stddObj . repeat || 0 ) + 1 ; // 统计重复出现次数
5071+ }
50705072
50715073 const isNewRandom = isRandom && random . id <= 0
50725074
You can’t perform that action at this time.
0 commit comments