小程序本地调试正常,真机调试也是正常的,为什么上传后出现网络请求错误,这是什么问题?

小程序 文章 2022-01-18 18:20 1588 0 全屏看文

AI助手支持GPT4.0

小程序本地调试正常,真机调试也是正常的,为什么上传后出现网络请求错误,这是什么问题?The local debugging of the applet is normal, and the real machine debugging is also normal. Why is there a network request error after uploading? What is the problem?

小程序本地调试正常,真机调试也是正常的,为什么上传后出现网络请求错误,这是什么问题?

系统代码都已经部署在阿里云服务器上了,本地调用服务器上的域名和API,真机调试也是正常,但上传后显示“网络请求错误”这是为什么啊?

The system code has been deployed on Alibaba cloud server. The domain name and API on the server are called locally. The real machine debugging is also normal, but the "network request error" is displayed after uploading. Why?

回答:

张老师13674929319:

越努力,越幸运:你这种情况去检查
1:服务器域名是否配置request合法域名
2:域名是否支持https协议
调式正常,正式环境就出错,基本就是这两点原因导致的
越努力,越幸运:

检查小程序平台的服务器域名是否配置

建议微信开发工具将【不校验合法域名、web-view(业务域名)、TLS版本一级HTTPS证书】的勾选去掉,然后再看看工具是否报错

神奇的桑桑😄😄😄:

方便截个图看看吗?

张老师13674929319:

-EOF-

AI助手支持GPT4.0