user.api.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { httpAxios, httpAxiosNoNprogress, httpAxios_gym, httpAxios_gyt } from "@/api/ApiInstance"
  2. /** 获取二维码 */
  3. export const createQrcodeApi = () => {
  4. return httpAxios.axioseRquest({
  5. method: "get",
  6. url: "/open/qrcode/create"
  7. })
  8. }
  9. /** 查询二维码状态 */
  10. export const queryQrcodeStatusApi = (uuid: string) => {
  11. return httpAxiosNoNprogress.axioseRquest({
  12. method: "get",
  13. url: "/open/qrcode/query/" + uuid
  14. })
  15. }
  16. /** 获取字典 */
  17. export const getDictionary = (key: string) => {
  18. return httpAxios.axioseRquest({
  19. method: "get",
  20. url: "/api/v1/dictitem/getByValue",
  21. params: {
  22. value: key
  23. }
  24. })
  25. }
  26. /** 管乐迷 */
  27. //获取用户信息
  28. export const queryUserInfo_gym = () => {
  29. return httpAxios_gym.axioseRquest({
  30. method: "get",
  31. url: "/api-teacher/teacher/queryUserInfo"
  32. })
  33. }
  34. // 退出登录
  35. export const logout_gym = () => {
  36. return httpAxios_gym.axioseRquest({
  37. method: "get",
  38. url: "/api-auth/exit",
  39. headers: {
  40. "Content-Type": "x-www-form-urlencoded"
  41. }
  42. })
  43. }
  44. /** 管乐团*/
  45. // 获取用户信息
  46. export const getUserInfo_gyt = () => {
  47. return httpAxios_gyt.axioseRquest({
  48. method: "get",
  49. url: "/api-teacher/user/getUserInfo"
  50. })
  51. }
  52. // 退出登录
  53. export const logout_gyt = () => {
  54. return httpAxios_gyt.axioseRquest({
  55. method: "get",
  56. url: "/api-teacher/user/logout"
  57. })
  58. }