index.ts 1017 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
    }
  })
}

export const property_list = async ( params: any ) => {
  let res: any = await request.get( '/property/list', { params } )
  // let res: any = await request( {url: '/neighborhood/getList', params:{propertyId: 1, type: 1}, method: 'post' })
  return res
}

/**
 * @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
  })
}