index.js 576 B

12345678910111213141516171819202122232425
  1. const express = require('express');
  2. const router = express.Router();
  3. const crypto = require('crypto');
  4. const events = require('events');
  5. const db = require('../common/mysqlConnection');
  6. let emitter = new events.EventEmitter();
  7. router.get('/signStatus', (req, res, next) => {
  8. if (req.session.signinStatus) {
  9. res.send({
  10. status: 'signedin',
  11. info: '已登录'
  12. });
  13. } else {
  14. res.send({
  15. status: 'signout',
  16. info: '未登录',
  17. url: '#/signin'
  18. });
  19. }
  20. });
  21. module.exports = router;