orgnizaition.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. export const getSubDepartment = (departmentID = "") =>
  2. uni.$u?.http.post(
  3. "/organization/department/child",
  4. JSON.stringify({
  5. departmentIDs: [departmentID],
  6. }),
  7. {
  8. header: {
  9. token: uni.getStorageSync("BusinessToken"),
  10. },
  11. },
  12. );
  13. export const getDepartmentUser = (departmentID = "") =>
  14. uni.$u?.http.post(
  15. "/organization/department/child",
  16. JSON.stringify({
  17. departmentID,
  18. }),
  19. {
  20. header: {
  21. token: uni.getStorageSync("BusinessToken"),
  22. },
  23. },
  24. );
  25. export const getUserInDepartment = (userID) =>
  26. uni.$u?.http.post(
  27. "/organization/user/department",
  28. JSON.stringify({
  29. userIDs: [userID],
  30. }),
  31. {
  32. header: {
  33. token: uni.getStorageSync("BusinessToken"),
  34. },
  35. },
  36. );
  37. export const searchInOrganization = (keyword) =>
  38. uni.$u?.http.post(
  39. "/user/search/organization/full",
  40. JSON.stringify({
  41. keyword,
  42. pagination: {
  43. pageNumber: 1,
  44. showNumber: 999,
  45. },
  46. }),
  47. {
  48. header: {
  49. token: uni.getStorageSync("BusinessToken"),
  50. },
  51. },
  52. );