import {get,post,put,del} from '../tools'
/**
 * 查询标签信息
 * @param params
 */
export const findPLabel=(params)=>get({url:'/v1/property/label',params});

export const labelAdd=(params)=>post({url:'/v1/property/label',data:params});

export const labelEdit=(params)=>put({url:'/v1/property/label',data:params});
export const pLabelDelete=(id)=>del({url:`/v1/property/label/${id}`});

/**
 * 如果没有关键词，则不查询网络
 * @param keywords
 * @returns {{records: Array}|Promise<any | never>}
 */
export const searchLabel=({keywords})=>{
    if (keywords === '') return {records:[]};
    return get({url:'/v1/property/label',params:{keywords}})
};