Natural polyphenolic antioxidants are widely present in foods such as fruits and vegetables, meanwhile applied in food processing and storage to prevent the formation of harmful compounds. While excessive antioxidants lead to negative impacts on human health. Hence, it is crucial to accurately detect antioxidant levels in order to enhance the overall nutritional content and food safety. Herein, a novel one-dimensional covalent organic framework (COF-Por-DPP) was constructed using 5,10,15,20-tetrakis(4-aminophenyl)-21H,23H-porphyrin and 4,4'-(2,6-pyrazinediyl)bisbenzaldehyde. The unique photoresensitive properties and topological structures endowed COF-Por-DPP excellent oxidase-like activity. The COF-Por-DPP based colorimetric assay was established for three antioxidants (gallic acid, tannic acid and caffeic acid). Moreover, this method was used to analyze real samples and a hydrogel sensor was constructed, which demonstrated good accuracy and practicability.