resident.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import request from './request.js';
  2. // 查询地址下拉树结构 -- 到小区
  3. const addrTreeSelect = async (data) => {
  4. const res = await request.get({ url: `/wx/addr/tree`, data });
  5. return res.data;
  6. }
  7. // 楼栋查询
  8. const buildingList = async (data) => {
  9. const res = await request.get({ url: `/wx/addr/buildings`, data });
  10. return res.data;
  11. }
  12. // 住宅查询
  13. const houseList = async (data) => {
  14. const res = await request.get({ url: `/wx/addr/houses`, data });
  15. return res.data;
  16. }
  17. // 居民信息登记、修改
  18. const registerUser = async (data) => {
  19. const res = await request.post({ url: `/resident/register`, data });
  20. return res.data;
  21. }
  22. // 获取居民信息
  23. const getUser = async () => {
  24. const res = await request.get({ url: `/resident/list` });
  25. return res.data;
  26. }
  27. // 删除居民信息
  28. const delUser = async () => {
  29. const res = await request.del({ url: `/resident/del` });
  30. return res.data;
  31. }
  32. // 获取居民信息申请记录
  33. const getApplyUser = async () => {
  34. const res = await request.get({ url: `/resident/req/list` });
  35. return res.data;
  36. }
  37. export default { addrTreeSelect, buildingList, houseList, registerUser, getUser, delUser, getApplyUser };