index.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. import request from '@/config/axios'
  2. // 获取人才信息
  3. export const getBaseInfo = async (params) => {
  4. return await request.get({
  5. url: '/app-api/menduner/system/person/get',
  6. params
  7. })
  8. }
  9. // 发送验证码
  10. export const sendSmsCode = async (data) => {
  11. return await request.post({
  12. url: '/app-api/menduner/system/auth/send-sms-code',
  13. data
  14. })
  15. }
  16. // 验证码登录
  17. export const smsLogin = async (data) => {
  18. return await request.post({
  19. url: '/app-api/menduner/system/auth/sms-login',
  20. data
  21. })
  22. }
  23. // 切换登录
  24. export const switchLoginOfEnterprise = async (data) => {
  25. return await request.post({
  26. tokenIndex: 2, // 使用求职token
  27. url: '/app-api/menduner/system/recruit/enterprise/auth/switch-login',
  28. data
  29. })
  30. }
  31. // 企业-验证码登录
  32. export const smsLoginOfEnterprise = async (data) => {
  33. return await request.post({
  34. url: '/app-api/menduner/system/recruit/enterprise/auth/sms-login',
  35. data
  36. })
  37. }
  38. // 企业-密码登录
  39. export const passwordLoginOfEnterprise = async (data) => {
  40. return await request.post({
  41. url: '/app-api/menduner/system/recruit/enterprise/auth/login',
  42. data
  43. })
  44. }
  45. // 密码登录
  46. export const passwordLogin = async (data) => {
  47. return await request.post({
  48. url: '/app-api/menduner/system/auth/login',
  49. data
  50. })
  51. }
  52. // 退出登录
  53. export const logout = async () => {
  54. return await request.post({
  55. url: '/app-api/menduner/system/auth/logout'
  56. })
  57. }
  58. // 根据令牌退出登录
  59. export const logoutToken = async (token) => {
  60. return await request.post({
  61. url: `/app-api/menduner/system/recruit/enterprise/auth/logout-token?token=${token}`
  62. })
  63. }
  64. // 修改密码
  65. export const updatePassword = async (data) => {
  66. return await request.put({
  67. url: '/app-api/menduner/system/mde-user/update-password',
  68. data
  69. })
  70. }
  71. // 重置密码
  72. export const resetPassword = async (data) => {
  73. return await request.post({
  74. url: '/admin-api/menduner/system/mde-user/update-password',
  75. data
  76. })
  77. }
  78. // 字典
  79. export const getDictData = async (params) => {
  80. return await request.get({
  81. url: '/app-api/system/dict-data/type',
  82. params
  83. })
  84. }
  85. // 点击访问职位埋点
  86. export const getPositionTreeClick = async (data) => {
  87. return await request.post({
  88. url: '/app-api/menduner/system/position/click',
  89. data
  90. })
  91. }
  92. // 获取职位列表
  93. export const getPositionData = async (params) => {
  94. return request.get({
  95. url: '/app-api/menduner/system/position/list',
  96. params
  97. })
  98. }
  99. // 获取热门职位
  100. export const getHotPositionList = async (params) => {
  101. return await request.get({
  102. url: '/app-api/menduner/system/position/hot',
  103. params
  104. })
  105. }
  106. // 获得职位信息
  107. export const getPositionTreeData = async (params) => {
  108. return await request.get({
  109. url: '/app-api/menduner/system/position/get/tree',
  110. params
  111. })
  112. }
  113. // 获取区域树形
  114. export const getAreaTreeData = async () => {
  115. return await request.get({
  116. url: '/app-api/menduner/system/area/get/tree'
  117. })
  118. }
  119. // 获取行业树形
  120. export const getIndustryTreeData = async (params) => {
  121. return await request.get({
  122. url: '/app-api/menduner/system/industry/get/tree',
  123. params
  124. })
  125. }
  126. // 获取行业列表
  127. export const getIndustryListData = async (params) => {
  128. return await request.get({
  129. url: '/app-api/menduner/system/industry/list',
  130. params
  131. })
  132. }
  133. // 获取地区列表
  134. export const getAreaListData = async (params) => {
  135. return await request.get({
  136. url: '/app-api/menduner/system/area/list',
  137. params
  138. })
  139. }
  140. // 获取-技能列表
  141. export const getSkillList = async () => {
  142. return await request.get({
  143. url: '/app-api/menduner/system/skill/list'
  144. })
  145. }
  146. // 获取地区获取地区map
  147. export const getAreaMapData = async (params) => {
  148. return await request.get({
  149. url: '/app-api/menduner/system/area/map',
  150. params
  151. })
  152. }
  153. // 公司检索-获取热门地区
  154. export const getHotArea = async () => {
  155. return await request.get({
  156. url: '/app-api/menduner/system/area/get/hot'
  157. })
  158. }
  159. // 上传文件
  160. export const uploadFile = async (data) => {
  161. return await request.upload({ url: '/app-api/infra/file/upload', data })
  162. }
  163. // 获取当前登录的企业用户信息
  164. export const getEnterprisingUserInfo = async (params) => {
  165. return await request.get({
  166. url: '/app-api/menduner/system/recruit/user/get',
  167. params
  168. })
  169. }
  170. // 招聘端-刷新令牌token
  171. export const enterpriseRefreshToken = async (refreshToken) => {
  172. return await request.post({
  173. url: `/app-api/menduner/system/recruit/enterprise/auth/refresh-token?refreshToken=${refreshToken}`
  174. })
  175. }
  176. // 求职端-刷新令牌token
  177. export const userRefreshToken = async (refreshToken) => {
  178. return await request.post({
  179. url: `/app-api/menduner/system/auth/refresh-token?refreshToken=${refreshToken}`
  180. })
  181. }
  182. // 招聘端-企业账户信息(积分&余额)
  183. export const getEnterpriseUserAccount = async () => {
  184. return await request.get({
  185. // url: '/app-api/menduner/system/recruit/user/get/account'
  186. url: '/app-api/pay/currency/get' // 获取货币账户
  187. })
  188. }
  189. // 求职端-用户账户信息(积分&余额)
  190. export const getUserAccount = async () => {
  191. return await request.get({
  192. url: '/app-api/menduner/system/mde-user/get/account'
  193. })
  194. }
  195. // 获取聊天秘钥信息
  196. export const getChatKey = async (data) => {
  197. return await request.post({
  198. url: '/app-api/im/user/get',
  199. data
  200. })
  201. }
  202. // 同步最近会话
  203. export const getConversationSync = async (data) => {
  204. return await request.post({
  205. url: '/app-api/im/conversation/sync',
  206. data
  207. })
  208. }
  209. // 同步最近会话
  210. export const getMessageSync = async (data) => {
  211. return await request.post({
  212. url: '/app-api/im/im/channel/messagesync',
  213. data
  214. })
  215. }
  216. // 设置最近会话未读数量
  217. export const setUnread = async (data) => {
  218. return await request.post({
  219. url: '/app-api/im/conversations/setUnread',
  220. data
  221. })
  222. }
  223. // 设置最近会话未读数量
  224. export const deleteConversation = async (data) => {
  225. return await request.post({
  226. url: '/app-api/im/conversation/delete',
  227. data
  228. })
  229. }
  230. // 求职端-根据邀请人id获取面试邀约列表
  231. export const getInterviewInviteListByInviteUserId = async (inviteUserId) => {
  232. return await request.get({
  233. url: `/app-api/menduner/system/interview-invite/get/list/by/${inviteUserId}`
  234. })
  235. }
  236. // 获得指定应用的开启的支付渠道编码列表
  237. export const getEnableCodeList = async (params) => {
  238. return await request.get({
  239. url: '/app-api/pay/channel/get-enable-code-list',
  240. params
  241. })
  242. }
  243. // 获取待支付的订单
  244. export const getUnpaidOrder = async (params) => {
  245. return await request.get({
  246. url: '/app-api/menduner/system/recruit/trade/order/get/unpaid',
  247. params
  248. })
  249. }
  250. // 提交支付订单
  251. export const payOrderSubmit = async (data) => {
  252. return await request.post({
  253. // url: '/app-api/menduner/system/recruit/pay/order/submit',
  254. url: '/app-api/pay/order/submit',
  255. data
  256. })
  257. }
  258. // 获得支付订单
  259. export const getOrderPayStatus = async (params) => {
  260. return await request.get({
  261. url: '/app-api/pay/order/get',
  262. params
  263. })
  264. }
  265. // 获取账户余额
  266. export const getAccountBalance = async () => {
  267. return await request.get({
  268. url: '/app-api/pay/wallet/get'
  269. })
  270. }