The present invention relates to indolizine derivatives and applications thereof in medicine. In particular, disclosed in the present invention are novel substituted indolizine derivatives of formula I, or isotopically-labeled compounds thereof, or optical isomers, geometric isomers, tautomers or mixtures of isomers thereof, or pharmaceutically acceptable salts thereof, or a prodrug thereof. The present invention further relates to the application of these compounds in medicine.