import fetch from './base/fetch'
import fetch2 from './base/fetch2'

/**
 * @description 统计模块点击量
 * @param projectType
 * @param moduleName
 * @param requestUrl
 * @author zjx
 */
export const saveWxDataStatistical = (data) => fetch('/rest/wxDataStatisticalInfo/saveWxDataStatistical', '/crm400', data, 'JSON', 'POST');

/**
 * @description 上传日志
 * @author zjx
 */
export const uploadLog = (data) => fetch('/rest/logServiceInfo/uploadLog', '/crm400', data, 'JSON', 'POST');

/**
 * @description 微信授权
 * @param code
 * @param projectType
 * @author zjx
 */
export const getWxLoginOpenId = (data) => fetch('/rest/userInfo/getWxLoginOpenId', '/crm400', data, 'JSON', 'POST');

/**
 * @description 服务页面的幻灯片
 * @param projectType
 * @author zjx
 */
export const findByAreaId = (projectType) => fetch('/rest/advertiseCircleInfo/findByAreaId', '/crm400', {projectType}, 'JSON');

/**
 * @description 首页的幻灯片
 * @param projectType
 * @author zjx
 */
export const getSlideShowByArea = (projectType) => fetch('/rest/slideShowInfo/getSlideShowByArea', '/crm400', {projectType}, 'JSON');

/**
 * @description 首页消息列表
 * @param projectType
 * @param wxUserId
 * @author zjx
 */
export const getInteractiveInfo = (data) => fetch('/rest/interactiveBar/getInteractiveInfo', '/crm400', data, 'JSON');

/**
 * @description 获取微信/业主信息
 * @param wxUserId
 * @author jgj
 */
export const getWxInfo = (data) => fetch('/rest/userInfo/getWxInfo', '/crm400', data, 'JSON', 'POST');

/**
 * @description 判断登录用户是否为认证业主，用户，租户
 * @param ownerId
 * @author zjx
 */
export const judgeAuthByOwnerId = (ownerId) => fetch('/rest/activityInfo/judgeAuthByOwnerId', '/crm400', {ownerId}, 'JSON');

/**
 * @description 检查用户积分的真实性
 * @param userWxId
 * @param projectType
 * @author jgj
 */
export const checkAccumulatedPoints = (userWxId, projectType) => fetch('/rest/accumulatedPointsInfo/checkAccumulatedPoints', '/crm400', {userWxId, projectType}, 'JSON', 'GET');

/**
 * @description 验证当前用户认证类型
 * @param wxUserId
 * @author jgj
 */
export const getOwnerAuthType = (data) => fetch('/rest/ownerAuthInfo/getOwnerAuthTypeNew', '/crm400', data, 'JSON', 'GET');

/**
 * @description 获取当前用户认证信息
 * @param wxUserId
 * @author jgj
 */
export const getOwnerAuthInfo = (wxUserId) => fetch('/rest/ownerAuthInfo/getOwnerAuthInfo', '/crm400', {wxUserId}, 'JSON', 'GET');

/**
 * @description 获取当前用户认证证件号
 * @param wxUserId
 * @author jgj
 */
export const getAuthCardId = (wxUserId) => fetch('/rest/ownerAuthInfo/getAuthCardId', '/crm400', {wxUserId}, 'JSON', 'GET');

/**
 * @description 认证补全
 * @param wxUserId,ownerName,cardNo,cardType
 * @author jgj
 */
export const getOwnerCredentialComplement = (data) => fetch('/rest/ownerAuthInfo/getOwnerCredentialComplement', '/crm400', data, 'JSON', 'GET');
/**
 * @description 获取短信验证码
 * @param mobile,countryCode,name,openId,cardNo,projectType
 * @author jgj
 */
export const getSmsCode = (data) => fetch('/rest/ownerAuthInfo/getSmsCode', '/crm400', data, 'JSON', 'GET');
/**
 * @description 保存预认证信息
 * @param countryCode,ownerName,ownerCardType,ownerIDCard,ownerPhone,projectType,wxUserId
 * @author jgj
 */
export const savePreOwnerAuthInfo = (data) => fetch('/rest/preOwnerAuthInfo/save', '/crm400', data, 'JSON', 'POST');

/**
 * @description 获取认证地址
 * @param userId
 * @param authType
 * @author zjx
 */
export const getBuildLocation = (data) => fetch('/rest/checkAppoint/getBuildLocation', '/crm400', data, 'JSON');

