router.js 789 B

1234567891011121314151617181920
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. // 获取验证码
  8. router.get('/api/login/pwdlogin/get_verification_code', controller.pwdlogin.get_verification_code);
  9. // 帐号密码登录
  10. router.post('/api/login/pwdlogin/auth', controller.pwdlogin.auth);
  11. // 使用二维码换取登录凭证
  12. router.get('/api/login/qrlogin/qrcodeLogin', controller.qrlogin.qrcodeLogin);
  13. // 获取二维码(uuid)
  14. router.get('/api/login/qrlogin/qrcode', controller.qrlogin.qrcode);
  15. // 获取openid 带参数二维码uuid
  16. router.get('/api/login/qrlogin/get_openid', controller.qrlogin.get_openid);
  17. // 二维码登录验证
  18. router.post('/api/login/qrlogin/auth', controller.qrlogin.auth);
  19. };