index.ts 516 B

12345678910111213141516171819202122232425
  1. import http from '@/support/http';
  2. /**
  3. * 忘记密码发送验证码
  4. */
  5. export function sendCode(params: object) {
  6. return http.post('/send_code', params).then(res => {
  7. const r = res.data;
  8. const code = r.code;
  9. if (code === 1e4) {
  10. return r;
  11. }
  12. });
  13. }
  14. /**
  15. * 忘记密码重置
  16. */
  17. export function resetPassword(params: object) {
  18. return http.post('/reset_password', params).then(res => {
  19. const r = res.data;
  20. const code = r.code;
  21. if (code === 1e4) {
  22. return r;
  23. }
  24. });
  25. }