美文网首页
Uncaught (in promise) Error: Req

Uncaught (in promise) Error: Req

作者: 祈澈菇凉 | 来源:发表于2021-07-15 14:34 被阅读0次
    POST http://localhost:8013/check/login 500 (Internal Server Error)
    createError.js:16 Uncaught (in promise) Error: Request failed with status code 500
        at createError (createError.js:16)
        at settle (settle.js:18)
        at XMLHttpRequest.handleLoad (xhr.js:59)
    

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

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

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

    修改之后的文件.env.development

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

    重新启动,恢复正常

    相关文章

      网友评论

          本文标题:Uncaught (in promise) Error: Req

          本文链接:https://www.haomeiwen.com/subject/whgppltx.html