ref : 重构令牌管理逻辑,,统一状态码识别

This commit is contained in:
TsMask
2025-04-27 17:23:33 +08:00
parent f76311cf1b
commit 2de9788373
23 changed files with 229 additions and 253 deletions

View File

@@ -52,7 +52,7 @@ const useNeInfoStore = defineStore('neinfo', {
async fnNelist() {
// 有数据不请求
if (this.neList.length > 0) {
return { code: 1, data: this.neList, msg: 'success' };
return { code: RESULT_CODE_SUCCESS, data: this.neList, msg: 'success' };
}
const res = await listAllNeInfo({
bandStatus: false,
@@ -79,7 +79,7 @@ const useNeInfoStore = defineStore('neinfo', {
async fnNeTaskPerformance() {
// 有数据不请求
if (this.perMeasurementList.length > 0) {
return { code: 1, data: this.perMeasurementList, msg: 'success' };
return { code: RESULT_CODE_SUCCESS, data: this.perMeasurementList, msg: 'success' };
}
const res = await getNePerformanceList();
if (res.code === RESULT_CODE_SUCCESS) {