The compounds according to formula (I), their pharmaceutically acceptable acid or base addition salts, and the uses thereof. These compounds and their pharmaceutically acceptable acid or base addition salts can be used for the preparing a medicament for modulating estrogen related receptors (ERR), and treating metabolic diseases, such as high blood fat, fatty liver, hyperglycemia, diabetes, fat. The definition of the groups of the formula is defined as the description.