code.js 433 B

123456789101112131415161718192021222324
  1. import {
  2. useCodeServer
  3. } from '@/config/server-info'
  4. import axios from '@/plugins/axios'
  5. export function sendEmailCode ({ email }) {
  6. return axios
  7. .post(useCodeServer('/email'), null, {
  8. params: {
  9. email
  10. }
  11. })
  12. .then(res => {})
  13. }
  14. export function sendPhoneCode ({ phone }) {
  15. return axios
  16. .post(useCodeServer('/phone'), null, {
  17. params: {
  18. phone
  19. }
  20. })
  21. .then(res => {})
  22. }