Why can't the final console output work?

clipboard.png

Mar.12,2021

id and AccessToken are not both members of data ? Or where did you define it separately?


request asynchronously. Put the console print statement into the success callback to print


javaScript is not executed in the order you want

js is the
var that = this
wx data acquisition function to be executed
console
but the wx data acquisition function is not obtained now, but at some point in the future, js does not know when
and then js will continue to execute console

.

if you want to see console output, use console in success in wx.request
you can check out js micro-tasks, macro tasks and other knowledge points


clipboard.png
this part needs to concatenate your corresponding appid and secret key. In fact, this API should be implemented at the back end, and it is not safe to put it at the front end. Console is the fail entered by your request execution. You should be able to print in fail

.
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-1e54979-5a311.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-1e54979-5a311.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?