import ajax from './ajax'
/**
 * 0. 获取 试卷  题的配置信息
 */

export const addOlds = (params) => ajax('/wxinfo/add', params, 'POST');
export const updateOlds = (params) => ajax('/wxinfo/update', params, 'POST');
export const deleteOlds = (params) => ajax('/wxinfo/delete', params, 'GET');
export const deleteInfo = (params) => ajax('/wxinfo/delete', params, 'GET');
/**
 * 1. 用户登录
 */
export const userLogin = (params) => ajax('/wxinfo/bing', params, "GET");

/**
 * 1.1. 修改密码
 */
export const changePwd = (params) => ajax('/wxinfo/updatePwd', params, 'POST');

/**
 * 1.1. 获取OpenId
 */
export const getOpenId = (params) => ajax('/wx/getOpenId', params, 'GET');

/**
 * 1.2. 检验OpenId是否绑定
 */
export const checkOpenId = (params) => ajax('/wxinfo/isExist', params, 'GET');
/**
 * 1.3. 解绑退出
 */
export const unbind = (params) => ajax('/wxinfo/unbind', params, 'GET');
/**
 * 1.3. 获取APPID
 */
export const getAppID = (params) => ajax('/wx/getAppId', params, 'GET');

/**
 * 2. 获取采集信息列表
 */
export const getInfoList = (params) => ajax('/wxinfo/list', params, "GET");

/**
 * 7. 上传照片
 */
// export const uploadAvatar = (params) => ajax('/sys/user/upload', params, 'POST',true);

export const uploadAvatar = (params) => ajax('/sys/upload/uploadImageXy', params, 'POST', true);


/**
 * 8. 探访记录
 */
export const  visitList= (params) => ajax('/visit/list', params, 'GET');
/**
 * 探访记录
 */
export const  visitListByInfoId= (params) => ajax('/visit/listByInfoId', params, 'GET');
/**
 * 9. 老人详情
 */
export const oldsInfo = (params) => ajax('/info/one', params, 'GET');

/**
 * 10. 探访添加数据
 */
export const addVisitData = (params) => ajax('/visit/add', params, 'POST');

/**
 * 10. 探访添加数据-修改字段了-CH
 */
export const pcVisitCommit = (params) => ajax('/visit/pcVisitCommit', params, 'POST');

/**
 * 12. 单查本人信息
 */
export const userOne = (params) => ajax('/sys/login/session', params, 'GET');

/**
 * 13. 全部列表
 */
export const listByOpenid = (params) => ajax('/wxinfo/listByOpenid', params, 'GET');


/**
 * 13. 全部列表
 */
export const listByfid = (params) => ajax('/wxinfo/listByFid', params, 'GET');
/**
 * 13. 五级联动
 */
export const queryDeptList = (params) => ajax('/sys/dept/list', params, 'GET');
/**
 * 13. 积分
 */
export const userValue = (params) => ajax('/wxinfo/userValue', params, 'GET');
/**
 * 13. 国家地区数据
 */
export const CountryDeptList = (params) => ajax('/civilregionalism/deptList', params, 'GET');
/**
 * 13. 五级懒加载
 */
export const queryDeptListByLevel = (params) => ajax('/sys/dept/listByLevel', params, 'GET');

/**
 * 14. 照片
 */
export const visitFace  = (params) => ajax('/visit/doFace3', params, 'POST');


/**
 * 15 探访查询登录绑定
 */
export const  detailsLogin = (params) => ajax('/wxinfo/visitBing', params, 'GET');
/**
 * 16 探访查询登录openid 检查
 */
export const  detailsCheck = (params) => ajax('/wxinfo/visitIsExist', params, 'GET');

/**
 * 17 探访查询登录退出
 */
export const  detailsOut = (params) => ajax('/wxinfo/visitUnbind', params, 'GET');

/**
 * 18 探访查询老人户id
 */
export const  listByFid = (params) => ajax('/wxinfo/visitByFid', params, 'GET');

/**
 * 18 探访查询老人10个记录
 */
export const  listByNumber = (params) => ajax('/wxinfo/visitByNumber', params, 'GET');

/**
 * 19 探访查询老人10个记录单个查询
 */
export const  queryOne = (params) => ajax('/visit/one', params, 'GET');

/**
 * 20 探访距离有问题
 */
export const  visitError = (params) => ajax('/overRange/add', params, 'POST');

/**
 * 21 openid 探访提交后反馈信息
 */
export const  sumUserOne = (params) => ajax('/wxinfo/sumUserOne', params, 'GET');

/**
 * 22 获取token
 */
export const  getToken = (params) => ajax('/applet/getToken', params, 'GET');

/**
 * 23 获取完善信息
 */
export const getLoginUserInfo = (params) => ajax('/applet/findUserInfo', params, 'GET');

/**
 * 24 修改完善信息
 */
export const updateLoginUserInfo = (params) => ajax('/applet/suppleUserInfo', params, 'POST');

/**
 * 25 首页显示数量
 */
export const homeStatistics = (params) => ajax('/applet/homeStatistics', params, 'GET');

/**
 * 26 首页欢迎语
 */
export const welcomeMessage = (params) => ajax('/appletNotice/listForAppletsFirst', params, 'GET');


/**
 * 26 已读通知
 */
export const readMessage = (params) => ajax('/appletNotice/listForApplets', params, 'GET');


/**
 * 26 未读通知
 */
export const noReadMessage = (params) => ajax('/appletNotice/listForAppletsNoread', params, 'GET');

/**
 * 26 点击未读
 */
export const addMessage = (params) => ajax('/readNotice/add', params, 'POST');

/**
 * 26 身份卡上传照片
 */
export const suppleUserInfo = (params) => ajax('/applet/suppleUserInfo', params, 'POST');

/**
 * 26 排行
 */
export const getpaixing = (params) => ajax('/applet/userValue', params, 'GET');
/**
 * 26 排行
 */
export const addYiJian = (params) => ajax('/feedback/add', params, 'POST');

/**
 * 26 未按要求巡访
 */
export const noVisitList = (params) => ajax('/wxinfo/noVisitList', params, 'GET');

/**
 * 26 获取参数
 */
export const getALiOssToken= (params) => ajax('/oss/getALiOssToken', params, "GET");

/**
 * 27 跳转到时间银行程序-CH
 */
export const getbankToken = (params) => ajax('/sys/login/getbankToken', params, "GET");

/**
 * 28 人脸活体识别-base64-CH
 */
export const getLivPicByBase64 = (params) => ajax('/user/getPeopleByBase64', params, "post");


/**
 * 26 获取字典值
 */
export const dictListForPage= (params) => ajax('/sys/dict/listForPage', params, "GET");

//自主填报
export const ownerAdd = (params) => ajax('/wxinfo/ownerAdd', params, 'POST');
export const ownerUpdate = (params) => ajax('/wxinfo/ownerUpdate', params, 'POST');
export const findOwnerInfo = (params) => ajax('/wxinfo/findOwnerInfo', params, 'GET');
export const ownerStatistics = (params) => ajax('/wxinfo/ownerStatistics', params, 'GET');
/**
 * 五级地区
 * /chart/statistics
 */
export const statistics= (params) => ajax('/info/ownerDept', params, "GET");



