const requestFn = require("../requestFn/requestFn") const API = { login: "/user/login", pay_test: "/charge/pay_test", house: "/user/house", car: "/user/vehicle", userinfo: "/user/info", provice_city_area: "/area/province_city_area", street_committee: "/area/street_committee", gardenList: "/garden/list", gardenBuilding: "/garden/building", gardenUnit: "/garden/unit", gardenHouse: "/garden/house", opload: "/upload", householdApply: "/household/apply", householdHouse: "/household/house", userNickName: "/user/nick_name", userRealName: "/user/real_name_auth", unpay_list: "/charge/unpay_list", payed_bill: "/charge/payed_bill_list", order_list: "/charge/order/list", pay: "/charge/pay", bill_List: "/charge/bill_list", order_cancle: "/charge/order/cancel", order_info: "/charge/order/info", payed_list: "/charge/payed_bill_list", announcement: "/service/announcement", event: "/service/event", event_sign: "/service/event/sign", vote: "/service/vote", vote_anawer: "/service/vote/answer", gate: "/gate", gate_qcode: "/gate/qcode", qcode_visitor: "/gate/qcode_visitor", phone: "/service_phone", phone_class: "/service_phone/class", repair_class: "/repair/class", repair_order: "/repair/order", repair_order_info: "/repair/order/info", return_visit: "/repair/order/return_visit", article: "/service/neighbor/article", like: "/service/neighbor/like", neighbor_class: "/service/neighbor/class", comment: '/service/neighbor/comment', suggestion: "/suggestion/order", suggestion_info: "/suggestion/order/info", suggestion_return_visit: "/suggestion/order/return_visit", rent_house: "/rent/house", house_manager: "/rent/house/manager", garden_info: "/garden/info", appointment: "/rent/house/appointment", buildingmanager: "/garden/buildings/manager", addread_count: "/service/announcement/read_count", property: "/charge/months/property", vehicle: "/charge/months/vehicle", pre_pay_info: "/charge/pre_pay_info", pre_pay: "/charge/pre_pay", visitor: "/gate/visitor", housedown: "/rent/house/down", space: "/user/space", visitorShare: "/gate/visitor/share", getcity_code: "/area/city", has_face_device: "/gate/has_face_device", face: "/gate/face", openim: "/user/openim_token", openimusers: "/user/openim_users_info" } const HTTP = { Login(data) { return requestFn.Request({ url: API.login, data, method: "POST" }) }, //批量获取openim用户信息 OpenimUsers(data) { return requestFn.Request({ url: API.openimusers, data, method: "get" }) }, //获取openim token OpenimLogin(data) { return requestFn.Request({ url: API.openim, data, method: "get" }) }, //是否有人脸设备 Has_Face(data) { return requestFn.Request({ url: API.has_face_device, data }) }, //人脸信息 Face(data) { return requestFn.Request({ url: API.face, method: data.method || "", data }) }, //用城市换取城市code GetCityCode(data) { return requestFn.Request({ url: API.getcity_code, data }) }, //访客获取到的分享页面 VisitorShare(data) { return requestFn.Request({ url: API.visitorShare, data }) }, //用户房屋下的车位 GetMySpace(data) { return requestFn.Request({ url: API.space, method: 'get', data }) }, //房屋下架 HouseDown(data) { return requestFn.Request({ url: API.housedown, method: 'put', data }) }, //测试接口 Pay_test(data) { return requestFn.Request({ url: API.pay_test, method: "put", data }) }, //获取用户房屋信息 GetuserHouse() { return requestFn.Request({ url: API.house }) }, //用户小区下的车辆 GetuserCar(data) { return requestFn.Request({ url: API.car, data }) }, //获取省市区列表 GetProvince() { return requestFn.Request({ url: API.provice_city_area }) }, //获取街道社区列表 GetStreetCommittee(data) { return requestFn.Request({ url: API.street_committee, data }) }, //获取小区列表 GetGardenList(data) { return requestFn.Request({ url: API.gardenList, data }) }, //获取楼栋列表 GetGardenBuilding(data) { return requestFn.Request({ url: API.gardenBuilding, data }) }, //获取单元列表 GetGardenUnit(data) { return requestFn.Request({ url: API.gardenUnit, data }) }, //获取房屋列表 GetGardenHouse(data) { return requestFn.Request({ url: API.gardenHouse, data }) }, //房屋认证申请 HouseholdApply(data) { return requestFn.Request({ url: API.householdApply, method: "post", data }) }, //房屋列表 HouseholdHouse(data) { return requestFn.Request({ url: API.householdHouse, data, method: data.method || '' }) }, //解绑房屋 DeleteHousehold(data) { return requestFn.Request({ url: API.householdHouse + `?house_id=${data.house_id}&garden_id=${data.garden_id}`, data: {}, method: 'delete', }) }, //修改昵称 UsernickName(data) { return requestFn.Request({ url: API.userNickName, data, method: 'put' }) }, //实名认证 UserRealName(data) { return requestFn.Request({ url: API.userRealName, data, method: "put" }) }, //获取代缴费的费项列表 GetUnpay_list(data) { return requestFn.Request({ url: API.unpay_list, data }) }, //获取已缴费的账单列表 GetPayed_list(data) { return requestFn.Request({ urL: API.payed_bill, data }) }, //获取未支付订单列表 GetOrder_list(data) { return requestFn.Request({ url: API.order_list, data }) }, //欠费线上缴费 Pay(data) { return requestFn.Request({ url: API.pay, data, method: "put" }) }, //获取代缴费某个费项的账单列表 GetBill_List(data) { return requestFn.Request({ url: API.bill_List, data }) }, //取消支付 CancleOrder(data) { return requestFn.Request({ url: API.order_cancle, data, method: "put" }) }, //未支付订单的订单详情 GetOrderInfo(data) { return requestFn.Request({ url: API.order_info, data, }) }, //获取已缴费的账单列表 GetPayed_list(data) { return requestFn.Request({ url: API.payed_list, data }) }, //获取公告列表 GetAnnouncement(data) { return requestFn.Request({ url: API.announcement, data }) }, //获取社区活动列表 GetEvent(data) { return requestFn.Request({ url: API.event, data }) }, //社区活动报名 EventSign(data) { return requestFn.Request({ url: API.event_sign, method: "post", data }) }, //获取投票列表 GetVote(data) { return requestFn.Request({ url: API.vote, data }) }, //提交投票回答 VoteAnswer(data) { return requestFn.Request({ url: API.vote_anawer, data, method: 'post' }) }, //门禁列表 GetGate(data) { return requestFn.Request({ url: API.gate, data }) }, //门禁二维码 GetQcode(data) { return requestFn.Request({ url: API.gate_qcode, data }) }, //门禁访客邀约二维码 GetQcode_Visitor(data) { return requestFn.Request({ url: API.qcode_visitor, data }) }, //分类列表 GetPhone_class(data) { return requestFn.Request({ url: API.phone_class, data }) }, //电话列表 GetPhone(data) { return requestFn.Request({ url: API.phone, data }) }, //报事报修分类列表 GetRepair_class(data) { return requestFn.Request({ url: API.repair_class, data, }) }, //工单列表操作 Repair_order(data) { return requestFn.Request({ url: API.repair_order, data, method: data.method || '' }) }, //工单详情 Order_info(data) { return requestFn.Request({ url: API.repair_order_info, data }) }, //报事报修回访 Repair_return_visit(data) { return requestFn.Request({ url: API.return_visit, data, method: "put" }) }, //文章列表操作 NeighborArticle(data) { return requestFn.Request({ url: API.article, data, method: data.method || '' }) }, //删除文章 DeleteArticle(data) { return requestFn.Request({ url: API.article + `?id=${data.id}&garden_id=${data.garden_id}`, data: {}, method: 'delete', }) }, //评论操作 NeighborComment(data) { return requestFn.Request({ url: API.comment, data, method: data.method || '' }) }, //删除评论 DeleteComment(data) { return requestFn.Request({ url: API.comment + `?id=${data.id}&garden_id=${data.garden_id}`, data: {}, method: 'delete', }) }, //点赞或取消点赞 Like(data) { return requestFn.Request({ url: API.like, data, method: "put" }) }, //社区邻里分类列表 Neighbor_class(data) { return requestFn.Request({ url: API.neighbor_class, data }) }, //投诉建议操作 Suggestion(data) { return requestFn.Request({ url: API.suggestion, data, method: data.method || '' }) }, //投诉建议详情 Suggestion_info(data) { return requestFn.Request({ url: API.suggestion_info, data }) }, //投诉建议回访 Suggestion_return_visit(data) { return requestFn.Request({ url: API.suggestion_return_visit, data, method: 'put' }) }, //房屋租赁操作 RentHouse(data) { return requestFn.Request({ url: API.rent_house, data, method: data.method || '' }) }, //房屋的经纪人列表 HouseManager(data) { return requestFn.Request({ url: API.house_manager, data }) }, //小区详情 GardenInfo(data) { return requestFn.Request({ url: API.garden_info, data }) }, //租房预约看房 Appointment(data) { return requestFn.Request({ url: API.appointment, data, method: data.method || 'get', }) }, DeleteAppointment(data) { return requestFn.Request({ url: API.appointment + `?id=${data.id}`, method: "delete" }) }, //获取用户信息 GetUserInfo() { return requestFn.Request({ url: API.userinfo, method: "get" }) }, //楼栋管家列表 GetBuildManger(data) { return requestFn.Request({ url: API.buildingmanager, method: "get", data }) }, //公告增加阅读次数 AddRead_count(data) { return requestFn.Request({ url: API.addread_count, method: "put", data }) }, //预缴物业费前获取月数和赠送信息 GetMonthsProperty(data) { return requestFn.Request({ url: API.property, data }) }, //预缴月租停车费前获取月数和赠送信息 GetMonthsVehicle(data) { return requestFn.Request({ url: API.vehicle, data }) }, //预缴物业费或车位费前获取对应的金额信息 Getpre_pay_info(data) { return requestFn.Request({ url: API.pre_pay_info, method: 'get', data }) }, //线上预缴物业费 Pre_pay(data) { return requestFn.Request({ url: API.pre_pay, method: "put", data }) }, //我的邀约 MyVisitor(data) { return requestFn.Request({ method: 'get', url: API.visitor, data }) }, //删除访客记录 DeleteVisitor(data) { return requestFn.Request({ url: API.visitor + `?id=${data.id}`, method: "delete" }) } } module.exports = HTTP