For $n\geq1$, let $p_n>1$ and $D_n=\{0,a_n,b_n\}\subset \mathbb{Z}$, where $0 $\mu:=\delta_{p_1^{-1}\{0,a_1,b_1\}} \ast \delta_{p_1^{-1}p_2^{-1}\{0,a_2,b_2\}} \ast \cdots \ast \delta_{p_1^{-1}p_2^{-1}\cdots p_n^{-1}\{0,a_n,b_n\}} \ast \cdots$
which is generated by the sequence of integers $\{p_n\}_{n=1}^\infty$ and the sequence of number sets $\{D_n\}_{n=1}^\infty$. The author shows that when all digit sets are uniformly bounded, $\mu$ is a spectral measure if and only if the numbers of factors 3 in the sequence $\{\frac{p_1p_2\cdots p_n}{3{\rm gcd}(a_n,b_n)}\}_{n=1}^\infty$ are different from each other and $\{\frac{a_n}{{\rm gcd}(a_n,b_n)},\frac{b_n}{{\rm gcd}(a_n,b_n)}\}\equiv\{1,-1\}$ (mod 3) for all $n\geq1$.