Ranking list issue

WBOY
Release: 2016-10-17 09:30:13
Original
1023 people have browsed it

Ranking list <vacant position> issue

The rules are as follows:
The 1-3 positions will be vacant at the beginning of the event.
When a user reaches the specified number of likes (that is, the number of With what idea?
Looking for ideas...
It would be better if there is a demo...

Reply content:

Ranking list <vacant position> issue

The rules are as follows:

The 1-3 positions will be vacant at the beginning of the event.
When a user reaches the specified number of likes (that is, the number of With what idea?
Looking for ideas...
It would be better if there is a demo...

Depends on whether you want the user to update in real time without leaving the page, or whether the user can see the update only after entering again. It should be easy to enter again. First check whether there are 1-3 data in the data. If not, just append to the third li of ul. If there is, just empty ul directly and fill in the entire ul. If you use some mvvm framework, as long as the data changes, the dom will be automatically updated, and there is no need to go to js to change the dom

If there are no satisfied users among the top three, you tell the front-end to use the default avatar and nickname

ajax makes regular requests to detect whether the back-end data meets the requirements. When the data meets the requirements, the relevant information will be returned

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

    Does this activity have a separate activity data sheet?
  1. When the user enters or refreshes this page, read the data in the database. The user table should have a field for the number of likes. According to this field
  2. order by

    , read it out in descending order, and leave the top two empty.

  3. I don’t know if this is what I understand?

ajax scheduled request.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template