error!
在起本地服务时,可能会遇到登陆界面刷新成功,但登录时就会报以下图片上的错误,
这可能是因为服务器的ip更换了,但你并不知情。此时只需要找到config文件夹下的index.js文件,将api里面的target改成现在使用的正确ip即可。
'/api': {
// target:'http://49.213.60.30:80',
target:'https://tst-wwmap..com',
changeOrigin: true, // 支持跨域
// secure: false, // 支持 https
pathRewrite: {
'^/api': '/api' // 连接开发环境,走网关的那种
// '^/api/[a-zA-Z_]+/': '/' // 本地开发,不走网关,直接调本地服务
}
createError.js:16 Uncaught (in promise) Error: timeout of 20000ms exceeded at createError (createError.js:16) at XMLHttpRequest.handleTimeout (xhr.js:95)
POST http://localhost:8080/api/sys/sysLogin/emp/loginByNameOrPhoneForMany?_t=1625448272361 504 (Gateway Timeout)
LodopFuncs.js:51 GET http://localhost:18000/CLodopfuncs.js?priority=0 net::ERR_CONNECTION_REFUSED