mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-30 13:20:24 +08:00
opti: 所有success文案换成成功
This commit is contained in:
parent
04b5e63a94
commit
d3d93e9dbc
@ -25,7 +25,7 @@ class interfaceColController extends baseController{
|
||||
* @example
|
||||
*/
|
||||
async list(ctx){
|
||||
try {
|
||||
try {
|
||||
let id = ctx.query.project_id;
|
||||
let result = await this.colModel.list(id);
|
||||
|
||||
@ -113,7 +113,7 @@ class interfaceColController extends baseController{
|
||||
let inst = yapi.getInst(interfaceCaseModel);
|
||||
let result = await inst.list(id, 'all');
|
||||
for(let index=0; index< result.length; index++){
|
||||
|
||||
|
||||
result[index] = result[index].toObject();
|
||||
let interfaceData = await this.interfaceModel.getBaseinfo(result[index].interface_id);
|
||||
let projectData = await this.projectModel.getBaseInfo(interfaceData.project_id);
|
||||
@ -197,8 +197,8 @@ class interfaceColController extends baseController{
|
||||
typeid: params.project_id
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.body = yapi.commons.resReturn(result);
|
||||
|
||||
}catch(e){
|
||||
@ -265,8 +265,8 @@ class interfaceColController extends baseController{
|
||||
typeid: caseData.project_id
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.body = yapi.commons.resReturn(result);
|
||||
|
||||
@ -402,7 +402,7 @@ class interfaceColController extends baseController{
|
||||
// typeid: params.project_id
|
||||
// });
|
||||
|
||||
return ctx.body = yapi.commons.resReturn('success')
|
||||
return ctx.body = yapi.commons.resReturn('成功!')
|
||||
}catch(e){
|
||||
ctx.body = yapi.commons.resReturn(null, 400, e.message)
|
||||
}
|
||||
@ -481,7 +481,7 @@ class interfaceColController extends baseController{
|
||||
typeid: caseData.project_id
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
return ctx.body = yapi.commons.resReturn(result);
|
||||
|
||||
|
@ -10,7 +10,7 @@ exports.resReturn = (data, num, errmsg) => {
|
||||
|
||||
return {
|
||||
errcode: num,
|
||||
errmsg: errmsg || 'success',
|
||||
errmsg: errmsg || '成功!',
|
||||
data: data
|
||||
};
|
||||
};
|
||||
@ -238,7 +238,7 @@ exports.saveLog = (logData) => {
|
||||
typeid: logData.typeid
|
||||
};
|
||||
logInst.save(data).then(
|
||||
|
||||
|
||||
);
|
||||
} catch(e) {
|
||||
yapi.commons.log(e, 'error'); // eslint-disable-line
|
||||
|
@ -824,7 +824,7 @@ var interfaceColController = function (_baseController) {
|
||||
// typeid: params.project_id
|
||||
// });
|
||||
|
||||
return _context8.abrupt('return', ctx.body = _yapi2.default.commons.resReturn('success'));
|
||||
return _context8.abrupt('return', ctx.body = _yapi2.default.commons.resReturn('成功!'));
|
||||
|
||||
case 7:
|
||||
_context8.prev = 7;
|
||||
|
@ -39,7 +39,7 @@ exports.resReturn = function (data, num, errmsg) {
|
||||
|
||||
return {
|
||||
errcode: num,
|
||||
errmsg: errmsg || 'success',
|
||||
errmsg: errmsg || '成功!',
|
||||
data: data
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user