userController.js 813 字节
var userModel =  require('../model/userModel');
var saitMd5 = require('../util/saltMD5')
var status = require('../util/resTemplate') 
const userService = require('../services/userService')
const uuid = require('../util/UuidUtil')


var userController =function (){

};

var sleep = function (time) {
    return new Promise(function (resolve, reject) {
        setTimeout(function () {
            console.log(2)
            resolve();
        }, time);
    })
};
userController.prototype.addUser = async(ctx, next) =>{
  
        var user = {
            id:uuid.db36(),
            name:'555555',
            age:11,
            telephone:11112112,
            password:saitMd5.md5AddSalt('123455').md5Pass
        }
     

    return await userService.addUser(user)
    
}
module.exports = new userController();