fix: 请求结果msg取多语言
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_ERROR,
|
||||
} from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { language, request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ export async function updateConfig(tag: string, data: Record<string, any>) {
|
||||
delete result.data;
|
||||
return result;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
RESULT_MSG_ERROR,
|
||||
RESULT_MSG_SUCCESS,
|
||||
} from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { parseFirstLower, parseObjLineToHump } from '@/utils/parse-utils';
|
||||
import { language, request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
* 查询配置参数标签栏
|
||||
@@ -335,7 +335,7 @@ export async function getParamConfigInfoForm(
|
||||
result.data.data = dataArray;
|
||||
|
||||
// 无数据时,用于新增
|
||||
result.data.dataRule = { title: `Index-0`, key: 0, record : ruleArr} ;
|
||||
result.data.dataRule = { title: `Index-0`, key: 0, record: ruleArr };
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ export async function updateNeConfigReload(neType: string, neId: string) {
|
||||
} else if (str.indexOf('success') !== -1) {
|
||||
delete result.data;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
RESULT_CODE_SUCCESS,
|
||||
RESULT_MSG_ERROR,
|
||||
} from '@/constants/result-constants';
|
||||
import { request } from '@/plugins/http-fetch';
|
||||
import { language, request } from '@/plugins/http-fetch';
|
||||
import { parseObjLineToHump } from '@/utils/parse-utils';
|
||||
|
||||
/**
|
||||
@@ -117,7 +117,7 @@ export async function sendNeSoftware(data: Record<string, any>) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,7 +136,7 @@ export async function runNeSoftware(data: Record<string, any>) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,7 +155,7 @@ export async function backNeSoftware(data: Record<string, any>) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR[language] };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user