1. This time mainly involves data interaction at the front and back end
jquery Tutorial:
Http://www.w3school.com.cn/jquery/index.asp
2. Project Address: Https://github.com/digitalClass/web_page
Site Address: http://115.28.30.25:8029/
3. Description of Business logic:
The tentative idea is this:
After the user clicks Submit, the front end will post the comment content and user userid to the backend,
the temporarily scheduled route is /addcomments/and can be modified
So in addition to some of the data provided at the beginning of the backend,
Also related to the backend need to login user userid and login user username These two properties, easy to display data after the front-end submission
The backend needs to return a JSON data structure:
Where if the successful code tag is 0, if code is not 0, the front end will consider the commit unsuccessful
Shaped like:
{' Code ': 0}
At the same time, the backend can return a MSG field to represent the error message \
Shaped like:
{' msg ': ' Unknown Error '}
4. Display effect
Comment Page
Error message:
Comments Dynamic Loading effect:
Front-end development--Play page comment area business logic Preliminary