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

export default {
    /**
     * 家政服务产品-列表
     * @param {*} data 
     * @returns 
     */
    hmGoodsList(data) {
        return request({
            url: '/homemaking/hmGoods/list',
            method: 'get',
            data: data,
        })
    },

    /**
     * 发送消息
     * @param {} data 
     * @returns 
     */
    sendMessage(data) {
        return request({
            url: '/homemaking/communicate',
            method: 'post',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },





    /**
     * 家政服务分类-列表
     * @param {*} data 
     * @returns 
     */
    listTree(data) {
        return request({
            url: '/homemaking/category/listTree',
            method: 'get',
            data: data,

        })
    },

    /**
     * 查询省份列表
     * @param {*} data 
     * @returns 
     */
    provinceList(data) {
        return request({
            url: '/user/common/provinceList',
            method: 'get',
            data: data,
        })
    },


    /**
     * 查询城市列表
     * @param {*} data 
     * @returns 
     */
    cityList(data) {
        return request({
            url: '/user/common/cityList',
            method: 'get',
            data: data,
        })
    },

    /**
     * 家政服务产品-添加
     * @param {*} data 
     * @returns 
     */
    hmGoods(data) {
        return request({
            url: '/homemaking/hmGoods',
            method: 'post',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },

    /**
     * 家政服务产品-信息费比例
     * @param {*} data 
     * @returns 
     */

    feeRatio(data) {
        return request({
            url: '/homemaking/hmGoods/feeRatio',
            method: 'get',
            data: data,
        })
    },

    /**
     * 家政服务产品-修改
     * @param {*} data 
     * @returns 
     */
    hmGoodsEdit(data) {
        return request({
            url: '/homemaking/hmGoods',
            method: 'put',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },


    /**
     * 家政服务产品-删除
     * @param {*} id 
     * @returns 
     */
    hmGoodsRemove(id) {
        return request({
            url: '/homemaking/hmGoods/' + id,
            method: 'delete',
        })
    },

    /**
     * 家政服务产品-详情
     * @param {*} data 
     * @returns 
     */
    hmGoodsDetail(id) {
        return request({
            url: '/homemaking/hmGoods/' + id,
            method: 'get',
        })
    },
    /**
     * 家政服务产品-上下架
     * @param {*} data 
     * @returns 
     */
    editStatus(data) {
        return request({
            url: '/homemaking/hmGoods/editStatus',
            method: 'put',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }

        })
    },
    /**
     * 由编码查询字典数据
     * @param {*} code 
     * @returns 
     */
    dictItemCode(code) {
        return request({
            url: '/user/common/dictItem/' + code,
            method: 'get',
        })
    },

    /**
     * 家政服务订单-列表
     * @param {*} data 
     * @returns 
     */
    hmOrderList(data) {
        return request({
            url: '/homemaking/hmOrder/list',
            method: 'get',
            data: data,
        })
    },
    /**
 * 家政服务订单-详情
 * @param {*} data 
 * @returns 
 */
    hmOrderDetail(id) {
        return request({
            url: '/homemaking/hmOrder/' + id,
            method: 'get',
        })
    },
    /**
 * 家政服务订单-完成
 * @param {} data 
 * @returns 
 */
    hmOrderComplete(data) {
        return request({
            url: '/homemaking/hmOrder/complete',
            method: 'post',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }

        })
    },



    // 家政服务分类-列表
    categoryList(data) {
        return request({
            url: '/homemaking/category/list',
            method: 'get',
            data: data,
        })
    },


    //家政服务评价-用户评价（商家端）
    evaluatetoMyList(data) {
        return request({
            url: '/homemaking/evaluate/toMyList',
            method: 'get',
            data: data,

        })
    },

    // 家政服务评价-回复
    evaluatePut(data) {
        return request({
            url: '/homemaking/evaluate',
            method: 'put',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    //出租房屋-信息费比例
    rentalFeeRatio(data) {
        return request({
            url: '/house/info/rentalFeeRatio',
            method: 'get',
            data: data,

        })
    },
    //售卖房屋-信息费比例
    salesFeeRatio(data) {
        return request({
            url: '/house/info/salesFeeRatio',
            method: 'get',
            data: data,

        })
    },


    //发布者预约看房-列表
    appointmentList(data) {
        return request({
            url: '/house/appointment/list',
            method: 'get',
            data: data,

        })
    },
    //房源信息-删除
    houseInfoRemove(data) {
        return request({
            url: '/house/info/' + data,
            method: 'delete',

        })
    },
    /**
 * 根据登录用户查商家店铺
 * @param {*} data 
 * @returns 
 */
    getInfoUserShop(data) {
        return request({
            url: '/user/shop/getInfoByUserId',
            method: 'get',
            data: data,
        })
    },
    /**
 * 商家店铺-切换营业状态
 * @param {*} data 
 * @returns 
 */
    shopEditStatus(data) {
        return request({
            url: '/user/shop/editStatus',
            method: 'put',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    /**
 * 根据登录用户查商家店铺
 * @param {*} data 
 * @returns 
 */
    getInfoUserShop(data) {
        return request({
            url: '/user/shop/getInfoByUserId',
            method: 'get',
            data: data,
        })
    },
    /**
 * 根据登录用户查代理商入驻
 * @param {*} data 
 * @returns 
 */
    getAgentInfoByUserId(data) {
        return request({
            url: '/user/agent/getInfoByUserId',
            method: 'get',
            data: data,
        })
    },
    /**
     * 数据统计
     * @param {} data 
     * @returns 
     */
    brokerCount(data) {
        return request({
            url: '/house/broker/count',
            method: 'get',
            data: data,
        })
    },

    /**
     * 房源经纪人-我的详情
     * @param {*} data 
     * @returns 
     */
    brokerInfo(data) {
        return request({
            url: '/house/broker/info',
            method: 'get',
            data: data,
        })
    },
    /**
     * 经济人列表
     * @param {} data
     * @returns
     */
    brokerList(data) {
        return request({
            url: '/house/broker/list',
            method: 'get',
            data: data,
        })
    },
    /**
     * 经纪人详情
     * @param {} data 
     * @returns 
     */
    brokerDetail(id) {
        return request({
            url: '/house/broker/' + id,
            method: 'get',
        })
    },
    /**
     * 删除经纪人
     * @param {} data 
     * @returns 
     */
    brokerRemove(id) {
        return request({
            url: '/house/broker/' + id,
            method: 'delete',
        })
    },
    /**
     * 添加经纪人
     * @param {} data
     * @returns
     */
    brokerAdd(data) {
        return request({
            url: '/house/broker',
            method: 'post',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },
    /**
 * 商家店铺-详情
 * @param {*} id 
 * @returns 
 */
    getshopDetail(id) {
        return request({
            url: '/user/shop/' + id,
            method: 'get',
        })
    },
    /**
 * 商家店铺-修改
 * @param {*} data 
 * @returns 
 */
    userShopUpdate(data) {
        return request({
            url: '/user/shop',
            method: 'put',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    },

    /**
     * 房源列表
     * @param {*} data 
     * @returns 
     */
    demandList(data) {
        return request({
            url: '/house/demand/list',
            method: 'get',
            data: data,
            header: {
                'Content-Type': 'application/json'
            }
        })
    }
}
