fix: 更新开发环境的baseUrl配置,调整错误信息返回格式
This commit is contained in:
@@ -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/";
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user