import httpServer from './httpServer'
let getRoles = function(){
    return new Promise((resolve, reject)=>{
            httpServer({
                method: 'get',
                url: 'role/getRoleBox',
                authType:"back"
            }).then(res=>{
                if(res.status != 200){
                    resolve([])
                }else{
                    if(res.data.resultCode == 200){
                        let list = res.data.data
                        resolve(list)
                    }else{
                        resolve([])
                    }
                }
            
            }).catch(err=>{
                resolve([])
            })
        })
}
export {
    getRoles
}