I was numb to the management system before
I didn’t adapt very well at the beginning of an Internet company
It’s been a week, just a week, and I learned a lot
Let me add an event sharing function today
Master Jin asked me to add a " simple" function
Said to realize the function of sharing the following page, it is to provide you with a page. When you click the share button, save the user's mobile phone number with the professional.
OK, this is the function, and then I briefly talked about how to do it, I was confused.
It is said that the mobile terminal test needs to download a packet capture tool. Charles, I'm blind, what the hell
Simply download the installation package and install it.
The simple understanding is that you can debug with f12 for the pc web browser, but you can't read the http request sent by the mobile phone, you need to use tools.
It took a long time to understand clearly
The page is a static html created by the front end and the design. I updated it through svn.
Sharing is divided into four situations
① Open the sharing page on the mobile phone: Determine whether the http User-Agent request header contains everstar, and it means that it is inside the app.
1) If there is a value inside, see if the username has a value, and if so, save it.
2) The username value is empty, that is, it is opened in the external browser of the mobile phone, and it prompts that you need to log in first before sharing.
②If the http request header does not contain everstar, it means that it is opened on the PC web side
1) Have its own tool class, according to the request to obtain whether the current user is empty, there is value for sharing and saving data operations.
2) The current user obtained is null, jump to the login page, and then the url is in such a situation as action.do?/goUrl=newAction.do.
Thanks to his usual accumulation for a year, otherwise he would have been fucking out. Firmly believe: What you pay will not be in vain, there are certain reasons.