A compound of a formula and a pharmaceutically acceptable salt thereof, wherein, L is selected from -O-, -N -, and -N C(=O)-; L 1 is selected from a single bond, -CH 2 - and -CH 2 CH 2 -; R 1 is selected from the group consisting of C 1-6 alkyl, C 1-6 heteroalkyl, C 3-7 cycloalkyl, 3-7 membered heterocycloalkyl, 6-10 membered aryl and 5-6 membered heteroaryl, wherein each is optionally substituted by one, two or three R groups; R 2 is selected from H, halogen, OH, NH 2 and CN; or selected from the group consisting of C 1-6 alkyl and C 1-6 heteroalkyl, wherein each is optionally substituted by one, two or three R groups; R 3 is selected from the group consisting of phenyl, 5-6 membered heteroaryl and 5-6 membered heterocycloalkyl, wherein each is optionally substituted by one, two or three R groups; R 4 is selected from H, or selected from C 1-3 alkyl optionally substituted by one, two or three R groups; R 5 is selected from H, F, Cl, Br, I, and OH; R6 is selected from H, F, Cl, Br, I, and OH; R is selected from H, halogen, OH, NH2, CN, or selected from the group consisting of C 1-3 alkyl optionally substituted by one, two or three R' groups and C 1-3 heteroalkyl optionally substituted by one, two or three R' groups; R' is selected from F, Cl, Br, I, OH, CN and NH2; a carbon atom with "*" is a chiral carbon atom, and is present in a single enantiomer form of or or in a form rich in one enantiomer; a carbon atom with "#" is a chiral carbon atom, and is present in a single enantiomer form of or or in a form rich in one enantiomer; the "hetero" of the 3-7 membered heterocycloalkyl, 5-6 membered heteroaryl, C 1-6 heteroalkyl, C 1-3 heteroalkyl and 5-6 membered heterocycloalkyl is independently selected from -C(=O)NH-, -NH-, N, -O-, -S-, -C(=O)O- and -C(=O)-; and in any one of the above cases, the number of heteroatoms or heteroatom groups is independently selected from 1, 2 or 3. L is selected from -O-, -N -, and -N C(=O)-; L 1 is selected from a single bond, -CH 2 - and -CH 2 CH 2 -; R 1 is selected from the group consisting of C 1-6 alkyl, C 1-6 heteroalkyl, C 3-7 cycloalkyl, 3-7 membered heterocycloalkyl, 6-10 membered aryl and 5-6 membered heteroaryl, wherein each is optionally substituted by one, two or three R groups; R 2 is selected from H, halogen, OH, NH 2 and CN; or selected from the group consisting of C 1-6 alkyl and C 1-6 heteroalkyl, wherein each is optionally substituted by one, two or three R groups; R 3 is selected from the group consisting of phenyl, 5-6 membered heteroaryl and 5-6 membered heterocycloalkyl, wherein each is optionally substituted by one, two or three R groups; R 4 is selected from H, or selected from C 1-3 alkyl optionally substituted by one, two or three R groups; R 5 is selected from H, F, Cl, Br, I, and OH; R6 is selected from H, F, Cl, Br, I, and OH; R is selected from H, halogen, OH, NH2, CN, or selected from the group consisting of C 1-3 alkyl optionally substituted by one, two or three R' groups and C 1-3 heteroalkyl optionally substituted by one, two or three R' groups; R' is selected from F, Cl, Br, I, OH, CN and NH2; a carbon atom with "*" is a chiral carbon atom, and is present in a single enantiomer form of or or in a form rich in one enantiomer; a carbon atom with "#" is a chiral carbon atom, and is present in a single enantiomer form of or or in a form rich in one enantiomer; the "hetero" of the 3-7 membered heterocycloalkyl, 5-6 membered heteroaryl, C 1-6 heteroalkyl, C 1-3 heteroalkyl and 5-6 membered heterocycloalkyl is independently selected from -C(=O)NH-, -NH-, N, -O-, -S-, -C(=O)O- and -C(=O)-; and in any one of the above cases, the number of heteroatoms or heteroatom groups is independently selected from 1, 2 or 3.