Commit bb4cd4fb by lixinming
parents e1cdfb8b 71713b3e
......@@ -61,7 +61,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
*/
async function getFuHuaQiUserList(req, res) {
let reqConf = {operationName: 'string', page: 'number' };
let reqConf = {operationName: 'String', page: 'Number' };
let { operationName, page } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
......@@ -91,7 +91,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
*/
async function getEnterpriseList(req, res) {
let reqConf = {time: 'number', fuHuaQiUscc: 'string', industry: 'number', isNaturalPersonHolding: 'boolean', page: 'number' };
let reqConf = {time: 'Number', fuHuaQiUscc: 'String', industry: 'Number', isNaturalPersonHolding: 'Boolean', page: 'Number' };
let { time, fuHuaQiUscc, industry, isNaturalPersonHolding, page } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
......@@ -106,7 +106,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
*/
async function updateState(req, res) {
let reqConf = {userState: 'boolean', uscc: 'string' };
let reqConf = {userState: 'Boolean', uscc: 'String' };
let { userState, uscc } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
......
......@@ -102,7 +102,7 @@ export function getPwdMd5(uscc:string, pwd:string) {
*/
export function checkReqParam(conf, param) {
for (let key in conf ) {
if ( param[key] != 'boolean' && !param[key] ) throw new BizError(ERRORENUM.参数错误, `缺失${key}字段`);
if ( typeof param[key] != 'boolean' && !param[key] ) throw new BizError(ERRORENUM.参数错误, `缺失${key}字段`);
let type = typeof param[key];
switch(conf[key]) {
case 'Number':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment