import { httpApi } from '../../request/httpApi'

export default {
    //修改密码
    async updatePassword(form, msg = true) {
        return httpApi({
            url: '/api/blade-user/update-password',
            method: 'post',
            params: form,
        }, msg)
    },
    //设置默认项目
    async setDefaultProject(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/defaultProject/save',
            method: 'post',
            data: form,
        }, msg)
    },
    //获取默认项目
    async getDefaultProject(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/defaultProject/queryUserDefault',
            method: 'get',
            params: form,
        }, msg)
    },
    //更新用户信息
    async updateUserInfo(form, msg = true) {
        return httpApi({
            url: '/api/blade-user/update-info',
            method: 'post',
            data: form,
        }, msg)
    },
    //获取操作日志
    async getOperationLog(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/operationLog/list',
            method: 'get',
            params: form,
        }, msg)
    },
    //获取业务模块
    async queryBusinessModule(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/operationLog/queryBusinessModule',
            method: 'get',
            params: form,
        }, msg)
    },
    //获取操作页面
    async queryOperationView(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/operationLog/queryOperationView',
            method: 'get',
            params: form,
        }, msg)
    },
    //获取操作类型
    async queryOperationTypeList(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/operationLog/queryOperationTypeList',
            method: 'get',
            params: form,
        }, msg)
    },
    //获取用户信息
    async queryCurrentUserData(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/userViewProjectContract/queryCurrentUserData',
            method: 'post',
            data: form,
        }, msg)
    },
    //回收站分页
    async queryRecycleBinList(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/recycleBin/list',
            method: 'get',
            params: form,
        }, msg)
    },
    //回收站恢复
    async recycleBinRegain(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/recycleBin/regain',
            method: 'post',
            data: form,
        }, msg)
    },
}
