index.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * @Author: liuzhenlin 461480418@qq.ocm
  3. * @Date: 2023-01-19 14:06:58
  4. * @LastEditors: liuzhenlin
  5. * @LastEditTime: 2023-02-15 18:45:00
  6. * @Description: file content
  7. * @FilePath: \oms\api\system\user.js
  8. */
  9. import micro_request from "../../utils/micro_request";
  10. // console.log(process.uniEnv.VITE_INSTR_ADMIN);
  11. const service_path = uni.getStorageSync("labsop_service_path") || "";
  12. const instPath = process.uniEnv.VITE_INSTR_ADMIN + service_path;
  13. export default {
  14. // 获取照片
  15. getPhoto(query) {
  16. return micro_request.postRequest(
  17. instPath,
  18. "TusInstrumentPad",
  19. "Photo",
  20. query
  21. );
  22. },
  23. // 仪器信息
  24. getInstrInfo(query) {
  25. return micro_request.postRequest(
  26. instPath,
  27. "TusInstrumentPad",
  28. "IndexInfo",
  29. query
  30. );
  31. },
  32. // 上机
  33. getOn(query) {
  34. return micro_request.postRequest(
  35. instPath,
  36. "TusInstrumentPad",
  37. "Geton",
  38. query
  39. );
  40. },
  41. // 获取上机中的信息
  42. getOnInfo(query) {
  43. return micro_request.postRequest(
  44. instPath,
  45. "TusInstrumentPad",
  46. "Current",
  47. query
  48. );
  49. },
  50. // 获取预约信息
  51. getAppointInfo(query) {
  52. return micro_request.postRequest(
  53. instPath,
  54. "TusInstrumentPad",
  55. "AppointmentList",
  56. query
  57. );
  58. },
  59. // 下机
  60. geOff(query) {
  61. return micro_request.postRequest(
  62. instPath,
  63. "TusInstrumentPad",
  64. "Getoff",
  65. query
  66. );
  67. },
  68. // 获取公告信息
  69. getNoticeInfo(query) {
  70. return micro_request.postRequest(
  71. instPath,
  72. "TusInstrumentPad",
  73. "NoticeList",
  74. query
  75. );
  76. },
  77. // 获取公告信息
  78. switch(query) {
  79. return micro_request.postRequest(
  80. instPath,
  81. "TusInstrumentPad",
  82. "Switch",
  83. query
  84. );
  85. },
  86. };