import { HcApi } from '../../request/index'

export default {
    //修改密码
    async updatePassword(form, msg = true) {
        return HcApi({
            url: '/api/blade-user/update-password',
            method: 'post',
            params: form,
        }, msg)
    },
    //设置默认项目
    async setDefaultProject(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/defaultProject/save',
            method: 'post',
            data: form,
        }, msg)
    },
    //获取默认项目
    async getDefaultProject(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/defaultProject/queryUserDefault',
            method: 'get',
            params: form,
        }, msg)
    },
    //更新用户信息
    async updateUserInfo(form, msg = true) {
        return HcApi({
            url: '/api/blade-user/update-info',
            method: 'post',
            data: form,
        }, msg)
    },
    //获取用户信息
    async queryCurrentUserData(form, msg = true) {
        return HcApi({
            url: '/api/blade-business/userViewProjectContract/queryCurrentUserData',
            method: 'post',
            data: form,
        }, msg)
    },
}
