The invention discloses preparation of a 
covalent organic framework material and an application thereof in 
metal ion recognition and 
dye adsorption. The preparation method comprises the following steps: adding 2,4,6-tri-(4-bromo-phenyl)-[1,3,5]-triazinide and 
pyrene-2,7-bis(4,4,5,5-tetramethyl-[1,3,2]dioxaboropentane) into an 
organic solvent, carrying out ultrasonic treatment, and carrying out cyclic degassing; and adding a 
palladium catalyst and an alkaline solution, adding the raw materials into a Schleck tube, vacuumizing the tube and introducing 
nitrogen, performing circular degassing forthree times, purging the tube with 
argon, sealing the tube, performing stirring reaction, carrying out suction 
filtration, washing the product, and carrying out 
vacuum drying to obtain the 
covalent organic framework material. The synthesis method is simple to operate and high in yield; the synthesized 
covalent organic framework material is high in sensitivity and good in selectivity and has good application performance. 
Metal ions can be quickly and sensitively recognized, a good 
adsorption effect on the 
neutral red dye is achieved, and a large amount of the 
neutral red dye can be adsorbed inan 
aqueous solution within a short time.