import request from '@/utils/request';

export interface getUserSetData {
}

export interface UserSetData {
  // ENAME: string;
  // USER_EMAIL: string;
  // POST_IDS: string;
  // USER_PHONE: string;
  // USER_ADDRESS: string;
  // AVATAR: string;
  // PREFER:boolean;
  // data:any;
  // NewObject:boolean;
  // ObjectType:string;
}

export interface UserSetResp {
  data: Record<any, any>;
  success: boolean;
}

export interface UpdateUserPassword {
  
  
}

//获取用户设置信息
export async function getUserSetting() {
  return request.request<getUserSetData, UserSetResp>({
    url: '/system/user/getUseInfo',
    method: 'GET',
    data: {},
  });
}
//更新用户信息,更新用户偏好选择
export async function updateUserSetting(data: UserSetData) {
  return request.request<UserSetData, UserSetResp>({
    url: '/system/user/saveUserData',
    method: 'POST',
    data,
  });
}
//更新登录密码
export async function updateUserPassword(data: UpdateUserPassword) {
  return request.request<UpdateUserPassword, UserSetResp>({
    url: '/system/user/updatePwd',
    method: 'POST',
    data,
  });
}
