1: What did you learn
I learned how to call components, write generic modules and how to complete a complete project step by step.
Learned how to request data and link it to page functions. Learned to implement local storage page transfer value
2: What is your progress
Progress: I have mastered some JS technologies more skillfully, and have made clear the specific application of many APIS through field use. In the process of implementing various functions I have a deeper influence on triggering events. The logic of writing code has been further improved. The ability to find bugs and solve them has improved.
3: What’s wrong with you
General module and component writing only understand a general, and did not have a deep grasp. There is still a bug in floor scrolling when the page height is too small
4: Summarize the business in the project that you have achieved
Login and registration: by obtaining the value entered by the user in the input box, the user determines whether the input meets the conditions with the regular first. When the conditions are met, the request is made and the returned data value is obtained to determine whether the registration/login is successful. The token obtained by the login is stored in the local storage method
Category page: first get the category content through the interface and render a navigation bar, then click the jump and spell the category label on the URL of the page to jump to. The url is intercepted in the jumping category page, and the category label is cut to obtain. Finally, judge the data and render the page according to the obtained classification tags
Details page: According to the data to obtain the commodity ID to realize the jump. Use tap toggle to switch pictures in the details page. Magnifying glass is implemented by hiding and enlarging the image to make it partially visible. Finally, an add shopping cart button is constructed and a shopping cart is added according to the token obtained by login and the commodity ID request interface.
Shopping cart: According to the local store token access account shopping cart data and render the page, traverse the delete, add, reduce the button click event, and, in turn, the corresponding binding requests for interface when the add or reduce the event success again request conts count for real-time update of commodity information quantity, finally add a judgement for reduce the click event, So that the quantity of goods must not be negative.
Search page: no technology, the basic interface is fully implemented, as long as you can get the input value is successful
5: Summarize the technical highlights of your project and elaborate
Lazy loading, bottom paging, one key back to the top.
These three are based on listening to the page scroll, lazy loading is by judging the height change of the picture to determine whether to display the correct content of the picture. Bottom page is listened to when the page scroll bottom is requested in the data page parameter ++ implementation page increase. One-click back to the top binds an element to a click event that causes the page height to zero.