user.ts 923 B

12345678910111213141516171819202122232425262728
  1. import { bluebookAiAgent } from "@/xiaolanbenlib/api/index";
  2. import request from "@/xiaolanbenlib/module/axios.js";
  3. import { TUserInfo, TEntItem, TMyContact, TMyPrivacy } from "@/types/user";
  4. // 获取我的个人信息
  5. export const getMyInfo = () => {
  6. return request.get<TUserInfo>(`${bluebookAiAgent}api/v1/my/info`,)
  7. }
  8. // 获取我的隐私设置
  9. export const getMyPrivacy = () => {
  10. return request.get<TMyPrivacy>(`${bluebookAiAgent}api/v1/my/privacy/setting`,)
  11. }
  12. // 设置我的隐私设置
  13. export const saveMyPrivacy = (data: TMyPrivacy) => {
  14. return request.put(`${bluebookAiAgent}api/v1/my/privacy/setting`, data)
  15. }
  16. // 获取我的归属企业列表
  17. export const getMyEntList = () => {
  18. return request.get<TEntItem[]>(`${bluebookAiAgent}api/v1/my/entList`,)
  19. }
  20. // 提交联系我们
  21. export const saveMyContact = (data: TMyContact) => {
  22. return request.put(`${bluebookAiAgent}api/v1/my/contactUs`, data)
  23. }