1. In a Cartesian coordinate system, the two legs of a right triangle are parallel to the two coordinate axes, and the lines on which the two legs lie have the equations $y=3 x+1$ and $y=m x+2$, respectively. Then the value of the real number $m$ is $\qquad$.
II. $1 . \frac{3}{4}$ or 12 .
Let the lengths of the sides of the right triangle parallel to the $x$-axis and $y$-axis be $a, b$, respectively, then
$$
\left\{\begin{array}{l}
m=\frac{\frac{1}{2} b}{a}, \\
3=\frac{b}{\frac{1}{2} a} \text { or }
\end{array}\left\{\begin{array}{l}
m=\frac{b}{\frac{1}{2} a}, \\
3=\frac{\frac{1}{2} b}{a} .
\end{array}\right.\right.
$$

Solving gives $m=\frac{3}{4}$ or $m=12$.