(m: CaptchaMode)
| 810 | return { |
| 811 | [CaptchaMode.MATH]: "算术验证", |
| 812 | [CaptchaMode.TEXT]: "关键词验证", |
| 813 | [CaptchaMode.IMG_DIGIT]: "图片验证(纯数字)", |
| 814 | [CaptchaMode.IMG_MIXED]: "图片验证(字母+数字)", |
| 815 | }[m] ?? m; |
| 816 | } |
| 817 | |
| 818 | function mathQuestion(): { question: string; answer: string } { |
| 819 | const rand = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1)) + min; |
| 820 | const type = rand(0, 5); |
| 821 | |
| 822 | if (type === 0) { |