mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-30 13:20:24 +08:00
fix: 容错性修复,防止mockjs parse error导致的问题
This commit is contained in:
parent
28e686a287
commit
fa06da8cd2
@ -45,6 +45,7 @@ YApi 是<strong>高效</strong>、<strong>易用</strong>、<strong>功能强大
|
||||
* 去哪儿
|
||||
* 唯品支付
|
||||
* 链家网
|
||||
* 快手
|
||||
* 中山市鲣鸟网络科技有限公司
|
||||
* 广州大象健康科技有限公司
|
||||
* 杭州数慧科技有限公司
|
||||
|
@ -138,7 +138,13 @@ module.exports = async (ctx, next) => {
|
||||
body: ctx.request.body
|
||||
}
|
||||
);
|
||||
res = Mock.mock(res);
|
||||
|
||||
try{
|
||||
res = Mock.mock(res);
|
||||
}catch(e){
|
||||
res = res;
|
||||
}
|
||||
|
||||
let context = {
|
||||
projectData: project,
|
||||
interfaceData: interfaceData,
|
||||
|
Loading…
Reference in New Issue
Block a user