From 62af46007f545e9b84a71edb42226dec8d72dca7 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 15 Aug 2018 17:58:59 +0800 Subject: [PATCH] update --- libs/route-utils/index.js | 4 ++-- libs/route-utils/res-message/index.js | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/route-utils/index.js b/libs/route-utils/index.js index f2ff813..13dc203 100644 --- a/libs/route-utils/index.js +++ b/libs/route-utils/index.js @@ -1,5 +1,5 @@ const _ = require('lodash') - +const resMessage = require('./res-message') /** * check Object * @param {string} key key name @@ -44,7 +44,7 @@ const chkObject = function (key = '', type = '', empty = false) { return true } -const resObject = () => { +const resObject = (key = null, message = null, msgCode = null) => { } diff --git a/libs/route-utils/res-message/index.js b/libs/route-utils/res-message/index.js index 922efa7..ccf7159 100644 --- a/libs/route-utils/res-message/index.js +++ b/libs/route-utils/res-message/index.js @@ -3,6 +3,7 @@ module.exports = { status: 200, obj: { status: 200, + msgCode: 10000, message: 'success' } }, @@ -10,6 +11,7 @@ module.exports = { status: 400, obj: { status: 400, + msgCode: 11000, message: 'input data format error' } }, @@ -17,6 +19,7 @@ module.exports = { status: 500, obj: { status: 500, + msgCode: 12000, message: 'server internal error' } }