  BCH codes with efficient encoding and decoding algorithms have many
applications in communications, cryptography and combinatorics design. This
paper studies a class of linear codes of length $ \frac{q^m-1}{2}$ over
$\mathbb{F}_q$ with special trace representation, where $q$ is an odd prime
power. With the help of the inner distributions of some subsets of association
schemes from bilinear forms associated with quadratic forms, we determine the
weight enumerators of these codes. From determining some cyclotomic coset
leaders $\delta_i$ of cyclotomic cosets modulo $ \frac{q^m-1}{2}$, we prove
that narrow-sense BCH codes of length $ \frac{q^m-1}{2}$ with designed distance
$\delta_i=\frac{q^m-q^{m-1}}{2}-1-\frac{q^{ \lfloor \frac{m-3}{2}
\rfloor+i}-1}{2}$ have the corresponding trace representation, and have the
minimal distance $d=\delta_i$ and the Bose distance $d_B=\delta_i$, where
$1\leq i\leq \lfloor \frac{m+3}{4} \rfloor$.
