text: const { v4 } = require('uuid')
  
  // 生成随机短信验证码
  exports.generateShortMessageCode = (length = 6) => String(Math.random()).slice(2, 2 + length)
  
  // 获取访问者真实IP
  exports.getIP = (req) => 
    req.headers['x-forwarded-for'] ||
    req.connection.remoteAddress ||
    req.socket.remoteAddress ||
    req.connection.socket.remoteAddress
  
  // 返回uuid
  exports.uuid = () => v4()