修改方法:experienceValue

This commit is contained in:
weinan2087
2022-10-15 20:23:47 +08:00
parent bdf2532c4a
commit 32a2ae849c

View File

@@ -273,59 +273,76 @@ export function experienceValue(total) {
percentage:null, percentage:null,
total, total,
} }
if(total < 300) { if(total < 300) {
data.start = 'LV1'; data.start = 'LV1';
data.end = 'LV2'; data.end = 'LV2';
data.endValue = 600; data.endValue = 600;
data.percentage = parseFloat((total / 600) * 100); data.percentage = parseFloat((total / 600) * 100);
} else if(total > 300 || total == 300 || total < 600){ return data;
data.start = 'LV2'; }
data.end = 'LV3'; if(total >= 300 && total < 600){
data.endValue = 1000; data.start = 'LV2';
data.percentage = parseFloat((total / 1000) * 1000); data.end = 'LV3';
} else if(total > 600 || total == 600 || total < 1000){ data.endValue = 1000;
data.start = 'LV3'; data.percentage = parseFloat((total / 1000) * 1000);
data.end = 'LV4'; return data;
data.endValue = 2000; }
data.percentage = parseFloat((total / 2000) * 100); if(total >= 600 && total < 1000){
} else if(total > 1000 || total == 1000 || total < 2000){ data.start = 'LV3';
data.start = 'LV4'; data.end = 'LV4';
data.end = 'LV5'; data.endValue = 2000;
data.endValue = 4000; data.percentage = parseFloat((total / 2000) * 100);
data.percentage = parseFloat((total / 4000) * 4000); return data;
} else if(total > 2000 || total == 2000 || total < 4000){ }
data.start = 'LV5'; if(total >= 1000 && total < 2000){
data.end = 'LV6'; data.start = 'LV4';
data.endValue = 8000; data.end = 'LV5';
data.percentage = parseFloat((total / 8000) * 100); data.endValue = 4000;
} else if(total > 4000 || total == 4000 || total < 8000){ data.percentage = parseFloat((total / 4000) * 4000);
data.start = 'LV6'; return data;
data.end = 'LV7'; }
data.endValue = 15000; if(total >= 2000 && total < 4000){
data.percentage = parseFloat((total / 15000) * 100); data.start = 'LV5';
} else if(total > 8000 || total == 8000 || total < 15000){ data.end = 'LV6';
data.start = 'LV7'; data.endValue = 8000;
data.end = 'LV8'; data.percentage = parseFloat((total / 8000) * 100);
data.endValue = 20000; return data;
data.percentage = parseFloat((total / 20000) * 100); }
} else if(total > 15000 || total == 15000 || total < 20000){ if(total >= 4000 && total < 8000){
data.start = 'LV8'; data.start = 'LV6';
data.end = 'LV9'; data.end = 'LV7';
data.endValue = 30000; data.endValue = 15000;
data.percentage = parseFloat((total / 30000) * 100); data.percentage = parseFloat((total / 15000) * 100);
} else if(total > 20000 || total == 20000 || total < 30000){ return data;
data.start = 'LV9'; }
data.end = 'LV10'; if(total >= 8000 && total < 15000){
data.endValue = 30000; data.start = 'LV7';
data.percentage = parseFloat((total / 30000) * 100); data.end = 'LV8';
} else if(total > 30000 || total == 30000){ data.endValue = 20000;
data.start = 'LV9'; data.percentage = parseFloat((total / 20000) * 100);
data.end = 'LV10'; return data;
data.endValue = 30000; }
data.percentage = parseFloat((total / 30000) * 100); if(total >= 15000 && total < 20000){
} data.start = 'LV8';
//console.log("&&&&&&&&&&&&&&&&&&&&&&&"); data.end = 'LV9';
//console.log(data); data.endValue = 30000;
data.percentage = parseFloat((total / 30000) * 100);
return data;
}
if(total >= 20000 && total < 30000){
data.start = 'LV9';
data.end = 'LV10';
data.endValue = 30000;
data.percentage = parseFloat((total / 30000) * 100);
return data;
}
if(total >= 30000){
data.start = 'LV10';
data.end = '';
data.endValue = 90000;
data.percentage = parseFloat((total / 90000) * 100);
return data;
}
return data; return data;
} }
export function translate(field) { export function translate(field) {