import request from '@/utils/request';

export interface PhoneVO {
  id: number;
  expertPhone: string;
  servicePhone: string;
  updateTime: string;
}

export interface PhoneForm {
  id: number;
  expertPhone: string;
  servicePhone: string;
}

/**
 * 查询联系电话
 */
export const getPhone = (id: number) => {
  return request<PhoneVO>({
    url: `/system/phone/${id}`,
    method: 'get'
  });
};

/**
 * 修改联系电话
 */
export const updatePhone = (data: PhoneForm) => {
  return request<void>({
    url: '/system/phone',
    method: 'put',
    data
  });
};
