"Not in the list of legal domain names for the following request" mini program error resolution


When developing small programs, when using WeChat developer tools to make network requests, debugging errors will occur, prompting "It is not in the following request legal domain name list, please refer to the document" https://developers.weixin.qq.com/miniprogram/ dev/framework/ability/network.html
It can definitely be solved by looking at the official document. I will simplify the content in the document as follows.


Solution:
1) Log in to your WeChat public platform https://mp.weixin.qq.com
2) Open the server domain name

3) Set the request domain name

Just enter it here
4) WeChat Mini Program Tool->Details->Domain Name Information (the first time you use it, it will show that it is not set)

5) Restart the WeChat development tools (this step is very important, otherwise an error will still be reported)


————————————————
Original link: https://blog.csdn.net/qq_27674439/article/details/115554071

Guess you like

Origin blog.csdn.net/weixin_42565127/article/details/133990725