/**
 * @description 获取工程进度列表
 * @param accountType
 * @author zjx
 */
export const processInfoJson = (data) => fetch('/rest/activityInfo/processInfoJson', '/crm400', data, 'JSON');

/**
 * @description 获取工程进度列表-按月
 * @param areaName, areaid, month
 * @author zjx
 */
export const ProjectProcessInfoJson = (data) => fetch('/rest/activityInfo/ProjectProcessInfoJson', '/crm400', data, 'JSON');


/**
 * @description 获取家的旅行推荐
 * @area,image,orientation,city,price,id,starLevel,title
 * @author lyy
 */
export const getFamilyTrip = (data) => fetch('/rest/familyTripInfo/getFamilyTripToJson', '/crm400', data, 'JSON');

/**
 * @description 获取家的旅行筛选
 * @param 无
 * @author lyy
 */
export const getScreeningCondition = () => fetch('/rest/familyTripInfo/getScreeningCondition', '/crm400', {}, 'XML');

/**
 * @description 获取家的旅行详情页
 * @param 无
 * @author spy
 */
export const getFamilyTripDetail = (id) => fetch('/rest/familyTripInfo/getFamilyTripDetail', '/crm400', {id}, 'XML', 'POST');

/**
 * @description 获取我的家人信息
 * @param ownerId
 * @param infoId
 * @param userId
 * @author jgj
 */
export const getMyFamily = (ownerId, infoId, userId) => fetch('/rest/ownerAuthInfo/getMyFamilyNews', '/crm400', {ownerId, infoId, userId}, 'JSON', 'GET');

/**
 * @description 提交我的家人信息
 * @author jgj
 */
export const getInvateFamily = (data) => fetch('/rest/ownerAuthInfo/getInvateFamily', '/crm400', data, 'JSON', 'GET');

/**
 * @description 获取个人微信二维码
 * @method GET
 * @param openId
 * @author zjx
 */
export const getWXOwnerCode = (openId) => fetch('/rest/ownerAuthInfo/getWXOwnerCode', '/crm400', {openId}, 'JSON');
/**
 * @description 获取我的活动
 * @author jgj
 */
export const getActivityOrderList = (data) => fetch('/rest/activityInfo/getActivityOrderList', '/crm400', data, 'JSON');

/**
 * @description 验证并绑定业主和会员信息
 * @method GET
 * @param name, mobile, cardNo, code, cardType, needCode, openId, ownerId, userId
 * @author zjx
 */
export const getOwnerBuildingsNew = (data) => fetch('/rest/ownerAuthInfo/getOwnerBuildingsNew', '/crm400', data, 'JSON');
/**
 * @description 获取活动列表
 * @method GET
 * @param userId, projectType, perSize, pageNum, status, toTop
 * @author jgj
 */
export const getActivityList = (data) => fetch('/rest/activityInfo/getActivityList', '/crm400', data, 'JSON');
/**
 * @description 获取直播活动列表
 * @method GET
 * @param state, isSuggest, projectType, startIndex, pageSize
 * @author jgj
 */
export const liveInfoJson = (data) => fetch('/rest/activityInfo/liveInfoJson', '/crm400', data, 'JSON');
/**
 * @description 获取活动详情2
 * @method GET
 * @param userId, aid
 * @author jgj
 */
export const getActivityDetail = (userId, aid) => fetch('/rest/activityInfo/getActivityDetail', '/crm400', {userId, aid}, 'JSON');
/**
 * @description 活动报名
 * @method POST
 * @param content, aid,count,linkMan,linkPhone,userId,total,projectId
 * @author jgj
 */
export const saveActivityOrder = (data) => fetch('/rest/activityInfo/saveActivityOrder', '/crm400', data, 'JSON', 'POST');
/**
 * @description 活动订单详情
 * @method GET
 * @param orderId, userId
 * @author jgj
 */
export const getOrderDetail = (userId, orderId) => fetch('/rest/activityInfo/getOrderDetail', '/crm400', {userId, orderId}, 'JSON');
/**
 * @description 完善报名信息
 * @method POST
 * @param content, orderId
 * @author jgj
 */
export const saveSignUps = (data) => fetch('/rest/activityInfo/saveSignUps', '/crm400', data, 'JSON', 'POST');
/**
 * @description 生活研究所
 * @method GET
 * @param projectType,dynamicType
 * @author jgj
 */
