I am developing a voting system and need to identify the number of user votes based on the user's openid. Problem: I can get the openid through the public account subscription and click events, and then I will save the openid to the cookie or session immediately. Then, when other webpages are opened, this cookie or... I am developing a voting system and need to identify the number of user votes based on the user's openid.
Problem:
I can get the openid through the public account subscription and click events, and then I save the openid to the cookie or session immediately. Then, when other webpages are opened, the cookie or session value is empty. Is there any way to save the openid for other pages of the project?
Then I saw another subscriber account also performing a voting activity. It didn't even have a custom menu. After paying attention to it, I posted a text message, after entering the address, you can determine the number of votes on this number. In addition, this address cannot be voted if it is entered elsewhere, so it should have been determined by the openid. I have read his jump address and did not include the openid parameter, so how does he store this openid for other pages?
This public account is a baby voting activity in "Eat all over Foshan". Can anyone explain it to me ??? Urgent...
Reply content:
I am developing a voting system and need to identify the number of user votes based on the user's openid.
Problem:
I can get the openid through the public account subscription and click events, and then I save the openid to the cookie or session immediately. Then, when other webpages are opened, the cookie or session value is empty. Is there any way to save the openid for other pages of the project?
Then I saw another subscriber account also performing a voting activity. It didn't even have a custom menu. After paying attention to it, I posted a text message, after entering the address, you can determine the number of votes on this number. In addition, this address cannot be voted if it is entered elsewhere, so it should have been determined by the openid. I have read his jump address and did not include the openid parameter, so how does he store this openid for other pages?
This public account is a baby voting activity in "Eat all over Foshan". Can anyone explain it to me ??? Urgent...
I have just finished voting for over 400 million votes.
The authenticated public accounts can be used for authorized login. In this mode, only openid is obtained for non-logon users.
Authorization to obtain user information
Then, use the openid to obtain the followers information to determine whether the followers are followed,
If you pay attention to it, you will vote. If you do not pay attention to it, you will first pay attention to it.
Other specific practices, I think you can.
LocalStorage?
Method 1: directly put in input type = "hidden"
Method 2: Put in cookie
Method 3: Put it in the session
Method 4: Put in memcache and other caches
Er, er, there should be something to add downstairs.
For the same account, each user's openid is the same and can be stored persistently or temporarily as needed.
In the voting system, you 'd better record the openid to the database, which can limit the number of votes and prevent ticket swiping. If you exist locally, the user who uses the voting system clears the browser cache, it's useless.
For sessions, cookies, and localStrong on other pages