import request from '@/utils/request'
import qs from 'qs'
import { SERVICES_FILE_MANAGEMENT } from "@/config/serviceSettings";

const api = {
    queryItem: SERVICES_FILE_MANAGEMENT+'/file/find',

    uploadItem: SERVICES_FILE_MANAGEMENT+'/file/upload-file'
}

export function queryList(id) {
    return request({
        url: api.queryItem,
        method: 'get',
        params: id
    })
}


export function uploadItem(parameter) {
    return request({
        url: api.uploadItem+ `?directory=/kzyWMS&storageType=0&isFileName=1`,
        method: 'post',
        header: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        // data: qs.stringify(parameter)
        data: parameter,
        timeout: 36000000,
    })
}
