index.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. const adminPath = process.uniEnv.VUE_APP_AdminPath + service_path;
  14. export default {
  15. // 获取照片
  16. getPhoto(query) {
  17. return micro_request.postRequest(
  18. instPath,
  19. "TusInstrumentPad",
  20. "Photo",
  21. query
  22. );
  23. },
  24. // 仪器信息
  25. getInstrInfo(query) {
  26. return micro_request.postRequest(
  27. instPath,
  28. "TusInstrumentPad",
  29. "IndexInfo",
  30. query
  31. );
  32. },
  33. // 上机
  34. getOn(query) {
  35. return micro_request.postRequest(
  36. instPath,
  37. "TusInstrumentPad",
  38. "Geton",
  39. query
  40. );
  41. },
  42. // 获取上机中的信息
  43. getOnInfo(query) {
  44. return micro_request.postRequest(
  45. instPath,
  46. "TusInstrumentPad",
  47. "Current",
  48. query
  49. );
  50. },
  51. // 获取预约信息
  52. getAppointInfo(query) {
  53. return micro_request.postRequest(
  54. instPath,
  55. "TusInstrumentPad",
  56. "AppointmentList",
  57. query
  58. );
  59. },
  60. // 下机
  61. geOff(query) {
  62. return micro_request.postRequest(
  63. instPath,
  64. "TusInstrumentPad",
  65. "Getoff",
  66. query
  67. );
  68. },
  69. // 获取公告信息
  70. getNoticeInfo(query) {
  71. return micro_request.postRequest(
  72. instPath,
  73. "TusInstrumentPad",
  74. "NoticeList",
  75. query
  76. );
  77. },
  78. // 获取公告信息
  79. switch(query) {
  80. return micro_request.postRequest(
  81. instPath,
  82. "TusInstrumentPad",
  83. "Switch",
  84. query
  85. );
  86. },
  87. // 获取公告信息
  88. getEntityByKey(query) {
  89. return micro_request.postRequest(
  90. adminPath,
  91. "Config",
  92. "GetEntityByKey",
  93. query
  94. );
  95. },
  96. };