import request from "@/request/index";
import { useNow, useDateFormat } from '@vueuse/core'

// const date = useDateFormat(useNow(), 'YYYY-MM-DD').value
const yesday = useDateFormat((new Date).getTime() - 24 * 60 * 60 * 1000, 'YYYY-MM-DD').value
  

export function Getdjld() {
  return request({
      url: 'http://10.83.68.108:8090/ghjgDataShareApi/dataShare/getdjld',
      method: "post",
      data: {
        'date': yesday
      },
  })
}

export function Getpjyl() {
  return request({
      url: 'http://10.83.68.108:8090/ghjgDataShareApi/dataShare/getpjyl',
      method: "post",
      data: {
        'date': yesday
      },
  })
}

export function GetLshb() {
  return request({
      url: 'http://10.83.68.108:8090/ghjgDataShareApi/ghjgdatashare/temporaryFlights/getList',
      method: "post",
      data: {
        "current":1,
        "size":10,
        "realLicenseCode":""
      },
  })
}

export function GetTouristBoat() {
  return request({
      url: 'http://10.83.68.108:8090/ghjgDataShareApiTest/dataShare/GetTouristBoatAISCalculate',
      method: "post",
      data: {},
  })
}

export function GetFerryStation() {
  return request({
      url: 'http://10.83.68.108:8090/ghjgDataShareApiTest/dataShare/GetFerryStation',
      method: "post",
      data: {
        "des": "",
        "name": ""
      },
  })
}

export function GetPJWharf() {
  return request({
      url: 'http://10.83.68.108:8090/ghjgDataShareApiTest/dataShare/GetPJWharf',
      method: "post",
      data: {
        "berthCode": "",
        "berthName": "",
        "portCode": "",
        "portName": ""
      }
  })
}