customservice.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { server } from "@/utils/server";
  2. // 获取客户服务链接
  3. // POST /v1/api/front/links/services
  4. // 接口ID:222356319
  5. // 接口地址:https://app.apifox.com/link/project/4790544/apis/api-222356319
  6. export interface ServiceTypes {
  7. /**
  8. * 图标地址
  9. */
  10. icon_url: string;
  11. /**
  12. * 名称
  13. */
  14. name: string;
  15. /**
  16. * 跳转地址
  17. */
  18. url: string;
  19. is_suspend: 1 | 2;
  20. // 注册页显示
  21. register_show: 1 | 2;
  22. // 首页显示
  23. status: 1 | 2;
  24. }
  25. export const getServicesApi = async () => {
  26. return server
  27. .request<ServiceTypes[]>({
  28. url: "/v1/api/front/links/services",
  29. method: "POST",
  30. })
  31. .then((res) => {
  32. return res.data;
  33. })
  34. .catch((err) => {
  35. return [];
  36. });
  37. };
  38. // 获取社交媒体链接
  39. // POST /v1/api/front/links/socials
  40. // 接口ID:222356373
  41. // 接口地址:https://app.apifox.com/link/project/4790544/apis/api-222356373
  42. export const getSocialsApi = async () => {
  43. return server
  44. .request<ServiceTypes[]>({
  45. url: "/v1/api/front/links/socials",
  46. method: "POST",
  47. })
  48. .then((res) => {
  49. return res.data;
  50. })
  51. .catch((err) => {
  52. return [];
  53. });
  54. };