Introduction

Malachite green (MG) and crystal violet (CV) are synthetic triphenylmethane dyes that were initially used in textile processes and later became popular in aquaculture due to their sterilizable, bactericidal, and anti-infective properties [1]. However, MG and CV can affect the natural apoptosis of cells, easily induce tumours in the body, and damage the liver, kidneys, and muscle tissues of human beings [2]. Their high toxicity, residue levels, carcinogenicity, teratogenicity, and mutagenicity have resulted in the prohibition of MG and CV in aquaculture across numerous countries [3]. Unfortunately, because of their easy availability, inexpensive cost, and great efficiency, they are still used in some areas, particularly in aquaculture where they are severely abused, resulting in residues of MG and CV in aquatic products and aquaculture water [4]. To quantify and monitor the widespread presence of MG and CV in food systems, it is critical to develop sensitive assays [5]. At present, various analytical methods, such as ultraviolet-visible absorption spectrometry [6], high-performance liquid chromatography (HPLC) [7], voltammetry methods [8, 9], thin-layer chromatography [10], mass spectrometry [11], capillary electrophoresis [12] and enzyme-linked immune sorbent assays (ELISAs) [13], have been applied to the detection of fungicides [14]. However, these methods have the disadvantages of being time-consuming, high cost, complicated procedures, and the need for specialized personnel to operate [15]. Consequently, an increasing number of new methods are being investigated to provide rapid and economical methods for fungicide detection in food systems [16].

Surface-enhanced Raman spectroscopy (SERS) is considered a prospective technique for the detection of trace chemicals and biomolecules because of its high selectivity, ultra-sensitivity, non-destructiveness, and fast performance [17]. However, it is crucial to construct efficient substrates with good enhancement characteristics, high reproducibility, and great reliability for obtaining enhanced and reproducible SERS signals [18]. Despite recent advancements in the development of SERS substrates, various problems still exist. For example, noble metal nanoparticles are prone to aggregation and have limited affinity for many organic compounds, while many SERS substrates are difficult to manufacture and have poor stability [19]. Herein, the fabrication of outstanding SERS substrates with an easy procedure for production, quick identification, as well as excellent storage properties, remains essential [20]. In order to improve the applicability of the substrates, many studies have introduced metal-organic frameworks (MOFs) into SERS substrates, using the porous surface of MOFs to enhance the adsorption of the target and effectively support and stabilize the metal nanoparticles [21]. For example, the SERS substrate UiO-66(NH2)@Au was obtained by growing gold nanoparticles (Au NPs) on the surface of UiO-66(NH2), which was used for new coccine and orange II detections in food samples [22]. UiO-66(NH2) with absorptive properties contributes to the reduction of interval between the target and Au NPs, thus enhancing the SERS effect [23]. MOF materials can effectively adsorb targets, but some MOFs may break down in acidic or alkaline environments [24]. Moreover, MOFs may undergo ion exchange or dissolution of metal ions, which would affect the stability of substrates [25].

Covalent organic frameworks (COFs) are a kind of crystalline substances consisting of organic molecules bound together by covalent bonds [26]. They have many advantages such as good thermal and chemical stability, superb crystallinity, high porosity, and big specific surface area [27]. Currently, COFs have provided promising platforms for a variety of applications such as multiphase catalysts, semiconductors, and sensors [28]. Compared with MOFs, COFs also have a high potential for SERS analysis because of their great adsorption capacity, huge specific surface areas, and π-π stacking interactions [29]. On the other hand, COFs are more cost-effective to synthesize [30]. Most importantly, COFs usually display higher stability and corrosion resistance than MOFs in chemical environments [31]. Consequently, integrating COFs with metal substrates is a great strategy for enhancing the sensitivity of the SERS technique. However, COFs have been applied in a few studies in combination with SERS for food detection analysis [32]. Among the published reports, Au NPs self-assembled COFs were fabricated via the electrostatic interaction, which was effectively used to analyze the presence of MG residue in various seafood products as well as the presence of thiram residue in various types of fruit juice [33]. Compared to Au NPs, silver nanoparticles (Ag NPs) are more advantageous for SERS substrate applications because they have a larger plasmon effect and no interband transition energy [34]. However, Ag NPs are prone to aggregation, which will lead to a reduced enhancement effect [35]. Yang et al. [36] created Ag-COF-COOH materials with carboxyl functionalization as SERS substrates for melamine detection. Through hydrogen bonds, the amino group on the triazine ring of melamine could connect to the carboxyl group on the surface of the substrate. However, it has not been reported that COFs were conjugated with Ag NPs for non-specific adsorption for the detection of fungicides. Meanwhile, the incorporation of COFs in SERS assays is still in its infancy and further research is required to expand the study of food contaminants [37].