export const getArticleDynamics = (projectType,dynamicType) => fetch('/rest/articleDynamicsInfo/getArticleDynamics', '/crm400', {projectType,dynamicType}, 'JSON', 'POST');
/**
 * @description 获取投诉保修反馈列表
 * @method GET
 * @param typeReport, userId, userWxId, orderType, pageNum, perSize
 * @author jgj
 */
export const feedBackOrderLists = (data) => fetch('/rest/crmFeedBackInfo/feedBackOrderListsToJson', '/crm400', data, 'JSON');

/**
 * @description 产品圈列表
 * @method GET
 * @param projectType
 * @author zjx
 */
export const findRecommendByAreaId = (projectType) => fetch('/rest/recommendInfo/findByAreaId', '/crm400', {projectType}, 'JSON');

/**
 * @description 获取视频文件
 * @method GET
 * @param title 如：设计师见面会
 * @author zjx
 */
export const getProgramaByName = (data) => fetch('/rest/activityInfo/getProgramaByName', '/crm400', data, 'JSON');

/**
 * @description 精彩回顾-活动列表
 * @method GET
 * @param projectType
 * @param userId 用户ID
 * @param status 状态
 * @param pageNum 第几页
 * @param perSize 每页数量
 * @param programaName 模块名称  如：设计师见面会
 * @author zjx
 */
export const getActivityOverSeeByOverSee = (data) => fetch('/rest/activityInfo/getActivityOverSeeByOverSee', '/crm400', data, 'JSON');
/**
 * @description 获取投诉保修反馈详情
 * @method GET
 * @param orderId
 * @author jgj
 */
export const feedBackOrderDetail = (orderId) => fetch('/rest/crmFeedBackInfo/feedBackOrderDetailToJson', '/crm400',  {orderId}, 'JSON');
/**
 * @description 获取投诉保修反馈进度
 * @method GET
 * @param orderId
 * @author jgj
 */
export const feedBackTrackNew = (orderId) => fetch('/rest/crmFeedBackInfo/feedBackTrackNew', '/crm400',  {orderId}, 'XML');
/**
 * @description 获取人员信息
 * @method POST
 * @param quesTaskId
 * @author jgj
 */
export const getUserInfoByQuesTaskId = (quesTaskId) => fetch('/rest/projectManagerInfo/getUserInfoByQuesTaskId', '/crm400',  {quesTaskId}, 'JSON', 'POST');
/**
 * @description 上传反馈 & 提交保修
 * @method POST
 * @param quesTaskId
 * @author jgj
 */
export const uploadFeedBackOrder = (data) => fetch('/rest/crmFeedBackInfo/uploadFeedBackOrder', '/crm400',  data, 'XML', 'POST');
/**
 * @description 获取验房预约
 * @method GET
 * @param userId
 * @author jgj
 */
export const getCheckAppointRecords = (userId) => fetch('/rest/checkAppoint/getCheckAppointRecords', '/crm400',  {userId}, 'JSON');
/**
 * @description 获取积分商品
 * @method GET
 * @param projectType
 * @author jgj
 */
export const getGoodsList = (projectType) => fetch('/rest/accumulatedPointsInfo/getGoodsList', '/crm400',  {projectType}, 'JSON');
/**
 * @description 获取积分商品
 * @method GET
 * @param wxUserId
 * @author jgj
 */
export const getUserWxPoints = (wxUserId) => fetch('/rest/accumulatedPointsInfo/getUserWxPoints', '/crm400',  {wxUserId}, 'JSON');
/**
 * @description 获取兑换记录
 * @method GET
 * @param userWxId
 * @author jgj
 */
export const getConvertGoodsRecord = (userWxId) => fetch('/rest/accumulatedPointsInfo/getConvertGoodsRecord', '/crm400',  {userWxId}, 'JSON');
/**
 * @description 获取积分明细
 * @method GET
 * @param userWxId
 * @author jgj
 */
export const getPointsDetail = (userWxId) => fetch('/rest/accumulatedPointsInfo/getPointsDetail', '/crm400',  {userWxId}, 'JSON');
/**
 * @description 业主地址信息存储
 * @method GET
 * @param wxUserId
 * @author jgj
 */
export const updateShippingAddress = (wxUserId) => fetch('/rest/accumulatedPointsInfo/updateShippingAddress', '/crm400',  {wxUserId}, 'JSON');
/**
 * @description 获取业主地址
 * @method GET
 * @param wxUserId
 * @author jgj
 */
