recruit.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import request from '../utils/request.js'
  2. class recruit extends request {
  3. //获取职位列表
  4. // type 1、社招;2、校招
  5. // status 状态 默认1没发布 2已发布 3已过期
  6. static async getRecruitList(name = '', type = 1, page = 1, pageSize = 10,status=2) {
  7. var data = {
  8. page: page,
  9. pageSize: pageSize,
  10. name: name,
  11. type: type,
  12. status: status,
  13. }
  14. const res = await this.postRequest(`${this.BASE_URL}open/recruit/list-recruit`, data)
  15. return res.data
  16. }
  17. //获取职位信息
  18. static async getRecruitInfo(id) {
  19. var data = {
  20. id: id
  21. }
  22. const res = await this.postRequest(`${this.BASE_URL}open/recruit/info-recruit`, data)
  23. return res.data;
  24. }
  25. //获取是否是收藏的 职位
  26. static async getRecruitLikeInfo(id,openid) {
  27. var data = {
  28. recruitsId: id,
  29. openid: openid,
  30. }
  31. const res = await this.postRequest(`${this.BASE_URL}open/recruit/info-like-recruit`, data)
  32. return res.data;
  33. }
  34. //收藏职位
  35. static async collectionRecruit(openId,recruitsId) {
  36. var data = {
  37. openid: openId,
  38. recruitsId: recruitsId
  39. }
  40. const res = await this.postRequest(`${this.BASE_URL}open/recruit/collection-recruit`, data)
  41. return res.data;
  42. }
  43. //投递职位
  44. static async deliveryRecruit(openId,recruitsId) {
  45. var data = {
  46. openid: openId,
  47. recruitsId: recruitsId
  48. }
  49. const res = await this.postRequest(`${this.BASE_URL}open/recruit/delivery-recruit`, data)
  50. return res.data;
  51. }
  52. //获取我的投递列表
  53. static async getDelivery(openId,page = 1, pageSize = 10,status=null) {
  54. var data = {
  55. page: page,
  56. pageSize: pageSize,
  57. openid: openId,
  58. status:status
  59. }
  60. const res = await this.postRequest(`${this.BASE_URL}open/recruit/list-delivery`, data)
  61. return res.data
  62. }
  63. //获取我的收藏列表
  64. static async getCollection(openId,page = 1, pageSize = 10) {
  65. var data = {
  66. page: page,
  67. pageSize: pageSize,
  68. openid: openId,
  69. }
  70. const res = await this.postRequest(`${this.BASE_URL}open/recruit/list-collection`, data)
  71. return res.data
  72. }
  73. //编辑用户(简历信息)
  74. static async saveUser(data) {
  75. const res = await this.postRequest(`${this.BASE_URL}open/recruit/save-user`, data)
  76. return res.data;
  77. }
  78. //用户登陆
  79. static async loginUser(data) {
  80. const res = await this.postRequest(`${this.BASE_URL}open/recruit/login-user`, data)
  81. return res.data;
  82. }
  83. //用户信息
  84. static async infoUser(data) {
  85. const res = await this.postRequest(`${this.BASE_URL}open/recruit/info-user`, data)
  86. return res.data;
  87. }
  88. //获取职位信息
  89. static async userRecruitInfo(openid) {
  90. var data = {
  91. openid: openid
  92. }
  93. const res = await this.postRequest(`${this.BASE_URL}open/recruit/user-recruit-info`, data)
  94. return res.data;
  95. }
  96. }
  97. export default recruit