智慧水务管理系统 - 精河县供水工程综合管理平台

wx-hall.ts 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import request from './request'
  2. const BASE = '/wx-hall'
  3. // ========== 水费查询缴费 ==========
  4. export function getBillList(params: {
  5. customerNo: string
  6. billPeriod?: string
  7. status?: string
  8. pageNum?: number
  9. pageSize?: number
  10. }) {
  11. return request.get(`${BASE}/bill/list`, { params })
  12. }
  13. export function getBillDetail(billId: number) {
  14. return request.get(`${BASE}/bill/${billId}`)
  15. }
  16. export function payBill(data: { billId: number; amount: number }) {
  17. return request.post(`${BASE}/bill/pay`, data)
  18. }
  19. export function getPaymentRecords(params: { customerNo: string; limit?: number }) {
  20. return request.get(`${BASE}/bill/payment-records`, { params })
  21. }
  22. // ========== 报装申请 ==========
  23. export function submitInstallApply(data: {
  24. name: string
  25. phone: string
  26. area: string
  27. address: string
  28. customerType?: string
  29. caliber?: string
  30. }) {
  31. return request.post(`${BASE}/install/apply`, data)
  32. }
  33. export function getInstallProgress(applyNo: string) {
  34. return request.get(`${BASE}/install/progress`, { params: { applyNo } })
  35. }
  36. export function getInstallList(params: { phone: string; limit?: number }) {
  37. return request.get(`${BASE}/install/list`, { params })
  38. }
  39. // ========== 停水公告 ==========
  40. export function getNoticeList(params: {
  41. page?: number
  42. size?: number
  43. type?: string
  44. keyword?: string
  45. }) {
  46. return request.get(`${BASE}/notice/list`, { params })
  47. }
  48. export function getNoticeDetail(id: number) {
  49. return request.get(`${BASE}/notice/${id}`)
  50. }
  51. export function getActiveNotices(areaCode?: string) {
  52. return request.get(`${BASE}/notice/active`, { params: { areaCode } })
  53. }
  54. // ========== 用户绑定 ==========
  55. export function bindPhone(data: { openId: string; phone: string }) {
  56. return request.post(`${BASE}/user/bindPhone`, data)
  57. }
  58. export function bindCustomer(data: { openId: string; customerNo: string }) {
  59. return request.post(`${BASE}/user/bindCustomer`, data)
  60. }
  61. export function unbind(data: { openId: string; bindingId: string }) {
  62. return request.post(`${BASE}/user/unbind`, data)
  63. }
  64. export function getBindings(openId: string) {
  65. return request.get(`${BASE}/user/bindings`, { params: { openId } })
  66. }