Hello everyone, I am engaged in WeChat development.
Such as the title: How to avoid redeeming prizes multiple times when scanning the QR code or clicking the button to claim the prize.
There are two ways to redeem rewards in offline activities: 1. Scan the QR code 2. Click the redemption button.
No problems occurred during the test (a small company, just a few people testing).
Is this caused by user network problems, program loopholes, or logic problems....
Because there are 9 records with the same timestamp for one user...
I am currently using ajax to pass values. .
Hello everyone, I am engaged in WeChat development.
Such as the title: How to avoid redeeming prizes multiple times when scanning the QR code or clicking the button to claim the prize.
There are two ways to redeem rewards in offline activities: 1. Scan the QR code 2. Click the redemption button.
No problems occurred during the test (a small company, just a few people testing).
Is this caused by user network problems, program loopholes, or logic problems....
Because there are 9 records with the same timestamp for one user...
I am currently using ajax to pass values. .
You have submitted the form repeatedly, and there will be this problem. The web page can disable the button through js after clicking it. After the submission is successful, the ban will be ended and the click will be replied. QR code is the same thing
Each user has an openid. According to the openid, when the user opens the page, he first queries the interface to see if there is data in the database. If so, check this out and display it on the page. A sign indicates whether the prize has been redeemed. If you are interested in the prize individually, If there is a limit on the number, just limit the number of entries.
Isn’t it very easy? Mark the number of times you have redeemed the prize. When you click to deduct the lottery and return the result, another lottery will be naturally rejected because there is no number of times.
Just record the redemption information, openID is different