export const getShippingAddress = (wxUserId) => fetch('/rest/accumulatedPointsInfo/getShippingAddress', '/crm400',  {wxUserId}, 'JSON');
/**
 * @description 确认兑换
 * @method POST
 * @param goodsId,userWxId,telephone,consignee,address
 * @author jgj
 */
export const convertGoods = (data) => fetch('/rest/accumulatedPointsInfo/convertGoods', '/crm400',  data, 'JSON', 'POST');
/**
 * @description 签到
 * @method POST
 * @param projectType,userWxId
 * @author jgj
 */
export const signIn = (projectType, userWxId) => fetch('/rest/accumulatedPointsInfo/signIn', '/crm400',  {projectType, userWxId}, 'JSON', 'POST');
/**
 * @description 设置兑换默认地址
 * @method GET
 * @param wxUserId,id
 * @author jgj
 */
export const setCurrentLocation = (wxUserId, id) => fetch('/rest/accumulatedPointsInfo/setCurrentLocation', '/crm400',  {wxUserId, id}, 'JSON', );
/**
 * @description 删除兑换地址
 * @method GET
 * @param id
 * @author jgj
 */
export const deleteAccumulatedPointsAddress = (id) => fetch('/rest/accumulatedPointsInfo/deleteAccumulatedPointsAddress', '/crm400',  { id}, 'JSON', );
/**
 * @description 获取区域
 * @method GET
 * @param level, parentId
 * @author jgj
 */
export const showCityList = (level, parentId) => fetch('/rest/cityInfo/showCityListToJson', '/crm400',  {level, parentId}, 'JSON', );
/**
 * @description 更新、新增兑换地址
 * @method GET
 * @param wxUserId,name,phone,address,id
 * @author jgj
 */
export const saveAccumulatedPointsAddress = (data) => fetch('/rest/accumulatedPointsInfo/saveAccumulatedPointsAddress', '/crm400',  data, 'JSON', );
/**
 * @description 获取签到日期
 * @method GET
 * @param wxUserId,year,month
 * @author jgj
 */
export const getSignedDateByMonth = (wxUserId,year,month) => fetch('/rest/accumulatedPointsInfo/getSignedDateByMonth', '/crm400',  {wxUserId,year,month}, 'JSON', );

/**
 * @description 我-我的福利抽奖信息
 * @method GET
 * @param projectType
 * @param userWxId 微信useId
 * @author lyy
 */
export const getPrizeDetail = (data) => fetch('/rest/prizeInfo/getPrizeDetail', '/crm400', data, 'JSON','get');

/**
 * @raffle 我-我的福利抽奖结果
 * @method GET
 * @param prizePoolId
 * @param wxUserId 微信useId
 * @author lyy
 */
export const raffle = (prizePoolId,wxUserId) => fetch('/rest/prizeInfo/raffle', '/crm400', {prizePoolId,wxUserId}, 'JSON','GET');

/**
 * @description 获取提示发放奖品成功接口
 * @method POST
 * @param prizeAcceptId,userName用户姓名,userPhone用户电话,userAddress用户地址
 * @author lyy
 */
export const acceptPrize = (prizeAcceptId,userName,userPhone,userAddress) => fetch('/rest/prizeInfo/acceptPrize', '/crm400',  {prizeAcceptId,userName,userPhone,userAddress}, 'JSON', 'POST');

/**
 * @description 获取区域列表
 * @method GET
 * @param
 * @author zjx
 */
export const areaList = () => fetch('/rest/areaInfo/areaList', '/crm400', {}, 'JSON');

/**
 * @raffle 获取微信配置
 * @method POST
 * @param targetUrl, projectType
 * @author jgj
 */
export const putJsSDKConfig = (targetUrl, projectType) => fetch('/rest/wxPayInfo/putJsSDKConfig', '/crm400', {targetUrl, projectType}, 'JSON', 'POST');

/**
 * @description 提交 咨询、建议、表扬
 * @method POST
 * @param
 * @author zjx
 */
export const saveFeedBackOrder = (data) => fetch('/rest/crmFeedBackInfo/saveFeedBackOrder', '/crm400', data, 'JSON', 'POST');

/**
 * @description 获取认证地址
 * @method GET
 * @param
 * @author zjx
 */
export const crmBuildLocation = (data) => fetch('/rest/crmServiceInfo/crmBuildLocation', '/crm400', data, 'XML');

/**
 * @description 获取所有地址
 * @method GET
 * @param userId, authType:1
 * @author zjx
 */
