Joke Collection Website - Blessing messages - What's the difference between logging in with honey code on the Internet and logging in with writer's phone?
What's the difference between logging in with honey code on the Internet and logging in with writer's phone?
The quick login function of mobile phone is to log in by SMS verification code. Compared with the login mode of user name and password, this mode is a popular login mode at present. Users don't need to remember their passwords, just enter their mobile phone numbers and get the verification code.
In order to obtain the verification code button binding event, check the mobile phone number in the corresponding processing function of the event. If the mobile phone number is entered correctly, a 30-second countdown effect will be displayed and an ajax request will be sent, and a short message verification code will be sent.
Provide send4Login method in ValidateCodeController, call SMS service to send verification code and save it to redis.
View code
Submit login request #
Bind an event to the login button.
& ltdiv class="btn yes-btn " >& lta @ click = " log in()" href = " # " & gt; log in
View code
Background code #
Controller #
Create a MemberController in the health_mobile project and provide a login method for login checking. The processing logic is as follows:
1. Check whether the SMS verification code entered by the user is correct. If the verification code is wrong, the login fails.
2. If the verification code is correct, judge whether the current user is a member, and if not, automatically complete the member registration.
3. Write a Cookie to the client with the contents of the user's mobile phone number.
4. Save the member information to Redis, and use the mobile phone number as the key for 30 minutes.
- Related articles
- How to send honey produced and sold by WeChat friends circle?
- How to set iphone full-screen floating characters
- Alipay called to close the repayment channel.
- What does it mean for a girl to call and send a blank message?
- Ask Baidu by SMS.
- When my 6300 Nokia recently selected ringtones from the memory card in profile-standard, it got stuck or even stuck when it came to the root directory of the memory card.
- What does CITIC Line Tone Type 3640 mean?
- How to delete Baidu Cloud SMS recovery history?
- Notice of close contacts looking for close contacts in Shen County, Liaocheng
- Subject 3 Night Light Simulation Exam Voice Prompts