A mobile terminal, comprising: a housing, provided with a tray installation hole; a circuit board, disposed inside the housing; a tray retention portion, disposed inside the housing, wherein the tray retention portion faces toward the circuit board; a card socket, disposed on the circuit board; a tray, movably disposed in the tray installation hole and movably mating with the tray retention portion, wherein at least the tray or the housing is provided with an ejection hole; a toggle piece, rotatably disposed at the tray retention portion and located between the card socket and the ejection hole, wherein one end of the toggle piece is an ejector pin action receiving end, the other end of the toggle piece is a tray ejection end, and the tray ejection end is used to apply an ejection force to the tray after a force is applied to the ejector pin action receiving end; and an elastic detection piece having a free end and a tray action receiving portion, the tray being capable of applying a driving force to the tray action receiving portion to separate the free end from a detection terminal, and under the action of an elastic restoring force of the elastic detection piece, the free end is in contact with the detection terminal; characterized in that the elastic detection piece and the detection terminal are disposed on the tray retention portion, wherein both the elastic detection piece and the detection terminal are located between the card socket and the tray installation hole; wherein the toggle piece, the detection terminal, and the elastic detection piece are arranged in order along a direction parallel to the width direction of the tray installation hole. a housing, provided with a tray installation hole; a circuit board, disposed inside the housing; a tray retention portion, disposed inside the housing, wherein the tray retention portion faces toward the circuit board; a card socket, disposed on the circuit board; a tray, movably disposed in the tray installation hole and movably mating with the tray retention portion, wherein at least the tray or the housing is provided with an ejection hole; a toggle piece, rotatably disposed at the tray retention portion and located between the card socket and the ejection hole, wherein one end of the toggle piece is an ejector pin action receiving end, the other end of the toggle piece is a tray ejection end, and the tray ejection end is used to apply an ejection force to the tray after a force is applied to the ejector pin action receiving end; and an elastic detection piece having a free end and a tray action receiving portion, the tray being capable of applying a driving force to the tray action receiving portion to separate the free end from a detection terminal, and under the action of an elastic restoring force of the elastic detection piece, the free end is in contact with the detection terminal; characterized in that the elastic detection piece and the detection terminal are disposed on the tray retention portion, wherein both the elastic detection piece and the detection terminal are located between the card socket and the tray installation hole; wherein the toggle piece, the detection terminal, and the elastic detection piece are arranged in order along a direction parallel to the width direction of the tray installation hole.