const companyList = [
    {value:0,title:'广西'}  ,
    {value:1,title:'广州'}  ,
    {value:2,title:'石家庄'}  ,
];

function getCompanyName(value){
    let arr = companyList.filter(v=>v.value === value);
    let title = '';
    if(arr.length > 0){title = arr[0].title}
    return title;
}

function getCompanyValueArray(){
    let arr = [];
    companyList.map(v=>{
        arr.push(v.value)
    })
    return arr;
}

module.exports = {
    companyList,
    getCompanyName,
    getCompanyValueArray
}
