common.js 999 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import {get,post} from '@/api/index'
  2. export default{
  3. // 上传图片
  4. uploadImg:params=>{
  5. const formData=new FormData()
  6. formData.append('file',params.file)
  7. return post('/resource/image/upload',formData)
  8. },
  9. //登录(根据code)
  10. loginWithCode:params=>{
  11. return post('/login/auth_code_login',params)
  12. },
  13. //机构用户
  14. companyUserList:()=>{
  15. return get('/admin/business/admin',{})
  16. },
  17. // 系统菜单
  18. menuList:()=>{
  19. return get('/system/menu/list',{})
  20. },
  21. // 手机号区号
  22. mobileAreaCode:()=>{
  23. return get('/eta_business/area_code/list',{})
  24. },
  25. /**
  26. * 获取系统角色
  27. * @param RoleLevel 部门管理菜单->添加用户->查询所有角色列表时,需传入RoleLevel:0
  28. */
  29. getRoleList:params=>{
  30. return get('/system/role/all',params)
  31. },
  32. // 获取角色对应的菜单数据
  33. getRoleMenuList:params=>{
  34. return get('/system/role/menu/list',params)
  35. },
  36. // 设置角色菜单权限
  37. setRoleMenuData:params=>{
  38. return post('/system/role/menu/add',params)
  39. }
  40. }