fix: 更新开发环境的baseUrl配置,调整错误信息返回格式

This commit is contained in:
2026-05-20 13:27:18 +08:00
parent 0fbea2d669
commit 059017e787
2 changed files with 4 additions and 3 deletions

View File

@@ -3,8 +3,8 @@ let socketUrl = "";
if (process.env.NODE_ENV === 'development') {
//开发环境
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试
baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.131:9200/pb/"; // 后端本地
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
baseUrl = "http://192.168.110.131:9200/pb/"; // 后端本地
} else if (process.env.NODE_ENV === 'production') {
//生产环境
baseUrl = "https://api.nuttyreading.com/";

View File

@@ -307,7 +307,8 @@ $http.dataFactory = async function(res) {
// 返回错误的结果(catch接受数据)
return Promise.reject({
statusCode: 0,
errMsg: "【request】" + (httpData.info || httpData.msg),
// errMsg: "【request】" + (httpData.info || httpData.msg),
errMsg: (httpData.info || httpData.msg),
data: res.data
});
}