index.js 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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 userRegister = async (data) => {
  18. return await request.post({
  19. url: '/app-api/menduner/system/auth/register',
  20. data
  21. })
  22. }
  23. // 验证码登录
  24. export const smsLogin = async (data) => {
  25. return await request.post({
  26. url: '/app-api/menduner/system/auth/sms-login',
  27. data
  28. })
  29. }
  30. // 切换登录
  31. export const switchLoginOfEnterprise = async (data) => {
  32. return await request.post({
  33. tokenIndex: 2, // 使用求职token
  34. url: '/app-api/menduner/system/recruit/enterprise/auth/switch-login',
  35. data
  36. })
  37. }
  38. // 企业-验证码登录
  39. export const smsLoginOfEnterprise = async (data) => {
  40. return await request.post({
  41. url: '/app-api/menduner/system/recruit/enterprise/auth/sms-login',
  42. data
  43. })
  44. }
  45. // 企业-密码登录
  46. export const passwordLoginOfEnterprise = async (data) => {
  47. return await request.post({
  48. url: '/app-api/menduner/system/recruit/enterprise/auth/login',
  49. data
  50. })
  51. }
  52. // 密码登录
  53. export const passwordLogin = async (data) => {
  54. return await request.post({
  55. url: '/app-api/menduner/system/auth/login',
  56. data
  57. })
  58. }
  59. // 根据邮箱获取企业注册申请
  60. export const getEnterpriseRegisterApply = async (email) => {
  61. return await request.get({
  62. url: '/app-api/menduner/system/enterprise-register/by/email?email=' + email,
  63. openEncryption: true
  64. })
  65. }
  66. // 退出登录
  67. export const logout = async () => {
  68. return await request.post({
  69. tokenIndex: 2, // 使用求职token
  70. url: '/app-api/menduner/system/auth/logout'
  71. })
  72. }
  73. // 根据令牌退出登录
  74. export const logoutToken = async (token) => {
  75. return await request.post({
  76. tokenIndex: 1, // 使用招聘token
  77. url: `/app-api/menduner/system/recruit/enterprise/auth/logout-token?token=${token}`
  78. })
  79. }
  80. // 修改密码
  81. export const updatePassword = async (data) => {
  82. return await request.put({
  83. url: '/app-api/menduner/system/mde-user/update-password',
  84. data
  85. })
  86. }
  87. // 重置密码
  88. export const resetPassword = async (data) => {
  89. return await request.put({
  90. url: '/app-api/menduner/system/auth/reset-password',
  91. data
  92. })
  93. }
  94. // 企业重置密码
  95. export const entResetPassword = async (data) => {
  96. return await request.put({
  97. url: '/app-api/menduner/system/recruit/enterprise/auth/reset-password',
  98. data
  99. })
  100. }
  101. // 发送邮箱验证码
  102. export const getEmailCode = async (email) => {
  103. return await request.post({
  104. url: `/app-api/menduner/system/recruit/enterprise/auth/send-email-code?email=${email}`
  105. })
  106. }
  107. // 字典
  108. export const getDictData = async (params) => {
  109. return await request.get({
  110. url: '/app-api/system/dict-data/type',
  111. params
  112. })
  113. }
  114. // 点击访问职位埋点
  115. export const getPositionTreeClick = async (data) => {
  116. return await request.post({
  117. url: '/app-api/menduner/system/position/click',
  118. data
  119. })
  120. }
  121. // 获取职位列表
  122. export const getPositionData = async (params) => {
  123. return request.get({
  124. url: '/app-api/menduner/system/position/list',
  125. params
  126. })
  127. }
  128. // 获取热门职位
  129. export const getHotPositionList = async (params) => {
  130. return await request.get({
  131. url: '/app-api/menduner/system/position/hot',
  132. params
  133. })
  134. }
  135. // 获得职位信息
  136. export const getPositionTreeData = async (params) => {
  137. return await request.get({
  138. url: '/app-api/menduner/system/position/get/tree',
  139. params
  140. })
  141. }
  142. // 获取区域树形
  143. export const getAreaTreeData = async () => {
  144. return await request.get({
  145. url: '/app-api/menduner/system/area/get/tree'
  146. })
  147. }
  148. // 获取行业树形
  149. export const getIndustryTreeData = async (params) => {
  150. return await request.get({
  151. url: '/app-api/menduner/system/industry/get/tree',
  152. params
  153. })
  154. }
  155. // 获取行业列表
  156. export const getIndustryListData = async (params) => {
  157. return await request.get({
  158. url: '/app-api/menduner/system/industry/list',
  159. params
  160. })
  161. }
  162. // 获取地区列表
  163. export const getAreaListData = async (params) => {
  164. return await request.get({
  165. url: '/app-api/menduner/system/area/list',
  166. params
  167. })
  168. }
  169. // 获取-技能列表
  170. export const getSkillList = async () => {
  171. return await request.get({
  172. url: '/app-api/menduner/system/skill/list'
  173. })
  174. }
  175. // 获取地区获取地区map
  176. export const getAreaMapData = async (params) => {
  177. return await request.get({
  178. url: '/app-api/menduner/system/area/map',
  179. params
  180. })
  181. }
  182. // 公司检索-获取热门地区
  183. export const getHotArea = async () => {
  184. return await request.get({
  185. url: '/app-api/menduner/system/area/get/hot'
  186. })
  187. }
  188. // 上传文件
  189. export const uploadFile = async (data) => {
  190. return await request.upload({ url: '/app-api/menduner/system/file/upload', data })
  191. }
  192. // 图片上传
  193. export const uploadImage = async (data) => {
  194. return await request.upload({ url: '/app-api/infra/file/upload', data })
  195. }
  196. // 获取当前登录的企业用户信息
  197. export const getEnterprisingUserInfo = async (params) => {
  198. return await request.get({
  199. url: '/app-api/menduner/system/recruit/user/get',
  200. params
  201. })
  202. }
  203. // 招聘端-刷新令牌token
  204. export const enterpriseRefreshToken = async (refreshToken) => {
  205. return await request.post({
  206. tokenIndex: 1, // 使用招聘token
  207. url: `/app-api/menduner/system/recruit/enterprise/auth/refresh-token?refreshToken=${refreshToken}`
  208. })
  209. }
  210. // 求职端-刷新令牌token
  211. export const userRefreshToken = async (refreshToken) => {
  212. return await request.post({
  213. tokenIndex: 2, // 使用求职token
  214. url: `/app-api/menduner/system/auth/refresh-token?refreshToken=${refreshToken}`
  215. })
  216. }
  217. // 招聘端-企业账户信息(积分&余额)
  218. export const getEnterpriseUserAccount = async () => {
  219. return await request.get({
  220. // url: '/app-api/menduner/system/recruit/user/get/account'
  221. tokenIndex: 1, // 使用招聘token
  222. url: '/app-api/pay/currency/get' // 获取货币账户
  223. })
  224. }
  225. // 求职端-用户账户信息(积分&余额)
  226. export const getUserAccount = async () => {
  227. return await request.get({
  228. url: '/app-api/menduner/system/mde-user/get/account'
  229. })
  230. }
  231. // 获取聊天秘钥信息
  232. export const getChatKey = async (data) => {
  233. return await request.post({
  234. url: '/app-api/im/user/get',
  235. data
  236. })
  237. }
  238. // 同步最近会话
  239. export const getConversationSync = async (data) => {
  240. return await request.post({
  241. url: '/app-api/im/conversation/sync',
  242. data
  243. })
  244. }
  245. // 同步最近会话
  246. export const getMessageSync = async (data) => {
  247. return await request.post({
  248. url: '/app-api/im/im/channel/messagesync',
  249. data
  250. })
  251. }
  252. // 设置最近会话未读数量
  253. export const setUnread = async (data) => {
  254. return await request.post({
  255. url: '/app-api/im/conversations/setUnread',
  256. data
  257. })
  258. }
  259. // 设置最近会话未读数量
  260. export const deleteConversation = async (data) => {
  261. return await request.post({
  262. url: '/app-api/im/conversation/delete',
  263. data
  264. })
  265. }
  266. // 获取type类型聊天记录
  267. export const getMessageType = async (data) => {
  268. return await request.post({
  269. url: '/app-api/im/im/history/messages',
  270. data
  271. })
  272. }
  273. // 聊天记录撤回
  274. export const messageBack = async (data) => {
  275. return await request.post({
  276. url: '/app-api/im/im/messages/back',
  277. data
  278. })
  279. }
  280. // 求职端-根据邀请人id获取面试邀约列表
  281. export const getInterviewInviteListByInviteUserId = async (inviteUserId) => {
  282. return await request.get({
  283. url: `/app-api/menduner/system/interview-invite/get/list/by/${inviteUserId}`
  284. })
  285. }
  286. // 获得指定应用的开启的支付渠道编码列表
  287. export const getEnableCodeList = async (params) => {
  288. return await request.get({
  289. url: '/app-api/pay/channel/get-enable-code-list',
  290. params
  291. })
  292. }
  293. // 获取待支付的订单
  294. export const getUnpaidOrder = async (params) => {
  295. return await request.get({
  296. url: '/app-api/menduner/system/recruit/trade/order/get/unpaid',
  297. params
  298. })
  299. }
  300. // 提交支付订单
  301. export const payOrderSubmit = async (data) => {
  302. return await request.post({
  303. // url: '/app-api/menduner/system/recruit/pay/order/submit',
  304. url: '/app-api/pay/order/submit',
  305. data
  306. })
  307. }
  308. // 获得支付订单
  309. export const getOrderPayStatus = async (params) => {
  310. return await request.get({
  311. url: '/app-api/pay/order/get',
  312. params
  313. })
  314. }
  315. // 获取账户余额
  316. export const getAccountBalance = async () => {
  317. return await request.get({
  318. url: '/app-api/pay/wallet/get'
  319. })
  320. }
  321. // 企业营业执照图片识别文字
  322. export const getBusinessLicenseOCR = async (url) => {
  323. return await request.post({
  324. url: '/app-api/menduner/system/recruit/enterprise/business/ocr?url=' + url
  325. })
  326. }
  327. // 社交授权的跳转
  328. export const socialAuthRedirect = async (params) => {
  329. return await request.get({
  330. url: '/app-api/menduner/system/auth/social-auth-redirect',
  331. params
  332. })
  333. }
  334. // 求职端交易订单 创建
  335. export const orderCreated = async (data) => {
  336. return await request.post({
  337. url: '/app-api/menduner/system/trade/order/create',
  338. openEncryption: true,
  339. data
  340. })
  341. }
  342. // 求职端交易订单 创建
  343. export const getOrder = async (params) => {
  344. return await request.get({
  345. url: '/app-api/menduner/system/trade/order/get/unpaid',
  346. params
  347. })
  348. }