We analytically investigate the ground-state properties of two-component Bose-Einstein condensates with few ⁸⁷Rb atoms inside a high-quality cavity quantum electrodynamics. In the SU(2) representation for atom, this quantum system can be realized a generalized Dicke model with a quadratic term arising from the interatomic interactions, which can be controlled experimentally by Feshbach resonance technique. Moreover, this weak interspecies interaction can give rise to an important zero-temperature quantum phase transition from the normal to the superradiant phases, where the atomic ensemble in the normal phase is collectively unexcited while is macroscopically excited with coherent radiations in the superradiant phase. Finally, we propose to observe this predicted quantum phase transition by measuring the direct and striking signatures of the photon field in terms of a heterodyne detector out of the cavity.