As in this post How would I calculate the work function of a metal, the definition is given by "the minimum thermodynamic work (i.e. energy) needed to remove an electron from a solid to a point in the vacuum immediately outside the solid surface"(from Wikipedia). But when we do photoemission spectroscopy, the work function is with respect to vacuum so that we have $\phi = h\nu -\mid E_b\mid$. Are they consistent?
Edit: I guess the reconciliation may be sought in the following way:
Without the surface double layer, the Fermi energy $E_F$ is with respect to the vacuum. Once the double layer is taken into account, the chemical potential will effectively be lowered by $W_s$, i.e., the electrochemical potential becomes $E_F - W_s$ (with respect to the vacuum). Therefore, the total energy is $E_K$ in the end and $\phi = -E_F + W_s$. Then, probably, the macroscopic field due to inequivalent surfaces (or "image interaction" if they are equivalent) is neglected in some cases.