api.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import { http } from '@/common/service/service.js'
  2. import configService from '@/common/service/config.service.js';
  3. const apiService = {
  4. /**
  5. * 登录
  6. */
  7. login(params) {
  8. return http.post('/ibps/oauth2/v3/user/login/apply',params)
  9. },
  10. context(url, params) {
  11. return http.post(url,params)
  12. },
  13. sign(params){
  14. return http.post('/ibps/business/v3/mobile/sys/sign',params)
  15. },
  16. /**
  17. * 手机号码登录
  18. */
  19. phoneNoLogin(params) {
  20. return http.post('/ibps/business/v3/mobile/sys/phoneLogin',params);
  21. },
  22. /**
  23. * 退出
  24. */
  25. logout(url, params) {
  26. return http.post(url,params);
  27. },
  28. authorize(params) {
  29. return http.post('/ibps/oauth2/v3/authorize/apply',params);
  30. },
  31. authentication(params) {
  32. return http.post('/ibps/oauth2/v3/authentication/apply',params);
  33. },
  34. /**
  35. * 获取文件访问路径
  36. * @param avatar
  37. * @param subStr
  38. * @returns {*}
  39. */
  40. getFileAccessHttpUrl(avatar,subStr){
  41. if(!subStr) subStr = 'http'
  42. if(avatar && avatar.startsWith(subStr)){
  43. return avatar;
  44. }else{
  45. return configService.staticDomainURL + "/" + avatar;
  46. }
  47. }
  48. };
  49. export default apiService;