.expert.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "code",
  5. "education",
  6. "school",
  7. "birthDate",
  8. "qqwx",
  9. "email",
  10. "company",
  11. "zwzc",
  12. "expertise",
  13. "img_path",
  14. "workexperience",
  15. "scientific",
  16. "undertakingproject",
  17. "scienceaward",
  18. "social",
  19. "status",
  20. "remark",
  21. 'name',
  22. 'phone',
  23. 'addr',
  24. 'office_phone',
  25. 'profession',
  26. 'passwd',
  27. ],
  28. },
  29. destroy: {
  30. params: ["!id"],
  31. service: "delete",
  32. },
  33. update: {
  34. params: ["!id"],
  35. requestBody: [
  36. "education",
  37. "school",
  38. "birthDate",
  39. "qqwx",
  40. "email",
  41. "company",
  42. "zwzc",
  43. "expertise",
  44. "img_path",
  45. "workexperience",
  46. "scientific",
  47. "undertakingproject",
  48. "scienceaward",
  49. "social",
  50. "status",
  51. "remark",
  52. 'name',
  53. 'phone',
  54. 'addr',
  55. 'office_phone',
  56. 'profession',
  57. "status"
  58. ],
  59. },
  60. show: {
  61. parameters: {
  62. params: ["!id"],
  63. },
  64. service: "fetch",
  65. },
  66. index: {
  67. parameters: {
  68. query: {
  69. name: "%name%",
  70. phone: "phone",
  71. code: "code",
  72. company: "company",
  73. status: "status",
  74. "create_time@start": "create_time@start",
  75. "create_time@end": "create_time@end",
  76. },
  77. options: {
  78. isdel: "0", // 默认条件
  79. },
  80. },
  81. service: "query",
  82. options: {
  83. query: ["skip", "limit"],
  84. sort: ["meta.createdAt"],
  85. desc: true,
  86. count: true,
  87. },
  88. },
  89. //修改密码
  90. password: {
  91. params: ["!id"],
  92. requestBody: ["passwd"],
  93. service: "password",
  94. },
  95. // 登陆
  96. login: {
  97. requestBody: ["phone", "passwd"],
  98. service: "login",
  99. }
  100. };