The problem of receiving values in the H5 interface and some JS problems.. (online, etc.)

problem 1: now the company is developing an activity that uses the H 5 interface to do it. Click on the pop-up window on the native app and enter my H5 interface. pass a user ID, ask me how my current H5 interface should receive the parameters passed by APP.

< hr >

question 2: first look at the picture
the user clicks a selection to add a crown to the current image , the user can only choose 3. the first click to select the golden crown, click again to select, then add a silver crown, in the choice of others, add a copper crown . And you can make the same choice. The first click is to add the crown, and the second click is to cancel the current crown. there are too many of the same num in this body (see figure..) That one.png is the style and picture of the crown ..


  1. APP should be passing parameters to the page in GET mode, right? It is similar to url.html?id=5&time=3835630 . There is an API called URLSearchParams, to check the specific usage of MDN.
  2. I don't understand. Please attach the effect picture of the page
  3. .

1. Depending on how you and app transfer data, the easiest thing is to use url to pass parameters to h5, or h5 interacts with the native, which requires you to call down the app method
2. When you click, you can judge whether there is an img tag under the .num node, add it if not, and delete


can you operate directly without login authorization information?

the simplest thing is to pass values by URL, but if login authorization information is required, URL values are not appropriate (insecure). A more appropriate way is to encrypt the login authorization information and put it into HTTP HEADER.

p.s. Upstairs is Douyin is not fun, or mobile phone is not fun, unexpectedly free to answer the SF question [manual dog head?]


there is a way that you can provide a function func to pass parameters to the user id, for the client to call. Just pass in the user id when the client invokes it.

function func (userId){
    //do something 
    //
}

Baidu is OK with this. https://blog.csdn.net/cs15229.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be8208-45e63.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be8208-45e63.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?