2. The number of solutions to the system of equations $\left\{\begin{array}{l}y=\mathrm{e}^{|x|}-\mathrm{e}, \\ || x|-| y||=1\end{array}\right.$ is
A. 5
B. 6
C. 7
D. 8
Solve:
As shown in the figure, the graph of $|| x|-| y||=1$ is symmetric about both the $x$ and $y$ axes, so it is only necessary to draw the graph of $|x-y|=1$ in the first quadrant; $y=\mathrm{e}^{|x|}-\mathrm{e}$ is an even function, so it is only necessary to draw the graph of $y=\mathrm{e}^{x}-\mathrm{e}$ for $x \geqslant 0$. From the graph, it can be seen that there are 6 solutions to the system of equations, so the answer is $B$.