import { http } from './request/request'

// 更新用户信息
export const updateUserInfo = async (data: any) =>
  await http.post<any>('/sysUser/editPerfectMessage', data)

// 获取协议
export const getAgreeInfo = async (id: string, isChat = false) =>
  await http.get<any>('/agreement/' + id, undefined, {
    header: {
      Authorization: '',
    },
  })

// 获取字典
export const getDict = async () => await http.get<any>('/sysDictType/tree')

// 设备通知注册
export const bindRegId = async (data: any) =>
  await http.post<any>('/sysUser/dealRegistrationId', data)

// 获取未读消息数量
export const getUnreadNum = async () => await http.get<any>('/customerService/getUnreadNum')

// 支付创建订单
export const createInspectorPrepayOrder = async (data: any) => {
  return await http.post<any>('/orderManagement/createInspectorPrepayOrder', data)
}