export const getBuildingList = (data) => fetch('/rest/crmServiceInfo/getBuildLocation', '/crm400', data, 'XML');

/**
 * @description 获取我的房产设置默认地址
 * @method POST
 * @param userId,relateId,isDefault,
 * @author spy
 */
export const setDefaultLocation = (data) => fetch('/rest/crmServiceInfo/setDefaultLocation', '/crm400', data, 'XML',"POST");

/**
 * @description 获取我的奖品未中奖接口
 * @method GET
 * @param onWxUserId:wxUserId,onProjectType:projectType
 * @author lyy
 */
export const myPrize = (onWxUserId,onProjectType) => fetch('/rest/prizeInfo/myPrize', '/crm400',  {onWxUserId,onProjectType}, 'JSON', 'GET');
/**
 * @description 获取我的家人判断家人是否为业主
 * @method GET
 * @param projectType, wxUserId, ownerId
 * @author jgj
 */
export const getfamilyNewListToJson = (projectType, wxUserId) => fetch('/rest/ownerAuthInfo/getfamilyNewListToJson', '/crm400',  {projectType, wxUserId}, 'JSON', 'GET');
/**
 * @getAuthBuildingToFamilyNews 获取我的家人 > 房产选择 > 房产选择初始化数据接口
 * @method GET
 * @param userId
 * @author lyy
 */
export const getOwnerBuildLocationToJson = (userId) => fetch('/rest/crmServiceInfo/getOwnerBuildLocationToJson', '/crm400',  {userId}, 'JSON', 'GET');

/**
 * @getAuthBuildingNews 获取我的家人> 房产选择 > 家人必须授权房产接口
 * @method GET
 * @param wxUserId,relationOfOwner,ownerName,ownerIDCard,infoId,ownerIDCardType
 * @author lyy
 */
export const getAuthBuildingNews = (wxUserId,folkOwnerId) => fetch('/rest/ownerAuthInfo/getAuthBuildingNews', '/crm400',  {wxUserId,folkOwnerId}, 'JSON', 'GET');
/**
 * @getInvateFamilyNews 获取我的家人 > 房产选择 > 家人授权房产接口
 * @method GET
 * @param wxUserId,relationOfOwner,ownerName,ownerIDCard,infoId,ownerIDCardType
 * @author lyy
 */
export const getInvateFamilyNews = (wxUserId,relationOfOwner,ownerName,ownerIDCard,infoId,ownerIDCardType) => fetch('/rest/ownerAuthInfo/getInvateFamilyNews', '/crm400',  {wxUserId,relationOfOwner,ownerName,ownerIDCard,infoId,ownerIDCardType}, 'JSON', 'GET');

/**
 * @deleteMyFamily 获取我的家人删除家人
 * @method GET
 * @param wxUserId,relationOfOwner,ownerName,ownerIDCard,infoId,ownerIDCardType
 * @author lyy
 */
export const deleteMyFamily = (ownerName,familyId) => fetch('/rest/crmServiceInfo/deleteMyFamily', '/crm400',  {ownerName,familyId}, 'JSON', 'POST');


/**
 * @getAuthBuildingToFamilyNews 获取我的家人查询用户是否为业主
 * @method GET
 * @param wxUserId,relationOfOwner,ownerName,ownerIDCard,infoId,ownerIDCardType
 * @author lyy
 */
export const getfamilyNewList = (projectType,wxUserId,ownerId) => fetch('/rest/ownerAuthInfo/getfamilyNewList', '/crm400',  {projectType,wxUserId,ownerId}, 'XML', 'GET');

/**
 * @description 添加,更新还款提醒
 * @method POST
 * @param projectType, wxUserId, ownerId
 * @author jgj
 */
export const saveOrUpdateRepaymentReminder = (ownerId, repaymentDate, amount) => fetch('/rest/repaymentReminderInfo/saveOrUpdateRepaymentReminder', '/crm400',  {ownerId, repaymentDate, amount}, 'JSON', 'POST');
/**
 * @description 删除还款提醒
 * @method POST
 * @param projectType, wxUserId, ownerId
 * @author jgj
 */
export const deleteRepaymentReminder = (ownerId) => fetch('/rest/repaymentReminderInfo/deleteRepaymentReminder', '/crm400',  {ownerId}, 'JSON', 'POST');
/**
 * @description 上传pc端图片
 * @method POST
 * @param imgData, imgType, imgSize, count, orderId
 * @author jgj
 */
