The invention discloses a control method of an electronic lock of a locker. The electronic lock of the locker comprises a buckle box, a lock body and a key and is simple and reliable in structure. A
control switch is switched on, a first master control module of the key transmits a key code to a first
wireless receiving-transmitting module, a second
wireless receiving-transmitting module of the lock body receives the key code transmitted by the first
wireless receiving-transmitting module and transmits the key code to a second master control module, the second master control module compares the lock body code and the key code to control a circuit controller to be started or stopped, then an
electromagnet with a spring bolt is controlled to be powered on or off so as to drive the spring bolt to retract or extend into a spring bolt
insertion hole A, and then the electronic lock of the locker is unlocked or locked. According to the control method of the electronic lock of the locker, in cooperation with a
USB plug,
insertion type unlocking can be achieved, the lock body and the key are both provided with power supply devices, so that
remote control unlocking can be achieved, the unlocking manners are flexible, by setting multiple key codes for one key or setting multiple lock body codes for one lock body, it can be achieved that multiple keys unlock one lock body or one key unlocks multiple lock bodies at the same time, and therefore the control method of the electronic lock of the locker is convenient and efficient.