uniapp——Android 异常: failed to connect to localhost/127.0.0.1

Bug solution - carry appears:

Waiting to navigate to: /pages/……, do not operate continuously: /pages/……

failed to connect to localhost/127.0.0.1

Solution:

  • My error: mainly caused by failed to connect to localhost/127.0.0.1 Waiting to navigate to: /pages/……, do not operate continuously: /pages/……
  • failed to connect to localhost/127.0.0.1 The problem is that there is an error in the configuration of the request
  • When we run the uniapp project to the mobile phone custom base to request data from the backend, it does not need to be configured as a local host (http://localhost:...)
  • Just use the local ip address requested by the backend server directly

  •  Here I changed http://localhost:... to http://192.168.1.8:... (the path of the local ip address)

 

Guess you like

Origin blog.csdn.net/qq_45796592/article/details/131303660