/**
 * @name 我的
 * @description 请求示例
 * @param {Object} data        请求参数
 * @param {String} url         请求地址
 * @param {String} method      请求类型 可以不设置,默认GET
 */
import request from '../utils/request';

/**
 * 获取工作公告列表
 * @param {*} data
 */
const nameAuthApi = function (data) {
    return request({
        url: '/admin-api/system/auth/real/name/auth',
        method: 'post',
        data: data
    });
};
/**
 * 获取我的信息
 * @param {*} data
 */
const getUserInfoApi = function (data) {
    return request({
        url: '/admin-api/system/user/profile/get/my/info',
        method: 'post',
        data: data
    });
};

const getProfileUserInfoApi = function (data) {
    return request({
        url: '/admin-api/system/user/profile/get',
        method: 'get',
        data: data
    });
};

/**
 * 获得用户积分规则分页
 * @param {*} data
 */
const userIntegralRruleApi = function (data) {
    return request(
        {
            url: '/admin-api/system/user-integral-rule/page',
            method: 'get',
            data: data
        },
        false
    );
};

/**
 * 获得用户积分明细分页
 * @param {*} data
 */
const userIntegralDetailApi = function (data) {
    return request({
        url: '/admin-api/system/user-integral-detail/page',
        method: 'get',
        data: data
    });
};

/**
 * 获得用户我的收藏分页
 * @param {*} data
 */
const myInfoPageApi = function (data) {
    return request({
        url: '/admin-api/people/collection/myInfo/page',
        method: 'get',
        data: data
    });
};

/**
 * 统计党员-群众点单数据
 * @param {*} data
 */
const myMasserCountApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help/count',
        method: 'get',
        data: data
    });
};

/**
 * 党员认证
 * @param {*} data
 */
const myMemberAuthApi = function (data) {
    return request({
        url: '/admin-api/system/auth/party/member/auth',
        method: 'post',
        data: data
    });
};

/**
 * 创建群众点单回复
 * @param {*} data
 */
const replyCreateApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help-reply/create',
        method: 'post',
        data: data
    });
};
/**
 * 获得群众点单回复
 * @param {*} data
 */
const replyCreateGetApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help-reply/get',
        method: 'get',
        data: data
    });
};
/**
 * 更新群众点单回复
 * @param {*} data
 */
const replyCreatUpdateApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help-reply/update',
        method: 'PUT',
        data: data
    });
};
/**
 * 查询优质回复
 * @param {*} data
 */
const replyGoodPageApi = function (data) {
    return request({
        url: '/admin-api/people/seek-help-reply/good-page',
        method: 'get',
        data: data
    });
};

// 发送验证码
const sendSmSCodeApi = function (data) {
    return request({
        url: '/admin-api/system/auth/send-sms-code',
        method: 'post',
        data: data
    });
};

const systemAuthSmsLogin = function (data) {
    return request({
        url: '/admin-api/system/auth/sms-login',
        method: 'post',
        data: data
    });
};
export {
    nameAuthApi,
    getUserInfoApi,
    userIntegralRruleApi,
    userIntegralDetailApi,
    myInfoPageApi,
    myMasserCountApi,
    myMemberAuthApi,
    replyCreateApi,
    replyCreateGetApi,
    replyCreatUpdateApi,
    replyGoodPageApi,
    sendSmSCodeApi,
    systemAuthSmsLogin,
    getProfileUserInfoApi
};
