import request from '@/utils/request'

export function findConnectorList(data) {
  return request({
    url: '/mart/connector/findConnectorList',
    method: 'post',
    data:data
  })
}
export function findApiList(data) {
  return request({
    url: '/mart/connector/findApiList',
    method: 'post',
    data:data
  })
}
export function addConnector(data) {
  return request({
    url: '/mart/connector/addConnector',
    method: 'post',
    data:data
  })
}

export function getDeleteConnector(connectorId) {
  return request({
    url: '/mart/connector/getDeleteConnector?connectorId='+connectorId,
    method: 'get'
  })
}


export function updateConnector(data) {
  return request({
    url: '/mart/connector/updateConnector',
    method: 'post',
    data:data
  })
};

export function phonePlace(tel) {
  return request({
    url: '/port/list/phonePlace?tel='+tel,
    method: 'GET'
  })
}

export function getIpPlace(ip) {
  return request({
    url: '/port/list/getIpPlace?ip='+ip,
    method: 'GET'
  })
}
export function getHeadlines() {
  return request({
    url: '/port/list/getHeadlines',
    method: 'GET'
  })
}
export function getBirthday(data) {
  return request({
    url: '/port/list/getBirthday',
    method: 'post',
    data:data
  })
}

export function getPostcode(code) {
  return request({
    url: '/port/list/getPostcode?code='+code,
    method: 'GET'
  })
}
export function getWeather() {
  return request({
    url: '/port/list/getWeather',
    method: 'GET'
  })
}
//天气预报
export function getWeatherForecast(cityName) {
  return request({
    url: '/port/list/getWeatherForecast?cityName='+cityName,
    method: 'GET'
  })
}

//购买
export function doBuyInterface(data) {
  return request({
    url: '/system/buy/doBuyInterface',
    method: 'post',
    data:data
  })
}
//资产列表
export function findConnectorUserList(data) {
  return request({
    url: '/mart/connector/findConnectorUserList',
    method: 'post',
    data:data
  })
}
//API页面类型分类
export function findConnectSort() {
  return request({
    url: '/mart/connector/findConnectSort',
    method: 'get'
  })
}