export const uploadFileByLocal = (data) => fetch('/rest/goodsModuleInfo/uploadFileByLocal', '/crm400',  data, 'XML', 'POST');
/**
 * @description 上传微信端图片
 * @method POST
 * @param mediaId, count, orderId, projectType
 * @author jgj
 */
export const uploadFile = (data) => fetch('/rest/goodsModuleInfo/uploadFile', '/crm400',  data, 'XML', 'POST');
/**
 * @description 更新手机号
 * @method GET
 * @param wxUserId, phoneNumber, countryCode, code, needCode
 * @author jgj
 */
export const updatePhone = (data) => fetch('/rest/ownerAuthInfo/updatePhone', '/crm400',  data, 'JSON', 'GET');
/**
 * @description 获取预约时间
 * @method GET
 * @param infoId
 * @author jgj
 */
export const getAppointDataByLocation = (infoId) => fetch('/rest/checkAppoint/getAppointDataByLocation', '/crm400',  {infoId}, 'JSON', 'GET');
/**
 * @description 获取预约时间
 * @method GET
 * @param checkAppointId, appointDate
 * @author jgj
 */
export const getCheckAppointTimeInterList = (checkAppointId, appointDate) => fetch('/rest/checkAppoint/getCheckAppointTimeInterList', '/crm400',  {checkAppointId, appointDate}, 'JSON', 'GET');
/**
 * @description 保存收楼预约信息
 * @method GET
 * @param data
 * @author jgj
 */
export const saveCheckAppointRecord = (data) => fetch('/rest/checkAppoint/saveCheckAppointRecord', '/crm400',  data, 'JSON', 'GET');
/**
 * @description 获取收楼预约详情
 * @method GET
 * @param appointRecordId
 * @author jgj
 */
export const getCheckAppointRecordDetail = (appointRecordId) => fetch('/rest/checkAppoint/getCheckAppointRecordDetail', '/crm400',  {appointRecordId}, 'JSON', 'GET');
/**
 * @description 取消收楼预约
 * @method post
 * @param appointRecordId
 * @author jgj
 */
export const cancelCheckAppointRecord = (appointRecordId) => fetch('/rest/checkAppoint/cancelCheckAppointRecord', '/crm400',  {appointRecordId}, 'JSON', 'POST');

/**
 * @description 获取发布房源的字典数据
 * @method GET
 * @param
 * @author 周静娴
 */
export const getFamilyTripDictJson = (data) => fetch('/rest/familyTripInfo/getFamilyTripDictJson', '/crm400',  data, 'JSON', 'GET');

/**
 * @description 保存房源信息
 * @method POST
 * @param
 * @author 周静娴
 */
export const saveFamilyTrip = (data) => fetch('/rest/familyTripInfo/saveFamilyTrip', '/crm400',  data, 'JSON', 'POST');

/**
 * @description 便民借还
 * @method POST
 * @param
 * @author spy
 */
export const getCreditRepayment = (projectType) => fetch('/rest/creditRepaymentInfo/getCreditRepayment', '/crm400',  {projectType}, 'JSON', 'POST');

/**
 * @description 获取当前公众号的名称和logo
 * @method GET
 * @param projectType
 * @param wxUserId
 * @author 周静娴
 */
export const getWechatTokenAndUser = (data) => fetch('/rest/userInfo/getWechatTokenAndUser', '/crm400',  data, 'JSON');

/**
 * @description 查询家人授权模块
 * @param {Object} data
 * @author tongyy
 */
export const getOrbAuthModules = (relateId,data) => fetch('/ownerAuthInfo/getOrbAuthModules/'+relateId, '/walter',{}, 'JSON', 'POST', 'JSON')


/**
 * 登录接口
 */
export const loginMember = (data) => fetch2('/sync_SyncDailyTask_terminalUserLoginTI.do', '/qpi', data, 'XML', 'GET')

/**
 * 获取我的借用列表
 */
export const getMyLendList = (data) => fetch2('/rest/deviceInfo/getMyLendList', '/qpi', data, 'JSON', 'GET')
/**
 * 获取设备管理列表
 */
export const getAdminDeviceList = (data) => fetch2('/rest/deviceInfo/getAdminDeviceList', '/qpi', data, 'JSON', 'GET')
/**
 * 获取设备详情
 */
export const getLendDeviceDetail = (data) => fetch2('/rest/deviceInfo/getLendDeviceDetail', '/qpi', data, 'JSON', 'GET')

/**
 * 设备借入
 */
