Rankings <waiting>

Source: Internet
Author: User
The rule is as follows: at the beginning of the activity, 1-3 members are waiting. when a user reaches the specified number of likes (that is, the number of times on the right), the user can change the value. excuse me, what should I do when writing such rankings? Thinking... if a demo is better...

The rule is as follows:
At the beginning of the activity, 1-3 members were waiting,
When a user reaches the specified number of likes (that is, the number of times on the right), the user can replace the false ones,
What should I do if I write such a ranking?
Thinking...
If a demo is better...

Reply content:

The rule is as follows:
At the beginning of the activity, 1-3 members were waiting,
When a user reaches the specified number of likes (that is, the number of times on the right), the user can replace the false ones,
What should I do if I write such a ranking?
Thinking...
If a demo is better...

Check whether you want to see the update only after the user enters the page again without leaving the page. It should be easy to re-enter. First, check whether there are 1-3 pieces of data in the data. if there is no such data, append the data to the end of ul's third li. If yes, empty ul directly, fill in the entire ul. If you use some mvvm frameworks, the dom will be automatically updated as long as the data changes, and you do not need to change the dom in js.

If the top three users are not satisfied, tell the front-end to use the default avatar and nickname.

Ajax regularly sends requests to check whether the backend data meets the requirements. when the data meets the requirements, the relevant information is returned.

The subject means that this is not refreshed in real time on the page? This is easy to handle.

  1. Is there a separate activity data table for this activity?

  2. When you enter or refresh this page, read the data in the database. the user table should have a like field, according to this like digit segment.order byIn descending order, read the first twoWaiting

I don't know if I understand this?

Ajax timed request.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.