我自己的是这么搞得、别人写的模板好高级我看不太懂

\usepackage{ctex}
\titleformat{\section}{\fangsong \zihao{4}}{\thesection}{1 em}{}{}
\titleformat{\subsection}{\heiti \zihao{-4}}{\thesubsection}{1 em}{}{}
\titleformat{\subsubsection}{\fangsong \zihao{-4}}{\thesubsubsection}{1 em}{}{}
\titlespacing*{\section}{0pt}{0.5\baselineskip}{0.5\baselineskip}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{0pt}{0pt}
\titlecontents{section}[0pt]{0pt}{\thecontentslabel \quad}{}{\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}
\titlecontents{subsection}[0pt]{0pt}{\thecontentslabel \quad}{}{\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}
\titlecontents{subsubsection}[0pt]{0pt}{\thecontentslabel \quad}{}{\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}
\dottedcontents{section}[1.24cm]{\zihao{-4} \songti}{1.8 em}{4pt}
\dottedcontents{subsection}[1.62cm]{\zihao{-4} \songti}{2.7 em}{4pt}
\dottedcontents{subsubsection}[1.93cm]{\zihao{-4} \songti}{3.4 em}{4pt}