fix 签到插件详情
This commit is contained in:
parent
1828480442
commit
764fdb93e9
@ -270,10 +270,55 @@ class AutoSignIn(_PluginBase):
|
|||||||
current_day = ""
|
current_day = ""
|
||||||
sign_data = []
|
sign_data = []
|
||||||
for day in date_list:
|
for day in date_list:
|
||||||
current_day = datetime.now().strftime('%Y-%m-%d')
|
current_day = datetime.now().strftime('%-m月%-d日')
|
||||||
sign_data = self.get_data(current_day)
|
sign_data = self.get_data(current_day)
|
||||||
if sign_data:
|
if sign_data:
|
||||||
break
|
break
|
||||||
|
if sign_data:
|
||||||
|
contents = [
|
||||||
|
{
|
||||||
|
'component': 'tr',
|
||||||
|
'props': {
|
||||||
|
'class': 'text-sm'
|
||||||
|
},
|
||||||
|
'content': [
|
||||||
|
{
|
||||||
|
'component': 'td',
|
||||||
|
'props': {
|
||||||
|
'class': 'whitespace-nowrap break-keep'
|
||||||
|
},
|
||||||
|
'text': current_day
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'component': 'td',
|
||||||
|
'text': data.get("site")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'component': 'td',
|
||||||
|
'text': data.get("status")
|
||||||
|
}
|
||||||
|
]
|
||||||
|
} for data in sign_data
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
contents = [
|
||||||
|
{
|
||||||
|
'component': 'tr',
|
||||||
|
'props': {
|
||||||
|
'class': 'text-sm'
|
||||||
|
},
|
||||||
|
'content': [
|
||||||
|
{
|
||||||
|
'component': 'td',
|
||||||
|
'props': {
|
||||||
|
'colspan': 3,
|
||||||
|
'class': 'text-center'
|
||||||
|
},
|
||||||
|
'text': '暂无数据'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
'component': 'VTable',
|
'component': 'VTable',
|
||||||
@ -300,31 +345,7 @@ class AutoSignIn(_PluginBase):
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'tbody',
|
'component': 'tbody',
|
||||||
'content': [
|
'content': contents
|
||||||
{
|
|
||||||
'component': 'tr',
|
|
||||||
'props': {
|
|
||||||
'class': 'text-sm'
|
|
||||||
},
|
|
||||||
'content': [
|
|
||||||
{
|
|
||||||
'component': 'td',
|
|
||||||
'props': {
|
|
||||||
'class': 'whitespace-nowrap break-keep'
|
|
||||||
},
|
|
||||||
'text': current_day
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'component': 'td',
|
|
||||||
'text': data.get("site")
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'component': 'td',
|
|
||||||
'text': data.get("status")
|
|
||||||
}
|
|
||||||
]
|
|
||||||
} for data in sign_data
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -358,7 +379,7 @@ class AutoSignIn(_PluginBase):
|
|||||||
if status:
|
if status:
|
||||||
logger.info("站点签到任务完成!")
|
logger.info("站点签到任务完成!")
|
||||||
# 获取今天的日期
|
# 获取今天的日期
|
||||||
key = datetime.now().strftime('%Y-%m-%d')
|
key = datetime.now().strftime('%-m月%-d日')
|
||||||
# 保存数据
|
# 保存数据
|
||||||
self.save_data(key, [{
|
self.save_data(key, [{
|
||||||
"site": s[0],
|
"site": s[0],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user