user.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import { request } from "@/utils/request";
  2. export const getUserInfo = () => {
  3. return request({
  4. url: "/ucenter/user/getUserInfo",
  5. method: "post",
  6. config: {
  7. timeout: 10000,
  8. headers: {
  9. "Content-Type": "application/json;charset=UTF-8",
  10. },
  11. },
  12. });
  13. };
  14. export const getUserOrder = (data: any) => {
  15. return request({
  16. url: "/ucenter/user/order/list",
  17. method: "post",
  18. data,
  19. config: {
  20. timeout: 10000,
  21. headers: {
  22. "Content-Type": "application/json;charset=UTF-8",
  23. },
  24. },
  25. });
  26. };
  27. export const wxLogin = (data:logonParam) => {
  28. return request({
  29. url: "/service/pay/wxLogin",
  30. method: "get",
  31. data,
  32. config: {
  33. timeout: 10000,
  34. headers: {
  35. "Content-Type": "application/json;charset=UTF-8",
  36. },
  37. },
  38. });
  39. };
  40. export const getOrderInfo = (orderSn:string) => {
  41. return request({
  42. url: `/service/pay/order/info/${orderSn}`,
  43. method: "get",
  44. config: {
  45. timeout: 10000,
  46. loading: true,//隐藏进度条
  47. headers: {
  48. "Content-Type": "application/json;charset=UTF-8",
  49. },
  50. },
  51. });
  52. };
  53. export const queryOrderStatus = (data) => {
  54. return request({
  55. url: `/ucenter/user/order/queryOrderStatus`,
  56. method: "post",
  57. data,
  58. config: {
  59. timeout: 10000,
  60. loading: true,//隐藏进度条
  61. headers: {
  62. "Content-Type": "application/json;charset=UTF-8",
  63. },
  64. },
  65. });
  66. };