export const lendDevice = (data) => fetch2('/rest/deviceInfo/lendDevice', '/qpi', data, 'JSON', 'GET')
/**
 * 设备转借
 */
export const lendDeviceToOther = (data) => fetch2('/rest/deviceInfo/lendDeviceToOther', '/qpi', data, 'JSON', 'GET')
/**
 * 设备归还
 */
export const setCanReturnDevice = (data) => fetch2('/rest/deviceInfo/setCanReturnDevice', '/qpi', data, 'JSON', 'GET')
export const returnDevice = (data) => fetch2('/rest/deviceInfo/returnDevice', '/qpi', data, 'JSON', 'GET')

/**
 * 获取设备状态
 */
export const getDeviceLendStatus = (data) => fetch2('/rest/deviceInfo/getDeviceLendStatus', '/qpi', data, 'JSON', 'GET')

/**
 * 获取房间欠费接口
 * @param data
 * @returns {Promise<*|void>}
 */
export const getReceivableRecord = (data) => fetch2('/bill/getReceivableRecord', '/charge', data, 'JSON', 'GET','JSON',[],'kaide')
/**
 * 上传订单接口
 * @param data
 * @returns {Promise<*|void>}
 */
export const uploadOrderRecord = (data) => fetch2('/bill/uploadOrderRecord', '/charge', data, 'JSON', 'POST','JSON',[],'kaide')
/**
 * crm缴费
 * @param data
 * @returns {Promise<*|void>}
 */
export const getPay = (data) => fetch2('/payCommon/getPay', '/walter', data, 'JSON', 'POST','JSON')

/**
 * 查询支付结果通知
 * @param data
 * @returns {Promise<*|void>}
 */
export const isPaySuccess = (data) => fetch2('/payCommon/isPaySuccess', '/walter', data, 'JSON', 'POST','JSON')

/**
 * 获取缴费记录
 * @param data
 * @returns {Promise<*|void>}
 */
export const getOrderRecordsByProjectAndUser = (data) => fetch2('/bill/getOrderRecordsByProjectAndUser', '/charge', data, 'JSON', 'POST','JSON',[],'kaide')

/**
 * 获取缴费记录详情
 * @param data
 * @returns {Promise<*|void>}
 */
export const getOrderRhDetail = (data) => fetch2('/bill/getOrderRhDetail', '/charge', data, 'JSON', 'GET','JSON',[],'kaide')


export const getDictDetail = (data) => fetch2('/rest/dictDetailInfo/getDictDetail', '/crm400',data, 'JSON', 'POST', 'FORMDATA')


//供方信息
/**
 * App获取供方信息条数通过分类与状态(json传参)
 * @param data
 * @returns {Promise<*|void>}
 */
export const getCountByStateAmount = (data) => fetch2('/appGfManage/getCountByStateAmount', '/gf',data, 'JSON', 'POST','JSON')
/**
 * 获取分类管理类型树(表单传参)
 * @param data
 */
export const getTree = (data) => fetch2('/typeManage/getTree', '/gf',data, 'JSON', 'POST','FORMDATA')
/**
 * 获取供方信息列表
 * @param data
 */
export const getListByStateAndType = (data) => fetch2('/appGfManage/getListByStateAndType', '/gf',data, 'JSON', 'POST', 'JSON')
/**
 * App获取履约详情集团级(表单传参)
 * @param data
 */
export const getContractAchievementCompany = (data) => fetch2('/appGfManage/getContractAchievementCompany', '/gf',data, 'JSON', 'POST', 'FORMDATA')
/**
 * App获取履约详情分公司级(表单传参)
 * @param data
 */
export const getContractAchievementArea = (data) => fetch2('/appGfManage/getContractAchievementArea', '/gf',data, 'JSON', 'POST', 'FORMDATA')
/**
 * App获取供方的合同列表(表单传参)
 * @param data
 */
export const getContract = (pathArray,data) => fetch2('/gfManage/contract/getListByParams', '/gf',data, 'JSON', 'POST','FORMDATA',pathArray)

/**
 * App获取合同详情(表单传参)
 * @param data
 */
export const contractDetail = (data) => fetch2('/appGfManage/contractDetail', '/gf',data, 'JSON', 'POST','FORMDATA')

/**
 * 根据年份、合同id获取履约成绩列表(表单传参)
 * @param data
 * @returns {Promise<*|void>}
 */
export const achievementDetail = (data) => fetch2('/gfManage/contract/achievementDetail', '/gf',data, 'JSON', 'POST','FORMDATA')

