diff --git a/models/profile-lib/ArtisMark.js b/models/profile-lib/ArtisMark.js index 84457a7a..2320ea85 100644 --- a/models/profile-lib/ArtisMark.js +++ b/models/profile-lib/ArtisMark.js @@ -84,11 +84,14 @@ let ArtisMark = { }, getIncNum (title, value) { - let cfg = attrMap[attrNameMap[title]] - let min = Math.ceil(value / cfg.value) - let max = Math.floor(value / cfg.valueMin) - let avg = Math.round(value / (cfg.value + cfg.valueMin) * 2) - return Math.max(min, Math.min(max, avg)) + let cfg = attrNameMap[title] && attrMap[attrNameMap[title]] + if (cfg && cfg.value && cfg.valueMin) { + let min = Math.ceil((value / cfg.value).toFixed(1) * 1) + let max = Math.floor((value / cfg.valueMin).toFixed(1) * 1) + let avg = Math.round(value / (cfg.value + cfg.valueMin) * 2) + return Math.max(min, Math.min(max, avg)) + } + return 0 }, getMarkClass (mark) {