Files
telegram-management-system/disable-captcha.js
你的用户名 237c7802e5
Some checks failed
Deploy / deploy (push) Has been cancelled
Initial commit: Telegram Management System
Full-stack web application for Telegram management
- Frontend: Vue 3 + Vben Admin
- Backend: NestJS
- Features: User management, group broadcast, statistics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 15:37:50 +08:00

30 lines
936 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 临时禁用验证码的脚本
const fs = require('fs');
const path = require('path');
const loginFilePath = path.join(__dirname, 'frontend-vben/apps/web-antd/src/views/_core/authentication/login.vue');
// 读取文件
let content = fs.readFileSync(loginFilePath, 'utf8');
// 备份原文件
fs.writeFileSync(loginFilePath + '.backup', content);
// 注释掉验证码相关的代码
content = content.replace(
/{\s*component:\s*markRaw\(SliderCaptcha\),[\s\S]*?}\s*,/,
`// {
// component: markRaw(SliderCaptcha),
// fieldName: 'captcha',
// rules: z.boolean().refine((value) => value, {
// message: $t('authentication.verifyRequiredTip'),
// }),
// },`
);
// 写回文件
fs.writeFileSync(loginFilePath, content);
console.log('✓ 验证码已临时禁用');
console.log(' 原文件已备份到: login.vue.backup');
console.log('\n要恢复验证码运行: node restore-captcha.js');