High energy hint: there are more than 7000 interview questions at the end of the article, remember to take it away!

Everyone is a product manager

Hello everyone, I am a cute pig interview cycle, interview cycle launched, traffic and downloads can still pass. It’s a small number of users. Thank you very much for your support! Website :www.mianshiguaiquan.com (Full interview cycle)

Me? Small back-end RESEARCH and development, in the interview cycle of the “micro product”, from product, research and development, design, operation, multiple roles in one.

In addition to development, I love doing design and operations. The design is on par with Teacher Joe’s. Go the little fresh route.

Today, also skin, give yourself a product demand: limited time download.

Hunger marketing

I first heard about this concept from Xiaomi’s marketing program.

In daily life and work, often encounter such a phenomenon, buy a new car to pay a deposit waiting in line, buy a house to register first pay sincerity gold, often see what “limited edition”, “second kill” and other phenomena. In the material rich today, why there is a long queue, the phenomenon of short supply? The explanation is “rigid demand”. However, not all products are suitable for hunger marketing, the following analysis of hunger marketing.

Hunger marketing means that merchants take a large number of advertising promotion to arouse customers’ desire to buy, and then adopt hunger marketing means to make users wait hard, so as to increase their desire to buy, which is beneficial to raise the price of their products or lay a customer foundation for a large number of future sales.

For example, I went to the Tsla store in June for experience. The sales said that xx dollars can be reduced if you buy in June. The activity ends at the end of June. In early July, the same routine is repeated: the event is over by the end of July, so pre-order fast!

I trust you, you old man…

All right, I admit I’m that bad old man too! To highlight the need for resources. I gave myself a perverted request: a time-limited download.

Set an activity end time for the downloaded material. After the activity ends, the downloaded material cannot be downloaded.

Believe me! The event will open again! What kind of goods can be sold only once but not the second time? Hahaha…

Results show

Red 1 highlight resources are limited time download type, although a little ugly, for not good at the front end of me, also calculate beautiful —-

Red 2. The remaining time of the activity is dynamically timed. I will talk about how to make a dynamic display later.

Red 3. Mask resource information when the activity ends. Of course, the interface to block resource information is king! For professionals, not doing backend restrictions is easy to spot!

2 hours to achieve limited time download

Get! Open dry! 2 hours from design to test, how do I design and develop?

The development points mainly include four:

  • Assign an activity deadline to the resource
  • When expired, change the activity status to expired ②
  • The resource list does not display expired resources ③
  • The resource details page displays the activity end information (4)

The first point is a configuration function, set an activity deadline, such as 2021-7-15 10:10:10 end of the activity. Add a field to the database table: for example, deadline_time.

The third point filters out expired resources according to the status of the task, and increases the query condition is also SoEasy.

②, how to design?

1. You can use a scheduled task to check whether a task has expired. The downside, of course, is that status updates may not be timely. And they’re constantly testing it. Not a good idea!

2. Use a delay queue. When a timeout occurs, a status update event is triggered. This solves the problem of not updating the status in 1.

3. I use the third strategy. Implementation is particularly simple, when the user clicks on the resource details page, triggered to detect whether the resource expires, if the resource expires, update the status, but also an event processing mechanism.

The fourth point, how to do the activity countdown? With setInterval, this function fires an event every N milliseconds. Remember to call clearInterval at the end of the event to clear the scheduled task. Otherwise the loop is yours. The code can be referenced as follows:

Var timer = setInterval(function(){changeDeadlineTip(leftSeconds); If (--leftSeconds<0){// Clear the task executor clearInterval(timer); }}, 1000);Copy the code

Want to join in the limited download event?

Remember to pay attention to the public number [interview strange circle], programming together, play together!

Information Shared today

Download link:www.mianshiguaiquan.com/resource/fw…