feat(frontend+wm-revenue): #56 网上营业厅前端(水费/报装/公告/绑定)
- 前端页面: WaterBillView.vue, InstallApplyView.vue, NoticeView.vue, UserBindView.vue - API 模块: wx-hall.ts (水费/报装/公告/绑定全部接口) - 路由: 注册到 frontend/src/router/index.ts (wx-hall/*) - 后端 Controller: WxHallApiController (12 端点, /api/wx-hall/*) - DDL: V6__wx_hall_user_bindng.sql (用户绑定表)
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
import request from './request'
|
||||
|
||||
const BASE = '/wx-hall'
|
||||
|
||||
// ========== 水费查询缴费 ==========
|
||||
|
||||
export function getBillList(params: {
|
||||
customerNo: string
|
||||
billPeriod?: string
|
||||
status?: string
|
||||
pageNum?: number
|
||||
pageSize?: number
|
||||
}) {
|
||||
return request.get(`${BASE}/bill/list`, { params })
|
||||
}
|
||||
|
||||
export function getBillDetail(billId: number) {
|
||||
return request.get(`${BASE}/bill/${billId}`)
|
||||
}
|
||||
|
||||
export function payBill(data: { billId: number; amount: number }) {
|
||||
return request.post(`${BASE}/bill/pay`, data)
|
||||
}
|
||||
|
||||
export function getPaymentRecords(params: { customerNo: string; limit?: number }) {
|
||||
return request.get(`${BASE}/bill/payment-records`, { params })
|
||||
}
|
||||
|
||||
// ========== 报装申请 ==========
|
||||
|
||||
export function submitInstallApply(data: {
|
||||
name: string
|
||||
phone: string
|
||||
area: string
|
||||
address: string
|
||||
customerType?: string
|
||||
caliber?: string
|
||||
}) {
|
||||
return request.post(`${BASE}/install/apply`, data)
|
||||
}
|
||||
|
||||
export function getInstallProgress(applyNo: string) {
|
||||
return request.get(`${BASE}/install/progress`, { params: { applyNo } })
|
||||
}
|
||||
|
||||
export function getInstallList(params: { phone: string; limit?: number }) {
|
||||
return request.get(`${BASE}/install/list`, { params })
|
||||
}
|
||||
|
||||
// ========== 停水公告 ==========
|
||||
|
||||
export function getNoticeList(params: {
|
||||
page?: number
|
||||
size?: number
|
||||
type?: string
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get(`${BASE}/notice/list`, { params })
|
||||
}
|
||||
|
||||
export function getNoticeDetail(id: number) {
|
||||
return request.get(`${BASE}/notice/${id}`)
|
||||
}
|
||||
|
||||
export function getActiveNotices(areaCode?: string) {
|
||||
return request.get(`${BASE}/notice/active`, { params: { areaCode } })
|
||||
}
|
||||
|
||||
// ========== 用户绑定 ==========
|
||||
|
||||
export function bindPhone(data: { openId: string; phone: string }) {
|
||||
return request.post(`${BASE}/user/bindPhone`, data)
|
||||
}
|
||||
|
||||
export function bindCustomer(data: { openId: string; customerNo: string }) {
|
||||
return request.post(`${BASE}/user/bindCustomer`, data)
|
||||
}
|
||||
|
||||
export function unbind(data: { openId: string; bindingId: string }) {
|
||||
return request.post(`${BASE}/user/unbind`, data)
|
||||
}
|
||||
|
||||
export function getBindings(openId: string) {
|
||||
return request.get(`${BASE}/user/bindings`, { params: { openId } })
|
||||
}
|
||||
Reference in New Issue
Block a user