The radiative decays of $0^{++}$ and $1^{+-}$ heavy mesons