Uncaught (in promise) Error: Request failed with status code 500

痛定思痛。 2023-01-24 02:09 146阅读 0赞
  1. POST http://localhost:8013/check/login 500 (Internal Server Error)
  2. createError.js:16 Uncaught (in promise) Error: Request failed with status code 500
  3. at createError (createError.js:16)
  4. at settle (settle.js:18)
  5. at XMLHttpRequest.handleLoad (xhr.js:59)

02b5b20c46686a4d57a8dd93b34fbe00.png

今天登陆vue的项目的时候
发现了这样的一个报错
怎么也登录不上

仔细检查了一下自己写的代码
发现问题所在

142c9f80318177b486b7089fc29900e5.png

在配置代理的时候比较粗心
将VUE_APP_WS_API里面的链接写错了
应该在前面加上一个http://
不然无法使用proxy代理

修改之后的文件.env.development

  1. ENV = 'development'
  2. # 接口地址
  3. #VUE_APP_BASE_API = '/'
  4. VUE_APP_WS_API = 'http://192.168.4.103:8091/'
  5. # 是否启用 babel-plugin-dynamic-import-node插件
  6. VUE_CLI_BABEL_TRANSPILE_MODULES = true

重新启动,恢复正常

发表评论

表情:
评论列表 (有 0 条评论,146人围观)

还没有评论,来说两句吧...

相关阅读