recruit.js 2.5 KB

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