import config from "../config"
import DataFetcher from "../data/DataFetcher";

const dataFetcher = new DataFetcher("https://mock.feiniaotech.com/shuichan");

export default {
    list: {
        url: config.base_dev_url + "image/list?key="+config.mini_key,
        type: "post",
    },
    pointByBlueZones:{
        url: config.base_dev_url + "image/pointByBlueZones",
        type: "post",
    },
    pointByRegionId:{
        url: config.base_dev_url + "image/pointByRegionId?key="+config.mini_key,
        type: "post",
    },
    findSuitabilityByPoint: {
        url: config.base_dev_url + "lz_weather7d/findSuitabilityByPoint/{farmId}/{date}?key="+config.mini_key,
        type: "get",
    },
    //图片列表
    fetchGardenImgs: {
        url: config.base_url + "adm/images/{organId}/{areaId}",
        type: "get",
    },
    fetchGardenImgsDate: {
        url: config.base_url + "adm/findHasImagesDate",
        type: "get",
    },
    fetchRegionList: {
        url: config.base_url + "adm/regionList",
        type: "post",
    },
    //视频列表
    videoList: {
        url: config.base_dev_url + "",
        type: "get",
        mockCondition: (p)=>{
            return true;
        },mockFun:function(p){
            if(!p.date){p.date = "2025-05"}
            return dataFetcher.fetchData(90975,`video/${p.date}`)
        }
    },
}