Herein, in the present work, SERS substrate COF@Ag NPs were prepared for adsorption and highly accurate detection of MG and CV in fish extracts (Scheme 1). In the SERS substrate of COF@Ag NPs, the as-prepared COFs with good crystallinity and large surface area were homogeneous spheres synthesized by the monomers 1,3,5-tris (4-aminophenyl) benzene (TAPB) and 2,5-dimethoxybenzene-1,4-dicarboxaldehyde (DMTA), which were conducive to the adsorption of the target and provided growth sites for the Ag NPs for keeping them stable and avoiding aggregation [38]. COFs had excellent stability, high crystallinity, and large specific surface area, which improved the stability and adsorption capacity of COF@Ag NPs. During the process of detection, COF@Ag NPs had a porous structure that could effectively adsorb fungicides owing to π–π stacking interactions, and thus shortened the distance between the fungicides and the Ag NPs, which could effectively improve the enhancement of SERS efficiency to achieve the ultrasensitive detection of MG and CV [39]. It is expected that this research might provide a new approach to the utilization of COFs in SERS analysis. Meanwhile, COF@Ag NPs provide a new and effective SERS method for the monitoring and determination of illegally abused MG and CV in aquatic products.

Scheme 1
scheme 1

Schematic illustration of the synthesis of COF@Ag NPs substrate and the detection process for the detection of MG and CV in real samples

Materials and methods

Chemicals and reagents

1,3,5-Tris (4-aminophenyl) benzene (TAPB), 2,5-dimethoxybenzene-1,4-dicarboxaldehyde (DMTA), acetonitrile, glucose anhydrase, malachite green (MG) and hydroxylammonium chloride (NH2OH·HCl) were obtained from Shanghai Macklin Biochemical Technology Co., Ltd. (Shanghai, China) Ammonium hydroxide solution (10% w/v NH3·H2O), sodium hydroxide (NaOH) and sodium sulfate anhydrous (Na2SO4) were supplied from Aladdin Reagent (Shanghai) Co., Ltd. (Shanghai, China). Crystal violet (CV) was obtained from Shanghai Yuanye Bio-Technology Co., Ltd. (Shanghai, China). Acetic acid and ethanol were purchased from Tianjin Fuyu Fine Chemical Co. (Tianjin, China). Silver nitrate (AgNO3) was obtained from Sinopharm Chemical Reagent Co., Ltd. (Shanghai, China).

Instruments and parameters

High-resolution field emission scanning electron microscopy (SEM) (Merlin, Carl Zeiss NTS GmbH, Oberkochen, Germany) furnished with energy-dispersive X-ray spectroscopy and high magnification transmission electron microscope (TEM) (HRTEM, JEM-2100 F Plus, JEOL Ltd., Tokyo, Japan) equipped with energy-dispersive X-ray spectroscopy were used to observe the morphology of materials and perform compositional analysis. The X-ray diffraction (XRD) patterns were obtained by an X-ray diffractometer (XRD, Empyrean, PANalytical B.V., Almelo, Netherlands) to characterize the crystal structure of materials. Fourier infrared spectroscopy (FT-IR) and X-ray photoelectron spectroscopy (XPS) were obtained from a Nicolet-iS50 infrared spectrophotometer (Thermo Fisher Scientific Inc., Waltham, MA, USA) and an Axis Ultra DLD (Kratos Analytical Ltd., Manchester, UK), respectively, for the characterization of structural properties and elemental composition. The spectra of the UV-vis absorbance were collected using a spectrophotometer (UV-1800, Shimadzu Co., Kyoto, Japan). SERS spectrums were obtained by laser confocal Raman spectroscopy (LabRAM HR, Horiba France SAS, Villeneuve d’Ascq, France).

