22 lines
559 B
Python
22 lines
559 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""
|
|
移除 App.vue 中所有的积分扣除逻辑
|
|
"""
|
|
|
|
import re
|
|
|
|
# 读取文件
|
|
with open(r'e:\Github\AIGC\aigc-ui\src\App.vue', 'r', encoding='utf-8') as f:
|
|
content = f.read()
|
|
|
|
# 移除所有的积分扣除代码块(包括注释和空行)
|
|
pattern = r'\n\s*// 扣除积分\n\s*deductCredits\(1\)\n'
|
|
content = re.sub(pattern, '\n', content)
|
|
|
|
# 写回文件
|
|
with open(r'e:\Github\AIGC\aigc-ui\src\App.vue', 'w', encoding='utf-8') as f:
|
|
f.write(content)
|
|
|
|
print("✅ 已移除所有积分扣除逻辑")
|