diff --git a/web/src/views/RiskRules.vue b/web/src/views/RiskRules.vue index 0299feb..d77dd1d 100644 --- a/web/src/views/RiskRules.vue +++ b/web/src/views/RiskRules.vue @@ -92,7 +92,7 @@ 考核周期 {{ rule.threshold }}天 下载量 ≥ {{ rule.threshold }}GB 时分享率 ≥ {{ rule.minRatio }} - 永久保留 ≥ {{ rule.permRank || '—' }} / 封存豁免 ≥ {{ rule.sealExemptRank || '—' }} + 永久保留 ≥ {{ rankDisplay(rule.permRank) }} / 封存豁免 ≥ {{ rankDisplay(rule.sealExemptRank) }} {{ metricLabel(rule.metric) }} {{ condLabel(rule.condition) }} {{ rule.threshold }}{{ rule.unit || '' }} → {{ rule.type==='EXEMPT' ? '保号' : '封号/删除账号' }} @@ -143,12 +143,16 @@ @@ -230,6 +234,18 @@ const applicableOptions = [ { value: 'zero_traffic', label: '零流量用户' }, { value: 'new_account_30d', label: '注册 ≤30 天' }, ] +const rankOptions = [ + { level: 0, value: 'Peasant', label: 'Peasant' }, + { level: 1, value: 'User', label: 'User' }, + { level: 2, value: 'Power User', label: 'Power User' }, + { level: 3, value: 'Elite User', label: 'Elite User' }, + { level: 4, value: 'Crazy User', label: 'Crazy User' }, + { level: 5, value: 'Insane User', label: 'Insane User' }, + { level: 6, value: 'Veteran User', label: 'Veteran User' }, + { level: 7, value: 'Extreme User', label: 'Extreme User' }, + { level: 8, value: 'Ultimate User', label: 'Ultimate User' }, + { level: 9, value: 'Nexus Master', label: 'Nexus Master' }, +] const metricOptions = [ { value: 'days_since_last_login', label: '距上次登录天数' }, { value: 'days_since_last_traffic', label: '距上次流量变化天数' }, @@ -255,6 +271,12 @@ const typeDefaults = { const metricLabel = (m) => metricOptions.find(x => x.value === m)?.label || m || '' const condLabel = (c) => condOptions.find(x => x.value === c)?.label || c || '' +const rankDisplay = (v) => { + if (!v) return '—' + const r = rankOptions.find(x => x.value === v) + return r ? `${r.level}. ${r.value}` : v +} + const taskReqDefaults = [ { metric:'upload_gb', label:'上传量', threshold:10, unit:'GB', condition:'GTE' }, { metric:'download_gb', label:'下载量', threshold:10, unit:'GB', condition:'GTE' }, @@ -318,7 +340,7 @@ const presetCategories = [ const presetDesc = (p) => { if (p.type === 'TASK') return `考核周期 ${p.threshold||30} 天,需满足上传/下载/魔力值/做种积分/做种时间要求` if (p.type === 'DRATIO') return `下载量 ≥ ${p.threshold||100}GB 时分享率 ≥ ${p.minRatio||1.0}` - if (p.type === 'EXEMPT') return `永久保留 ≥ ${p.permRank||'—'} / 封存豁免 ≥ ${p.sealExemptRank||'—'}` + if (p.type === 'EXEMPT') return `永久保留 ≥ ${rankDisplay(p.permRank)} / 封存豁免 ≥ ${rankDisplay(p.sealExemptRank)}` const condLabel = condOptions.find(c => c.value === p.condition)?.label || p.condition const appLabel = applicableOptions.find(a => a.value === p.applicable)?.label || '' return `${metricOptions.find(m=>m.value===p.metric)?.label||p.metric} ${condLabel} ${p.threshold}${p.unit||''}${appLabel?' ('+appLabel+')':''}`