[Claude Code] After prompt #0

This commit is contained in:
2025-11-25 17:49:10 +08:00
parent 48ee6442b3
commit e272dc5e79
50 changed files with 2463 additions and 549 deletions

View File

@@ -65,3 +65,23 @@ export function getLevelIconUrl(level = 1): string {
return getIconUrl(`v${validLevel}-icon.svg`, 'achievement');
}
/**
* 根据等级获取等级图标URL
* @param level 等级1-6
* @returns 等级图标URL
*/
export function getLevelWordIconUrl(level = 1): string {
const validLevel = Math.max(1, Math.min(6, level)); // 限制在1-6之间
return getIconUrl(`v${validLevel}.svg`, 'achievement');
}
export function getLevelStarIconUrl(level = 1): string {
// 根据小数点判断 无小数点是v0-star.svg 有小数点是0.5 是v5-star.svg
// 转换浮点数
const floatLevel = parseFloat(level.toString());
// 小数点后的值 .1到.5
const decimal = floatLevel % 1;
const val = decimal * 10;
return getIconUrl(`v${val}-star.svg`, 'achievement');
}