There is a problem with uniapp. When you compile to H5, you can get the data, but you can’t get the data in the WeChat applet
As shown in figure:


Then, at the prompt, add console.log to the relevant code to see the output
It turns out that there was an error adding a label to the element


Look at both sides of the console to find the reason:
H5:

WeChat applet:

The WeChat applet converts uppercase letters to lowercase
Fix: Change the data-trailerID in HBuilderX to all lowercase
As shown in figure:


Then, at the prompt, add console.log to the relevant code to see the output
It turns out that there was an error adding a label to the element


Look at both sides of the console to find the reason:
H5:

WeChat applet:

The WeChat applet converts uppercase letters to lowercase
Fix: Change the data-trailerID in HBuilderX to all lowercase
Read More:
- How to solve the problem of artifact contains illegal characters when creating springboot project with idea
- Method of ignoring case in Python string comparison
- SyntaxError: unexpected EOF while parsing
- 【error】postgresql relation does not exist
- Python conversion hex to string, high and low data processing
- Failed to execute ‘getComputedStyle’ on ‘Window’: parameter 1 is not of type ‘Element’.
- Linux (error 1819 (HY000): your password does not satisfy the current policy requirements)
- R language: na.fail and na.omit
- ValueError: need more than 0 values to unpack
- MySQL failed to add foreign key: SQL 1452 cannot add or update a child row:a foreign key constraint fails
- geom_ Warning message: sign function’s own error
- R language error in match.names (clabs, names(xi)) :
- Interesting undefined columns selected from read.table and read.csv
- 【EF】An error occurred while updating the entries. See the inner exception for details.
- Uncaught Error: _registerComponent(…): Target container is not a DOM element
- How to use dangerously set inner HTML in react
- Solution for iPhone wechat flash back with mysterious code
- [resolved] error: Java: illegal character: ‘\ ufef’ or error: Java: class, interface or enum required
- Curl HTTPS returned errno 35 (SSL connect error) error
- Selenium: 8 Ways to Locate Elements