Synthesis of COF@Ag NPs

COFs were synthesized by an established approach with modifications [40]. An amount of 56.2 mg of TAPB and 46.6 mg of DMTA were added in a 50 ml centrifuge tube and dissolved with 20 ml of acetonitrile. The mixture was sonicated by an ultrasonic cleaner (SB25-12D, Ningbo Xinzhi Ultrasound Equipment Co., Ltd., Ningbo, China) until it was clear. Then, 1.2 mL of 12 mol/L acetic acid was added to the above mixture while vigorously stirring with an IKA MS 3 digital shaker (MS 3, IKA Inc., Staufen im Breisgau, Germany), and the reaction was allowed to stay for 1 min. Subsequently, the mixture was stood at room temperature for 48 h. The obtained yellow precipitate was collected by centrifugation (HR-T20MM, Hunan Hexi Equipment Industry Co., Ltd., Hunan, China) at 10,000 rpm for 5 min and washed three times with ethanol. Eventually, the precipitate was dried in the vacuum drying oven (DHG-9055, Shanghai Yiheng Scientific Instrument Co., Ltd., Shanghai, China) under vacuum at 60 °C for 24 h.

The synthesis of COF@Ag NPs was performed by growing Ag NPs in situ on the surface of COFs according to a previous report with appropriate modifications [41]. Firstly, silver ammonia solution was prepared by adding 2% (w/v) ammonia solution into 10.0 ml of AgNO3 solution (0.2 M) until the precipitate disappeared completely. Next, 5.0 mg of COFs were mixed with 2.0 mL of freshly prepared silver ammonia solution. After sonicated for 15 min, the supernatant was collected after centrifuging the mixture for 5 min at 8000 rpm. Then, the precipitate was reacted with 2.0 mL of a 0.312 M glucose solution at 800 rpm for 4 min. Finally, after centrifugation again to remove the supernatant, the precipitate was washed once with water and dried in a vacuum at 40 °C for 8 h. For comparison with COF@Ag NPs, Ag NPs were synthesized following the previously published hydroxylamine hydrochloride reduction approach [42]. Briefly, 5.0 mL of NH2OH·HCl (0.03 M) and 1.0 mL of NaOH (0.6 M) were added into 84.0 mL of water. Subsequently, 10 mL of AgNO3 solution (0.01 M) was added along with vigorous stirring for 1 h to get Ag NPs.

Adsorption performance

The adsorption performance of the prepared materials was investigated. 2.0 mL of 1.0 mg/mL of Ag NPs, COFs, or COF@Ag NPs was added with 2.0 ml of MG or CV solution, respectively, and then vibrated for 2 h. After sufficient adsorption, the mixed solution was centrifuged and the supernatant was retained. Subsequently, the UV-vis absorption spectra of the supernatant were measured to evaluate the adsorption performance of Ag NPs, COFs, and COF@Ag NPs.

SERS measurements

For obtaining good detection performance, the optimal ratios between COF@Ag NPs and fungicides were explored. SERS spectra were obtained by mixing COF@Ag NPs (0.5 mg/mL) and MG or CV solutions at different volume ratios (1:2, 1:1, 2:1, 3:1, 4:1). For detecting MG and CV, 30 µL COF@Ag NPs were dropped into a 1.5 mL centrifuge tube. Subsequently, 30 µL of MG or CV solutions at various concentrations (ranging from 0.0001/0.0002 to 10.0 mg/L) were added. After incubating for 2 h, the mixture was transferred to a capillary tube with a 1 mm diameter for SERS detection. All the SERS spectra were acquired with a 633 nm He-Ne laser as the excitation source, a 10× visible objective (Olympus Co., PA, USA), a laser power of 25%, an acquisition band of 400–1700 cm−1, an accumulation count of 2 and an integration time of 10 s.

Pre-treatment of real samples

Snapper purchased from a supermarket (Guangzhou, Guangdong) was selected as the food sample to investigate the performance of COF@Ag NPs in real applications by spiked experiments [43]. At first, 40.0 g of fish tissue was ground and mixed with 20.0 mL of acetonitrile. Then, at room temperature, the mixture was extracted by sonication for 30 min. The supernatant was obtained and filtered following centrifugation at 10,000 rpm for 10 min, and sodium sulfate anhydrous was added to the supernatant to remove water. Next, acetonitrile was evaporated and dried. Finally, the obtained products were mixed with a 10 mM PBS solution (pH 7.4) for subsequent use.

