The utility model discloses a lock, a lock, including the casing, the unlocking part and the locking piece that are all arranged in the casing, the movable link on the casing of fan beam, unlocking part corresponds the position of locking piece and is provided with the drive part, locking piece corresponds the position of drive part and is provided with the recess, the both sides wall of this recess cooperates with drive part, and with drive part movable drive locking piece movable to the locking position or unlocking position, the position of fan beam corresponds locking piece and is provided with the lock groove, is used for cooperation locking piece and inserts or leaves, forms the locking or unlocking of fan beam, the position of casing corresponds fan beam and is provided with the sliding block and first elastic part still, the sliding block is connected with first elastic part, and through first elastic part keeps the activity tendency of pushing fan beam and pops out, unlocking part corresponds the locking state when for locking state, and the activity of locking piece is limited. Can improve the problem of inconvenient unlocking operation, improve the use convenience.