import Request from '@/request/request.js';
let request = Request.http;

export default {
    // 最新行情
    getNewMarket(data) {
        return request({
            url: '/house/quotation/last',
            method: 'get',
            data: data,
        })
    },
    // 房源列表（二手房、新房、租房）
    getHouseList(data) {
        return request({
            url: '/house/info/list',
            method: 'get',
            data: data,
        })
    },
    // 房源详情
    getHouseDetail(data) {
        return request({
            url: '/house/info/' + data,
            method: 'get',
        })
    },
    // 评价列表
    getEvaluateList(data) {
        return request({
            url: '/house/evaluate/list',
            method: 'get',
            data: data,
        })
    },
    // 关注
    addAttention(data) {
        return request({
            url: '/house/lookConcern',
            method: 'post',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 取消关注
    deleteAttention(data) {
        return request({
            url: '/house/lookConcern/' + data,
            method: 'delete',
        })
    },
    // 添加评价
    addEvaluate(data) {
        return request({
            url: '/house/evaluate',
            method: 'post',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 信息大厅列表
    getInfoList(data) {
        return request({
            url: '/house/demand/list',
            method: 'get',
            data: data,
        })
    },
    // 发布需求
    addDemand(data) {
        return request({
            url: '/house/demand',
            method: 'post',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 修改需求
    updateDemand(data) {
        return request({
            url: '/house/demand',
            method: 'put',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 删除需求
    deleteDemand(data) {
        return request({
            url: '/house/demand/' + data,
            method: 'delete',
        })
    },
    // 出租-信息费比例
    getRentalFeeRatio(data) {
        return request({
            url: '/house/info/rentalFeeRatio',
            method: 'get',
            data: data,
        })
    },
    // 买卖房-信息费比例
    getSalesFeeRatio(data) {
        return request({
            url: '/house/info/salesFeeRatio',
            method: 'get',
            data: data,
        })
    },
    // 发布记录
    getMyDemand(data) {
        return request({
            url: '/house/demand/myList',
            method: 'get',
            data: data,
        })
    },
    // 需求详情
    getDemandById(data) {
        return request({
            url: '/house/demand/' + data,
            method: 'get',
            data: data,
        })
    },
    // 房源保证金-我的保证金
    getMyEarnestMoney(data) {
        return request({
            url: '/house/bond/info',
            method: 'get',
            data: data,
        })
    },
    // 我的房产
    getMyHouseList(data) {
        return request({
            url: '/house/info/myList',
            method: 'get',
            data: data,
        })
    },
    // 浏览记录和关注列表
    getBrowsingAndAttention(data) {
        return request({
            url: '/house/lookConcern/list',
            method: 'get',
            data: data,
        })
    },
    // 我的评价
    getMyEvaluate(data) {
        return request({
            url: '/house/evaluate/myList',
            method: 'get',
            data: data,
        })
    },
    // 删除评价
    deleteEvaluate(data) {
        return request({
            url: '/house/evaluate/' + data,
            method: 'delete',
        })
    },
    // 我的房源详情
    getMyHouseDetail(data) {
        return request({
            url: '/house/info/myInfo/' + data,
            method: 'get',
        })
    },
    // 房源上下架
    changeShelf(data) {
        return request({
            url: '/house/info/editStatus',
            method: 'put',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 删除房源
    deleteHouse(data) {
        return request({
            url: '/house/info/' + data,
            method: 'delete',
        })
    },
    // 我的预约-看房
    getMySubscribe(data) {
        return request({
            url: '/house/appointments/list',
            method: 'get',
            data: data,
        })
    },
    // 服务预约-看房
    getServiceSubscribe(data) {
        return request({
            url: '/house/appointment/list',
            method: 'get',
            data: data,
        })
    },
    // 看房沟通邀约-添加
    sendHouseMsg(data) {
        return request({
            url: '/house/communicate',
            method: 'post',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 发送预约
    sendHouseInvite(data) {
        return request({
            url: '/house/appointment/invite',
            method: 'post',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 预约状态修改
    changeUserSubscribe(data) {
        return request({
            url: '/house/appointments/changeStatus',
            method: 'put',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 看房状态修改
    changeSeeHouseStatus(data) {
        return request({
            url: '/house/appointment/changeStatus',
            method: 'put',
            data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 信息费列表
    getInfoFeeList(data) {
        return request({
            url: '/user/wallet/income/list',
            method: 'get',
            data: data,
        })
    },
    // 信息费统计
    getInfoFeeData(data) {
        return request({
            url: '/user/wallet/income/count',
            method: 'get',
            data: data,
        })
    },
    //是否开启保证金
    getIsOpenEarnestMoney(data) {
        return request({
            url: '/house/bond/status',
            method: 'get',
            data: data,
        })
    },
    // 保证金金额
    getEarnestMoneyDefault(data) {
        return request({
            url: '/house/bond/price',
            method: 'get',
            data: data,
        })
    },
    // 我的房源评价列表
    getMyHouseEvaluateList(data) {
        return request({
            url: '/house/evaluate/toMyList',
            method: 'get',
            data: data,
        })
    }
}
