common.js 371 B

123456789101112131415161718192021222324
  1. import request from './request'
  2. /*
  3. * 短信发送
  4. * */
  5. export const sendSMS = (phone) => request({
  6. method: 'POST',
  7. url: '/api/v1/send/code',
  8. data: {
  9. phone
  10. }
  11. })
  12. /*
  13. * 文件上传
  14. * */
  15. export const uploadFile = (formData) => request({
  16. headers: {
  17. 'Content-Type': 'multipart/form-data'
  18. },
  19. method: 'POST',
  20. url: '/v1/upload/file',
  21. data: formData
  22. })