Statistical analysis

The Raman enhancement factor (EF) of COF@Ag NPs was assessed by using MG and calculated via the following equation [44]:

$${\text{EF}} = \frac{{{{\text{I}_{{\text{SERS}}} } \mathord{\left/ {\vphantom {{\text{I}_{{\text{SERS}}} } {\text{C}_{{\text{SERS}}} }}} \right. \kern-\nulldelimiterspace} {\text{C}_{{\text{SERS}}} }}}}{{{{\text{I}_{{\text{RS}}} } \mathord{\left/ {\vphantom {{\text{I}_{{\text{RS}}} } {\text{C}_{{\text{RS}}} }}} \right. \kern-\nulldelimiterspace} {\text{C}_{{\text{RS}}} }}}},$$
(1)

where CSERS and CRS represent the concentration of MG for the SERS test and normal Raman test, respectively. ISERS and IRS are the intensity of MG at 1367 cm−1 for the SERS test and normal Raman test, respectively. In addition, the following equation was used to determine the limits of detection for MG and CV [45]:

$${\text{LOD}} = 3{\text{S}}_{{\text{b}}} + {\text{Y}}_{{\text{b}}} ,$$
(2)

where Sb and Yb denote the mean standard deviation and average Raman intensity values of the blank sample, respectively. The mean and standard deviation of the Raman scattering intensity were used to calculate the relative standard deviation (RSD) [46]. Besides, Lab Spec 6 spectroscopy software (LabSpec 6, HORIBA Ltd., Kyoto, Japan) was used to process all Raman spectra, and all experimental data was analyzed and plotted with Origin software (Origin 2021, Origin Lab Corp., Northampton, USA).

Results and discussion

Characterization of materials

The morphology and characteristics of COFs and COF@Ag NPs were revealed using a variety of characterization techniques. Firstly, the micro-morphology of the synthesized nanomaterials was characterized by SEM and TEM. It was clear from the SEM and TEM images (Fig. 1A and C) that COFs had a typical spherical, granular surface and uniform particle size of 640 ± 23 nm in diameter [47]. As seen in Fig. 1B and D, the original morphology of COFs would not be changed with the modification of Ag NPs, and Ag NPs could be uniformly distributed on the surface of COFs. To demonstrate the structure of COF@Ag NPs even more clearly, the composition and distribution of various elements on the surface of COF@Ag NPs were explored through the SEM-EDS and TEM-EDS mapping images (Fig. 1E and F). These made it clear that C, N, O, and Ag elements were well dispersed on the surface of COF@Ag NPs.

Fig. 1
figure 1

The SEM images of A COFs and B COF@Ag NPs. The TEM images of C COFs and D COF@Ag NPs. E SEM-EDS images and F TEM-EDS images of COF@Ag NPs

XRD patterns of COFs and COF@Ag NPs were used to investigate the crystal structure of the materials [48]. The characteristic peaks of COFs at 2.6°, 4.7°, 5.4°, 7.9°, and 9.5° corresponded to the crystallographic reflections of (100), (110), (200), (210), and (220) (Fig. 2A), which were in agreement with those reported in Ma et al. [40]. In regard to these sharp and strong XRD peaks, it could be concluded that COFs were extremely crystalline and had an excellent crystalline structure. After the synthesis of Ag NPs, new characteristic peaks of COF@Ag NPs appeared at 38.0°, 44.1°, 64.4°, and 77.2°, which were consistent with those reported by Lv et al. [49]. These characteristic peaks were attributed to the (111), (200), (220), and (310) crystal planes of Ag NPs, confirming the successful synthesis and loading of Ag NPs.

Fig. 2
figure 2

A XRD patterns of COFs (black) and COF@Ag NPs (red). B FT-IR spectra of TAPB, DMTA, COFs, and COF@Ag NPs. C UV absorption spectra of COFs and COF@Ag NPs. D XPS survey spectra of COFs (black) and COF@Ag NPs (red). E C 1s spectra, F N 1s spectra, G O 1s spectra, and H Ag 3d spectra of COF@Ag NPs (Color figure online)

