The invention relates to new use of a series of nitrogen-containing heterocyclic radical substituted alkene compounds, and more specifically relates to use of the compounds represented by general formula a or salts thereof in bioimaging, pH value detection, biomacromolecule detection or cell microenvironment detection, wherein Z, S1, S2 and R1 are defined as the specification. The compounds are utilized as the fluorescent dye for bioimaging, fluorescent pH probe for pH value detection and / or diagnostic agent for tumor cell detection. The compounds involved in the invention have excellent imaging effect, and shows the single component multicolor property, can be used for single component multicolor imaging or conventional imaging, etc., and haves enormous application prospect in bioimaging and tumor detection. (formula a).