index.ts
792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import request from '../request'
import {formDataWrapper} from '@/utils/tool'
/**
* @description 物业列表
* @function propertyList
*/
export const propertyList = async ( params: any ) => {
for (const i in params) {
if (!(params[i] + '').trim()) {
delete params[i]
}
}
let res: any = await request.get( '/property/list', { params } )
return res
}
/**
* @description 新增物业
* @function propertyAdd
*/
export function propertyAdd (data) {
return request({
method: 'post',
url: '/property/add',
data: data
})
}
/**
* @description 修改物业状态
* @function propertyStatus
*/
export const propertyStatus = async ( data: any ) => {
let res: any = await request.post( '/property/updateStatus', formDataWrapper(data) )
return res
}