The FT-IR spectra of TAPB, DMTA, COFs, and COF@Ag NPs are shown in Fig. 2B. The peaks of TAPB at 3205 cm−1, 3344 cm−1 and 3420 cm−1 might be derived from the stretching vibration of N–H, and the peak of DMTA at 1672 cm−1 was attributed to the C=O stretching vibration. The characteristic peaks of COFs at 1615 cm−1 and 1592 cm−1 stemmed from the vibration of C=N and C=C, resulting from the Schiff base reaction between the amino group of TAPB and the aldehyde group of DMTA to form imine bonds [50]. Additionally, the FT-IR spectra of COFs and COF@Ag NPs were remarkably similar, illustrating that the structure of COFs was not changed [51].

From the UV–Vis spectra (Fig. 2C), the presence of characteristic plasmonic peak of COFs was at 527 nm. After assembling Ag NPs, the absorption band of COF@Ag NPs shifted to 535 nm demonstrating the effective synthesis of Ag NPs on the surface of COFs.

XPS spectra of COF@Ag NPs were collected to further characterize their chemical composition and chemical status of elements [52]. XPS survey spectrum of COF@Ag NPs indicated the existence of C, N, O, and Ag. More precisely, the C 1s spectra (Fig. 2E) of COF@Ag NPs related to the C–C band and C–O band at 284.8 eV and 286.3 eV, respectively [53]. The N 1s spectra (Fig. 2F) of COF@Ag NPs could be deconvolved into C=N–C (398.8 eV), which were formed by the combination of amino and aldehyde groups. Additionally, there existed the C–NH2 at 400.0 eV was retained in the residual TAPB. In the spectra of O 1s (Fig. 2G), the peak at 533.5 eV was attributed to the C–O band. Moreover, the peak at 531.7 eV might be attributed to the C=O in the remaining DMTA [54]. Indeed, as seen in Fig. 2H, the two different peaks at 368.8 eV and 374.8 eV were attributed to the existence of Ag 3d5/2 and Ag 3d3/2, respectively. The presence of metallic silver was confirmed by the 6.0 eV binding energy distinction between the two peaks [55]. To sum up, the results mentioned above supplied encouraging evidence to support the successful synthesis of the COF@Ag NPs.

Adsorption and SERS performance of COF@Ag NPs

The adsorption of COFs, Ag NPs, and COF@Ag NPs to MG or CV was investigated. Firstly, MG or CV was allowed to mix thoroughly with COFs, Ag NPs and COF@Ag NPs, respectively. After centrifugation, the content of MG and CV in the supernatant would decrease owing to the adsorption leading to a decrease in absorbance. Ultimately, the adsorption capacity could be inferred by comparing the change in absorbance [22]. The UV-Vis absorption spectra of MG and CV after adsorption by different substances were exhibited in Fig. 3A and C, respectively. The corresponding histograms in Fig. 3B and D display the intensity of the UV absorption peaks for MG at 613 nm and CV at 589 nm. As depicted in Fig. 3B, after being mixed with COFs or COF@Ag NPs, the absorbance of MG solution decreased significantly compared with the slight change that occurred when MG was mixed with Au NPs [54]. These results could indicate that Ag NPs alone have a limited effect on MG adsorption, while COFs and COF@Ag NPs have significant adsorption effects. Despite the fact that Ag NPs could absorb MG due to their affinity for dimethyl amino groups, COFs were superior for MG absorption via π–π stacking interactions on account of their high specific surface area and porous structure [56]. Similar findings for the CV adsorption are shown in Fig. 3D. The SERS activities of COFs, Ag NPs, and COF@Ag NPs were compared by mixing with 1.0 mg/L of MG in Fig. 3C. COFs themselves had no SERS activity and barely enhanced the SERS signal of MG. The enhancement effect of COF@Ag NPs was significant, much more than that of Ag NPs [57]. As confirmed in previous studies [58], Ag NPs produced “hot spots” to increase the MG SERS signal. Meanwhile, the aggregation of Ag NPs was prone to facilitate the localized surface plasmon resonance (LSPR). However, this aggregation was not only difficult to control but also unstable and inhomogeneous. By introducing COFs into the SERS substrate, the porous surface of COFs, which had a strong adsorption capacity, could successfully stabilize and support Ag NPs, and increase the stability of the substrate.

