45 lines
1.4 KiB
JavaScript
45 lines
1.4 KiB
JavaScript
import apis from '../utils/request';
|
||
import { replaceSpecialIcon } from '../utils/index'
|
||
const { GET, POST, PUT, DELETE } = apis
|
||
|
||
// 获取园区id模糊搜索商户列表
|
||
export const getTenementList = async function({ park, keyword }) {
|
||
return await GET(`/wx/getTenementList?park=${park}&keyword=${replaceSpecialIcon(keyword)}`);
|
||
}
|
||
|
||
// 获取名下所有的商户
|
||
export const getOwnTenementList = async function() {
|
||
return await GET(`/wx/getOwnTenements`);
|
||
}
|
||
|
||
// 获取商户详情(简易)
|
||
export const getTenementDetail = async function(id) {
|
||
return await GET(`/wx/getTenementDetail/${id}`);
|
||
}
|
||
|
||
// 获取商户是否限电
|
||
export const getTenementExceptionalCase = async function(pid, tid) {
|
||
return await GET(`/wx/exceptionalCase/${pid}/${tid}`);
|
||
}
|
||
|
||
// 获取商户详情(b端)
|
||
export const getTenementInfoDetail = async function(id) {
|
||
return await GET(`/wx/getTenementDetail/${id}`);
|
||
}
|
||
// 创建商户
|
||
export const createTenement = async function(pid, data) {
|
||
return await POST(`/vx/tenement/${pid}`, data)
|
||
}
|
||
// 修改商户
|
||
export const updateTenement = async function(pid, data) {
|
||
return await POST(`/vx/tenement/${pid}`, data)
|
||
}
|
||
// 解绑电表
|
||
export const unbindMeter = async function(pid, tid, code) {
|
||
return await POST(`/tenement/${pid}/${tid}/binding/${code}/unbind`)
|
||
}
|
||
|
||
// 获取b端用户
|
||
export const getTenementUsers = async function(id) {
|
||
return await GET(`/records/getWxUserList`);
|
||
} |