import {  myFetch } from "../utils/fetch";
import { httpApi } from "@/common/js/baseUrl";
import zlbApi from "@/api/zlbApi";
// 获取个人身份信息 '/userCenter/getUserInfo'
export function getUserInfo(data) {
  const url = zlbApi.getUserInfo; // '/userCenter/getUserInfo'
  return myFetch(url, "post", data, "json");
}

// 更新个人身份信息 '/userCenter/updateUserInfoIdentity'
export function updateUserInfo(data) {
  const url = zlbApi.updateUserInfoIdentity; // '/userCenter/updateUserInfoIdentity'
  return myFetch(url, "post", data, "json");
}

// 获取用户自己绑定的门牌列表 '/userCenter/getMyDoorplateAll'
export function getMyDoorplateAll(data) {
  const url = zlbApi.getMyDoorplateAll; // '/userCenter/getMyDoorplateAll'
  return myFetch(url, "post", data, "json");
}

// 新接口: 我的家庭门牌 '/business/applet-house-number/getPersonalHouseNumber'
export function getPersonalHouseNumber(data) {
  const url = zlbApi.getDoorplateInfoNew; // '/business/applet-house-number/getPersonalHouseNumber'
  return myFetch(url, 'get', data, 'json');
}

// 新接口: 我的企业门牌 '/business/applet-house-number/getPersonalCompany'
export function getPersonalCompany(data) {
  const url = zlbApi.getDoorplateInfoNew; // '/business/applet-house-number/getPersonalCompany'
  return myFetch(url, 'get', data, 'json');
}

// 变更用户当前门牌地址 '/userCenter/changeMyPriorityDoorplate'
export function changeMyDoorplate(data) {
  const url = zlbApi.changeMyPriorityDoorplate; // '/userCenter/changeMyPriorityDoorplate'
  return myFetch(url, "post", data, "json");
}

// 获取浙里办单点登录后用户信息 '/zlbCallback/personSsoUserInfo'
export function getSsoUserInfo(data) {
  const url = zlbApi.personSsoUserInfo; // '/zlbCallback/personSsoUserInfo'
  return myFetch(url, "post", data, "json");
}

// 获取门牌照片地址 '/doorplateInfoApp/getDoorplatePicUrl'
export function getDoorplatePicUrl(data){
  const url = zlbApi.getDoorplatePicUrl; // '/doorplateInfoApp/getDoorplatePicUrl'
  return myFetch(url, 'post', data, 'json');
}

// 同一单点登录用户信息 '/personSsoUserInfoZlbUnify'
export function getSsoUserInfoUnity(data) {
  const url = zlbApi.personSsoUserInfoZlbUnify; // '/personSsoUserInfoZlbUnify'
  return myFetch(url, "post", data, "json");
}