Fig. 3
figure 3

UV–Vis absorption spectra of A MG and C CV and histogram of the intensity of the UV absorption peak at 613 nm for (B) MG and 589 nm for (D) CV. E Raman spectra of Ag NPs, COFs, COF@Ag NPs, and 1.0 g/L of MG, and SERS spectra of MG (1.0 mg/L) mixed with Ag NPs and COF@Ag NPs

Sensitivity of COF@Ag NPs substrate

Sensitivity and detection limits are significant issues in the trace detection of fungicides [59]. As depicted in Fig. 4A, when the volume ratio of COF@Ag NPs solution to MG or CV was 1:1 or 2:1, respectively, the SERS intensity was the highest. Under optimal conditions, the aqueous solution of MG with various concentrations (0.0001–10.0 mg/L) was prepared for SERS detection. As seen in Fig. 4B, the main characteristic peaks of MG are located at 439 cm−1, 799 cm−1, 917 cm−1, 1173 cm−1, 1367 cm−1 and 1616 cm−1. These characteristic peaks were mainly attributed to out-of-plane bending vibration of phenyl-C-phenyl (439 cm−1), out-of-plane bending vibration of cyclic C–H (799 cm−1 and 917 cm−1), in-plane bending vibration of cyclic C–H (1173 cm−1), stretching vibration of N-phenyl (1367 cm−1) and stretching vibration of cyclic C–C (1616 cm−1) [60]. Furthermore, the relationship between concentrations of MG and SERS intensity at 1367 cm−1 was investigated and the logarithms of both variables showed a strong linear relationship in the concentration range of 0.0001 mg/L to 10.0 mg/L, with the equation for linear regression being Y = 0.47075X + 3.86036 (R2 = 0.99729) (Fig. 4C). The LOD of COF@Ag NPs to MG was calculated to be 3.8 × 10−5 mg/L. In the same way, Fig. 4D displays the SERS spectra of different concentrations of CV. The several characteristic peaks of CV could be assigned to the bending vibration of cyclic C–H (801 cm−1, 1174 cm−1), the bending vibration of C–C–C (916 cm−1), the stretching vibration of N-Phenyl (1370 cm−1) and the stretching vibration of cyclic C–C (1618 cm−1) [61]. Meanwhile, a linear relationship between the logarithm of the CV concentrations and the logarithm of the SERS intensity at 1174 cm−1 is shown in Fig. 4E. The linear regression equation was Y = 0.33056X + 3.87971 (R2 = 0.9499) and the LOD value of COF@Ag NPs to CV was calculated to be 1.8 × 10−5 mg/L. Finally, the enhancement factor of COF@Ag NPs to MG at a concentration of 1.0 mg/L was calculated to be 1.4 × 106. As a result, COF@Ag NPs enabled trace detection of MG and CV by combining the excellent adsorption effect of COFs with the significant enhancement effect of Ag NPs.

Fig. 4
figure 4

A Histograms of COF@Ag NPs (0.5 mg/mL) and MG or CV solutions mixed with different volume ratios (1:2, 1:1, 2:1, 3:1, 4:1). SERS spectra of different concentrations of B MG and D CV. Double logarithmic function curves between concentrations of C MG or E CV and characteristic peak intensity, in a linear equation, Y denotes lg (SERS intensity), X denotes lg (concentration)

Reproducibility and stability of COF@Ag NPs

Apart from sensitivity, the reproducibility and stability of SERS substrates are also of great importance for the actual application [62]. As shown in Fig. 5A, SERS spectra of MG (1.0 mg/L) were recorded from 10 points randomly selected from four parallel substrates. The RSD of the characteristic peak intensity of MG at 1367 cm−1 was 6.18% (< 10%), indicating that the substrate COF@Ag NPs had good reproducibility. In addition, COF@Ag NPs were kept at 4 °C in a refrigerator for different days to investigate the stability [63]. Following various storage days, COF@Ag NPs were mixed with MG solution at the concentration of 1.0 mg/L for SERS detection. According to the results (Fig. 5B), the SERS intensities obtained from COF@Ag NPs for the detection of MG after 40 and 50 days of storage were 85.01% and 72.25% of the day 0, respectively. According to the results, the enhancement of COF@Ag NPs displayed a decrease after long-term storage, which was explained by the possibility that the Ag NPs on the surface of COFs had been oxidized or distorted [64]. For 50 days of storage, the RSD of the distinctive peak intensity of MG at 1367 cm−1 was calculated to be 8.88%, proving that the substrate had good stability for long-term storage.

