home.js 917 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { Base } from "../../static/util/base.js";
  2. class home extends Base {
  3. constructor() {
  4. super();
  5. }
  6. //获取最近的地块list
  7. location(data, callBack) {
  8. const params = {
  9. url: '/admin/employee/location',
  10. type: 'GET',
  11. data:data,
  12. sCallBack: function (res) {
  13. callBack && callBack(res)
  14. }
  15. }
  16. this.request(params);
  17. }
  18. //上传图片
  19. ChooseImage(filePath, callBack) {
  20. const params = {
  21. url: '/admin/employee/geturl',
  22. type: 'POST',
  23. name: 'photo',
  24. filePath: filePath,
  25. sCallBack: function (res) {
  26. callBack && callBack(res)
  27. }
  28. }
  29. this.uploadFile(params);
  30. }
  31. getLandImg(data, callBack) {
  32. const params = {
  33. url: '/admin/employee/getLandImg',
  34. type:'POST',
  35. data:data,
  36. sCallBack: function (res) {
  37. callBack && callBack(res)
  38. }
  39. }
  40. this.request(params);
  41. }
  42. }
  43. const _home = new home();
  44. export { _home };