In WeChat development, such as WeChat webpage authorized login, share to friends Circle custom content when paying with WeChat h5
You may encounter WeChat redirect_uri parameter errors.
In addition to checking the correctness of your code at this time, you also need to check whether the domain name of the official account backend is correctly set.
There are at least 3 pages in the WeChat backend where you can set a domain name, please check them all.
1. Interface permissions 》Web page authorization to obtain basic user information 》Modification
As shown below, this is the domain name where the WeChat web page is authorized to log in
2. Official Account Settings 》Function Settings 》JS Interface Security Domain Name Settings
As shown in the picture, here is the setting to call the js interface such as custom sharing content domain name
3. WeChat Payment 》Development Configuration 》Payment Authorization Directory Settings
As shown in the picture, here are the domain name settings for official account payment. On the same page, there are also settings for other modes of payment
If everything is configured correctly and it still doesn’t work, then you need to check the code for problems.