

const SUCCESS_CODE = '00000'
const TOKEN_ERR_CODE = ''


function apiVerify ({res, success, error, alertServerErrMsg, clearAdminInfo}){
	let {code, data, msg} = res.data
	if(SUCCESS_CODE === code){
		success(data)
		return data
	} else if(TOKEN_ERR_CODE === code){
		
	} else {
		alertServerErrMsg(msg)
		error && error()
	}
}

export {
	SUCCESS_CODE,
	TOKEN_ERR_CODE,
	apiVerify
}