index.ts 760 Bytes
import request from '../request'

/**
 * @description 物业列表
 * @function propertyList
 */
export function propertyList (params) {
  for (const i in params) {
    if (!(params[i] + '').trim()) {
      delete params[i]
    }
  }
  return request({
    method: 'get',
    url: '/property/list',
    params: {
      page: 1,
      pageSize: 10
    }
  })
}

/**
 * @description 新增物业
 * @function propertyAdd
 */
export function propertyAdd (data) {
  return request({
    method: 'post',
    url: '/property/add',
    data: data
  })
}

/**
 * @description 修改物业状态
 * @function propertyStatus
 */
export function propertyStatus (params) {
  return request({
    method: 'post',
    url: '/property/updateStatus',
    params: params
  })
}