login.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * @Author: your name
  3. * @Date: 2022-02-21 09:15:17
  4. * @LastEditTime: 2022-02-23 15:11:47
  5. * @LastEditors: Please set LastEditors
  6. * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  7. * @FilePath: \CABaggageData\src\api\login.js
  8. */
  9. import request from '@/utils/request-new'
  10. //获取权限
  11. export function getAuth (params) {
  12. return request({
  13. url: '/foxlibc/getAuth',
  14. method: 'post',
  15. data: params
  16. })
  17. }
  18. //登录
  19. export function signIn (params) {
  20. return request({
  21. url: '/foxlibc/sign-in',
  22. method: 'post',
  23. data: params
  24. })
  25. }
  26. //登出
  27. export function loginOut (params) {
  28. return request({
  29. url: '/foxlibc/loginOut',
  30. method: 'post',
  31. data: params
  32. })
  33. }
  34. //获取验证码
  35. export function getVCode (params) {
  36. return request({
  37. url: '/foxlibc/getVCode',
  38. method: 'post',
  39. data: params
  40. })
  41. }
  42. //重置token
  43. export function refreshToken (params) {
  44. return request({
  45. url: '/foxlibc/refreshToken',
  46. method: 'post',
  47. data: params
  48. })
  49. }
  50. //token
  51. export function getToken (params) {
  52. return request({
  53. url: '/foxlibc/getToken',
  54. method: 'post',
  55. data: params,
  56. istoken: true
  57. })
  58. }
  59. //修改密码
  60. export function modifypass (params) {
  61. return request({
  62. url: '/openApi/query',
  63. method: 'post',
  64. data: params,
  65. istoken: true
  66. })
  67. }