A compound represented by formula or formula or pharmaceutically acceptable salt thereof, wherein, T 1 is selected from N or C(R 01); T 2 is selected from -N(R 01)-, O, S(=O) 2 or -CH(NR 01 R 02)-; R 01 or R 02 is separately and independently selected from H, or C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cycloalkyl-(CH 2) 0-3 - or C 3-6 heterocyclohydrocarbyl-(CH 2) 0-3 - which is optionally substituted by 1, 2 or 3 halogen, hydroxyl and/or cyano; wherein the "hetero" is 1, 2 or 3 group(s) seleted from O, S, N, S(=O) 2 and/or S(=O); optionally, R 01 and R 02 on T 2 are together linked to the same N atom to form a 3-6 membered ring, the ring contains 1, 2 or 3 heteroatom(s), the heteroatom is selected from O, S or N; each of D 1 -D 4 is separately and independently selected from -(CR 1 R 2) 1-3 -; D is selected from -N(R 01)-, -O- or -S-; W is selected from =O, =S, =N or =N(OMe); R 3 is selected from R 03, OR 03 or SR 03; R 03 is selected from C 1-4 alkyl, C 1-4 haloalkyl or C 3-5 cycloalkyl-(CH 2) 0-3 -; Z is selected from N or C(R 4); X 1 is selected from C(R x1); X 2 is selected from CH; R x1, R 1, R 2 and R 4 are separately and independently selected from H, F, Cl, Br, I, CN, OH, SH, NH 2, or C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cyclohydrocarbyl-(CH 2) 0-3 - or C 3-6 heterocyclohydrocarbyl-(CH 2) 0-3 - which is optionally substituted by 1, 2 or 3 halogen, hydroxyl, and/or cyano; wherein the "hetero" represents 1, 2 or 3 heteratom(s) which is selected from O, S or N; R p1 and R p2 are separately and independently selected from H, C 1-4 alkyl or C 1-4 haloalkyl; optionally, R p1 and R p2 are together linked to the same P group to form a 5-6 membered ring, the ring contains 1, 2 or 3 heteratom(s), the heteroatom is selected from O, S, N or P; and optionally, the positions of Z and can be interchanged. T 1 is selected from N or C(R 01); T 2 is selected from -N(R 01)-, O, S(=O) 2 or -CH(NR 01 R 02)-; R 01 or R 02 is separately and independently selected from H, or C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cycloalkyl-(CH 2) 0-3 - or C 3-6 heterocyclohydrocarbyl-(CH 2) 0-3 - which is optionally substituted by 1, 2 or 3 halogen, hydroxyl and/or cyano; wherein the "hetero" is 1, 2 or 3 group(s) seleted from O, S, N, S(=O) 2 and/or S(=O); optionally, R 01 and R 02 on T 2 are together linked to the same N atom to form a 3-6 membered ring, the ring contains 1, 2 or 3 heteroatom(s), the heteroatom is selected from O, S or N; each of D 1 -D 4 is separately and independently selected from -(CR 1 R 2) 1-3 -; D is selected from -N(R 01)-, -O- or -S-; W is selected from =O, =S, =N or =N(OMe); R 3 is selected from R 03, OR 03 or SR 03; R 03 is selected from C 1-4 alkyl, C 1-4 haloalkyl or C 3-5 cycloalkyl-(CH 2) 0-3 -; Z is selected from N or C(R 4); X 1 is selected from C(R x1); X 2 is selected from CH; R x1, R 1, R 2 and R 4 are separately and independently selected from H, F, Cl, Br, I, CN, OH, SH, NH 2, or C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cyclohydrocarbyl-(CH 2) 0-3 - or C 3-6 heterocyclohydrocarbyl-(CH 2) 0-3 - which is optionally substituted by 1, 2 or 3 halogen, hydroxyl, and/or cyano; wherein the "hetero" represents 1, 2 or 3 heteratom(s) which is selected from O, S or N; R p1 and R p2 are separately and independently selected from H, C 1-4 alkyl or C 1-4 haloalkyl; optionally, R p1 and R p2 are together linked to the same P group to form a 5-6 membered ring, the ring contains 1, 2 or 3 heteratom(s), the heteroatom is selected from O, S, N or P; and optionally, the positions of Z and can be interchanged.