Fig. 5
figure 5

A SERS spectra of MG (1.0 mg/L) recorded from 10 points randomly selected from 4 parallel COF@Ag NPs substrates. B Histogram of Raman intensity at the characteristic peak of 1367 cm−1 obtained by detecting MG (1.0 mg/L) with COF@Ag NPs of different days of storage. SERS spectra of different concentrations of C MG and E CV in fish samples and the related double logarithmic function curves between the concentration of D MG or F CV and the intensities of the characteristic peaks. Y stands for lg (SERS intensity) and X stands for lg (concentration) in the linear equation

Analysis of MG and CV in real samples

Snapper was selected as the real sample to further investigate the performance of COF@Ag NPs in practical applications. The detection spectra demonstrated that the primary characteristic peaks chosen as the basis for the calculation were not significantly impacted (Fig. 5C and E). The logarithmic SERS intensities of the peaks at 1367 cm−1 as a function of logarithmic MG concentrations are plotted in Fig. 5D. The calibration curve was Y = 0.26846X + 3.91378, where Y denoted lg (SERS intensity) and X denoted lg (concentration), achieving a determination coefficient (R2) of 0.9792. In the same way, as displayed in Fig. 5F, the calibration curve for analyzing CV was Y = 0.27658X + 3.84502 with R2 of 0.9965 based on the SERS signal of CV at 1174 cm−1. The limits of detection (LOD) for MG and CV in fish samples were calculated to be 4.5 × 10−5 and 3.7 × 10−5 mg/kg, respectively. Compared to available SERS substrates reported in the literature as shown in Table 1, the COF@Ag NPs had favorable advantages in detecting MG and CV. On the other hand, it was indicated that MG or CV was not detectable in fish tissue fluid using COF@Ag NPs substrate according to Table 2, either due to their absence in the tissue fluid or because they were below the detection limit of the SERS substrate [65]. Additionally, good recoveries were obtained for fish samples spiked with different concentrations of MG and CV (Table 2). The detection results of MG in fish with the SERS substrate COF@Ag NPs displayed recovery rates from 90.83 to 107.91% with RSD values ranging from 4.81 to 11.00%. The recoveries of CV were in the range of 98.60–116.69% with RSD values ranging from 2.86 to 14.17%. In summary, the SERS substrate COF@Ag NPs developed in this study showed certain promise and potential for the trace detection of MG and CV.

Table 1 Comparison of the SERS sensor developed in this study with previously reported SERS sensors for fungicide detection
Table 2 Recovery of MG and CV in fish extracts by SERS detection

Conclusions

In the present work, a novel SERS substrate COF@Ag NPs was synthesized for the adsorption and detection of fungicides. The porous surface of COFs not only effectively supported and stabilized Ag NPs, but also shortened the distances between fungicides and Ag NPs by adsorbing MG and CV through π–π stacking interactions. At the same time, Ag NPs could generate abundant “hot spots” for efficient detection of target molecules. The results of the experiment demonstrated that COF@Ag NPs had good repeatability (RSD = 6.18%), stability (RSD = 8.88%), and good enhancement after 50 days of storage at 4 °C. The COF@Ag NPs-based SERS substrate demonstrated low detection limits of 3.8 × 10−5 and 1.8 × 10−5 mg/L for MG and CV in standard solutions. Meanwhile, good linear relationships were observed in the determination of real samples. The limits of detections (LOD) for MG and CV were 4.5 × 10−5 mg/kg and 3.7 × 10−5 mg/kg in the range of 0.0001/0.002–10.0 mg/kg with the recoveries of 90.83–107.91% and 98.60–116.69% in the real samples, respectively. As a result, The COF@Ag NPs substrate is promising for utilization in food safety applications. Furthermore, the construction of SERS substrates inspires that the excellent performance of COFs will have a wide range of applications in the future.