The cosmic-ray electron spectrum in a disc-halo galactic model