HCQ小小码农
HCQ小小码农
  • 发布:2021-12-21 23:36
  • 更新:2021-12-21 23:36
  • 阅读:988

【报Bug】uni.request 发起后台请求时多了一个localhost的链接,这是怎么回事?是哪里配置加多了东西吗

分类:HBuilderX

产品分类: HbuilderX

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: window10 家庭版

HBuilderX版本号: 3.3.2

App下载地址或H5⽹址: 1

示例代码:

"h5" : {
"title" : "会员中心",
"template" : "",
"domain" : "localhost",
"router" : {
"mode" : "hash",
"base" : "./"
},
"publicPath" : "./",
"devServer" : {
"disableHostCheck" : true, //禁止访问本地host文件

        // "https" : true,  
        // "port" : 8080,  
        "proxy" : {  
            "/api" : {  
                "target" : "http://192.168.100.6:8800", //  
                "changeOrigin" : true, //是否跨域  
                "secure" : false, // 是否支持 https 协议的代理  
                "ws" : false,  
                "pathRewrite" : {  
                    "^/api" : ""  
                }  
            }  
        },  
        "port" : 8800,  
        "https" : false  
    }

操作步骤:

POST http://localhost:8803/192.168.100.6:8800/client/user/doLogin net::ERR_CONNECTION_REFUSED
```执行过打包操作

预期结果:

1

实际结果:

1

bug描述:


POST http://localhost:8803/192.168.100.6:8800/client/user/doLogin net::ERR_CONNECTION_REFUSED
```执行过打包操作  
这是发起后台数据请求时候显示的URL,  
比我配置的多出了一个  http://localhost:8803/  
昨天晚上还好好的,  
2021-12-21 23:36 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复