Skip to content

Commit b820563

Browse files
committed
feat(fb): 更新版本管理与界面优化
1 parent ba4b7c8 commit b820563

6 files changed

Lines changed: 30 additions & 19 deletions

File tree

facebook/FB_status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def initUI(self):
228228
title_container = QWidget()
229229
title_container.setFixedHeight(40) # 设置标题栏高度
230230
title_container.setStyleSheet(
231-
"background-color: #e0e5e0; border-top-left-radius: 8px; border-top-right-radius: 8px;")
231+
"background-color: #e4eee9; border-top-left-radius: 8px; border-top-right-radius: 8px;")
232232

233233
title_bar = QHBoxLayout(title_container)
234234
title_bar.setContentsMargins(15, 0, 15, 0)

facebook/FBmain.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ async def getusers(self):
552552
await self.robust_update_status(f"社團名:{self.groups_name} 社團人數:{self.groups_num}")
553553
except Exception as e:
554554
print(f"提取社团信息时出错: {str(e)}")
555-
await self.robust_update_status("开始爬取用户信息...")
555+
await self.robust_update_status("開始爬取用戶信息...")
556556
# 滚动加载更多用户
557557
previous_count = 0
558558
current_count = 0
@@ -676,7 +676,7 @@ async def getusers_fans(self):
676676
await self.robust_update_status(f"粉絲專頁名:{self.groups_name} 粉絲人數:{self.groups_num}")
677677
except Exception as e:
678678
print(f"提取粉丝专页信息时出错: {str(e)}")
679-
await self.robust_update_status("开始爬取用户信息...")
679+
await self.robust_update_status("開始爬取用戶信息...")
680680
# 滚动加载更多用户
681681
previous_count = 0
682682
current_count = 0
@@ -912,8 +912,8 @@ async def sponsor_like_click(self, selector):
912912

913913
async def get_sponsor_user(self):
914914
"""修正版:获取赞助帖子的点赞用户"""
915-
print("开始获取赞助帖子用户...")
916-
await self.robust_update_status("开始获取赞助帖子用户...")
915+
print("開始獲取贊助帖子用戶......")
916+
await self.robust_update_status("開始獲取贊助帖子用戶...")
917917

918918
# 初始化变量(移到循环外)
919919
previous_count = 0

facebook/FBreptilever.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import requests
66
import os
77
import sys
8+
import json
89
import subprocess
910
import threading
1011
from tkinter import messagebox
@@ -185,8 +186,11 @@ def download_file_with_progress_http(url, local_path, progress_var, progress_lab
185186

186187

187188
async def check_version():
188-
version = '1.0.0.4'
189-
remote_version_url = 'http://ver.ry188.vip/API/getver.aspx?N=FBreptile'
189+
with open('config.json', 'r', encoding='utf-8') as f:
190+
conig = json.load(f)
191+
version = conig['version']
192+
print("当前版本:", version)
193+
remote_version_url = 'http://ver.ry188.vip/API/getver.aspx?N=FBreptile'
190194

191195
async with aiohttp.ClientSession() as session:
192196
async with session.get(remote_version_url, headers=headers) as response:

facebook/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "1.0.0.5"
3+
}

facebook/file_version_info.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ VSVersionInfo(
66
ffi=FixedFileInfo(
77
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
88
# Set not needed items to zero 0.
9-
filevers=(1, 0, 0, 4),
10-
prodvers=(1, 0, 0, 4),
9+
filevers=(1, 0, 0, 5),
10+
prodvers=(1, 0, 0, 5),
1111
# Contains a bitmask that specifies the valid bits 'flags'r
1212
mask=0x3f,
1313
# Contains a bitmask that specifies the Boolean attributes of the file.
@@ -33,14 +33,14 @@ VSVersionInfo(
3333
[StringStruct('Comments', ''),
3434
StringStruct('CompanyName', ''),
3535
StringStruct('FileDescription', 'FBreptilever'),
36-
StringStruct('FileVersion', '1.0.0.4'),
36+
StringStruct('FileVersion', '1.0.0.5'),
3737
StringStruct('InternalName', 'FBreptilever.exe'),
3838
StringStruct('LegalCopyright', 'Copyright © 2025'),
3939
StringStruct('LegalTrademarks', ''),
4040
StringStruct('OriginalFilename', 'FBreptilever'),
4141
StringStruct('ProductName', 'FBreptilever'),
42-
StringStruct('ProductVersion', '1.0.0.4'),
43-
StringStruct('Assembly Version', '1.0.0.4')])
42+
StringStruct('ProductVersion', '1.0.0.5'),
43+
StringStruct('Assembly Version', '1.0.0.5')])
4444
])
4545
]
4646
)

facebook/layout.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import os
23
import sys
34
from PyQt5.QtWidgets import (
@@ -81,19 +82,19 @@ def _init_ui(self):
8182
# 版本信息标签放置于导航底部
8283
self.version = versions
8384
self.day = days
84-
version_label = QLabel(f"版本: {self.version}")
85-
version_label.setFont(QFont("微軟雅黑", 8))
86-
version_label.setStyleSheet("color: #999;")
87-
version_label.setAlignment(Qt.AlignHCenter)
88-
nav_layout.addWidget(version_label)
89-
9085
day_label = QLabel(f"剩余: {self.day} 天")
9186
day_label.setFont(QFont("微軟雅黑", 8))
9287
day_label.setStyleSheet("color: #999;")
9388
day_label.setAlignment(Qt.AlignHCenter)
9489
nav_layout.addWidget(day_label)
9590
nav.setLayout(nav_layout)
9691

92+
version_label = QLabel(f"版本: {self.version}")
93+
version_label.setFont(QFont("微軟雅黑", 8))
94+
version_label.setStyleSheet("color: #999;")
95+
version_label.setAlignment(Qt.AlignHCenter)
96+
nav_layout.addWidget(version_label)
97+
9798
# 右侧内容区域容器
9899
right_content_container = QWidget()
99100
right_content_container.setStyleSheet("QWidget { background-color: #fefbf8; }")
@@ -246,5 +247,8 @@ def resource_path(relative_path):
246247
base_path = os.path.abspath(".")
247248
return os.path.join(base_path, relative_path)
248249
if __name__ == '__main__':
249-
main("1.0.0.0", 1)
250+
with open('config.json', 'r', encoding='utf-8') as f:
251+
conig = json.load(f)
252+
version = conig['version']
253+
main(version, 1)
250254

0 commit comments

Comments
 (0)