/**
 * App获取合同年平均履约成绩(表单传参)
 * @param data
 * @returns {Promise<*|void>}
 */
export const getContractAchievementYearAvg = (data) => fetch2('/appGfManage/getContractAchievementYearAvg', '/gf',data, 'JSON', 'POST','FORMDATA')

/**
 * APP获取供方档案(表单传参)
 * @param data
 * @returns {Promise<*|void>}
 */
export const getAppFbInfoById = (data) => fetch2('/appGfManage/getAppFbInfoById', '/gf',data, 'JSON', 'POST','FORMDATA')

/**
 * 获取供方信息详情(表单传参)
 * @param data
 * @returns {Promise<*|void>}
 */
export const getDetail = (data) => fetch2('/gfManage/getDetail', '/gf',data, 'JSON', 'POST','FORMDATA')

/**
 * App获取供方的投标记录里的投标率和中标率(表单传参)
 * @param data
 * @returns {Promise<*|void>}
 */
export const getInfoTypeRate = (data) => fetch2('/appGfManage/getInfoTypeRate', '/gf',data, 'JSON', 'POST','FORMDATA')

/**
 * App获取供方的投标记录(表单传参)
 * @param data
 * @returns {Promise<*|void>}
 */
export const getTenderRecord = (data) => fetch2('/appGfManage/getTenderRecord', '/gf',data, 'JSON', 'POST','FORMDATA')

/**
 * App获取供方的奖罚记录(表单传参)
 * @param data
 * @returns {Promise<*|void>}
 */
export const getRewardAndPenaltyRecord = (data) => fetch2('/appGfManage/getRewardAndPenaltyRecord', '/gf',data, 'JSON', 'POST','FORMDATA')

/**
 * App获取合同详情(表单传参)
 * @param data
 */
export const getFilePath = (data) => fetch2('/FileUploadAndDownloadServlet', '/filemanager',data, 'JSON', 'POST','FORMDATA')
export const uploadMutiFile = (data) => fetch2('/rest/uploadFileInfo/uploadMutiFile', '/crm400',data, 'JSON', 'POST','FILE')
// export const downLoad = (data) => fetch('/FileUploadAndDownloadServlet', '/filemanager',data, 'JSON', 'POST','FORMDATA')
//=====================================装修=============================

/**
 * 获取装修申请分页数据
 * @param data
 * @returns {Promise<unknown>}
 */
export const getDecorateApplyList = (pathArr,data) => fetch2('/decoration/page', '/decorationManage',data, 'JSON', 'POST','JSON',pathArr)
/**
 * 装修申请审核接口
 * @param pathArr
 * @param data
 * @returns {Promise<unknown>}
 */
export const approvalDecoration = (pathArr,data) => fetch2('/decoration/approvalDecoration', '/decorationManage',data, 'JSON', 'POST','JSON',pathArr)
/**
 * 查询违规信息
 * @param pathArr
 * @param data
 * @returns {Promise<unknown>}
 */
export const selectDecorationBreakRule = (pathArr,data) => fetch2('/decoration/selectDecorationBreakRule', '/decorationManage',data, 'JSON', 'POST','JSON',pathArr)
/**
 * 新增违规信息
 * @param pathArr
 * @param data
 * @returns {Promise<unknown>}
 */
export const addDecorationBreakRule = (data) => fetch2('/decoration/addDecorationBreakRule', '/decorationManage',data, 'JSON', 'POST','JSON')
/**
 * 初验复验
 * @param data
 * @returns {Promise<unknown>}
 */
export const decorationCheckAccept = (data) => fetch2('/decoration/decorationCheckAccept', '/decorationManage',data, 'JSON', 'POST','JSON')

/**
 * 新增整改信息
 * @param data
 * @returns {Promise<unknown>}
 */
export const addDecorationModifyCheckRecord = (data) => fetch2('/decoration/addDecorationModifyCheckRecord', '/decorationManage',data, 'JSON', 'POST','JSON')
/**
 *
 * @param data
 * @returns {Promise<unknown>}
 */
export const selectDecoration = (pathArr) => fetch2('/decoration/selectDecoration', '/decorationManage',{}, 'JSON', 'GET','',pathArr)
/**
 * 查询所有提交人
 * @param data
 * @returns {Promise<unknown>}
 */
export const selectDecorationOperator = (data) => fetch2('/decoration/selectDecorationOperator', '/decorationManage',data, 'JSON', 'POST','JSON')
