H5运行正常,真机运行和打包报错,确定地址接口无误,标准http:\ip
"errMsg": "request:fail abort statusCode:-1 Expected URL scheme 'http' or 'https' but was 'file'"
H5运行正常,真机运行和打包报错,确定地址接口无误,标准http:\ip
"errMsg": "request:fail abort statusCode:-1 Expected URL scheme 'http' or 'https' but was 'file'"
配置了跨域,H5没问题,app运行报错
解决:配置app的单独的请求地址
在地址环境配置这里
if(process.env.NODE_ENV === 'development'){
//开发环境
// #ifdef H5
//我的是baseURL 用的是luch-request
//你的可能是 Vue.prototype.$baseUrl
baseUrl = "/api"
// #endif
// #ifdef APP-PLUS ||MP
baseUrl = "http://192.xx.0.116:8000/"
// #endif
}else{
baseUrl = "https://xxx"
}
5***@qq.com
请问解决了吗?
2021-06-01 19:24