feat(leisure): 新增闲情逸致模块与多项功能优化
本次提交完成多项核心更新: 1. 新增闲情逸致功能模块,包含时间线、收藏标注、季节主题等基础框架 2. 替换hive为社区维护的hive_ce包,修复依赖兼容问题 3. 统一替换"开发中"提示为"当前设备不支持",优化用户提示文案 4. 新增多项功能开关与特性标志,统一管理不可用功能提示 5. 完善用户账户洞察系统,新增头像审核中状态检测 6. 优化TTS语音朗读服务,修复Android端引擎初始化问题 7. 重构知识图谱缩放手势逻辑,解决缩放不跟手问题 8. 新增精灵头像组件,替换默认聊天头像样式 9. 新增外部链接跳转确认弹窗,提升使用安全性 10. 升级后端API接口,新增签到配置获取与补签积分规则动态读取 11. 完善多语言翻译覆盖率限制,非中文语言仅显示最高50%进度 12. 新增HTTP缓存拦截器,优化网络请求性能 13. 新增恢复出厂设置选项,完善数据管理功能 同时修复了多处代码细节问题:简化字符串拼接、优化布局代码、移除多余代码等。
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
"""
|
||||
闲言APP — 服务端代码上传脚本
|
||||
创建时间: 2026-05-23
|
||||
更新时间: 2026-05-23
|
||||
更新时间: 2026-05-27
|
||||
作用: 通过SFTP上传修改后的PHP代码到远程服务器
|
||||
上次更新: 初始版本,支持上传Rank.php
|
||||
上次更新: 新增UserCenter.php(补签coin_rule+签到配置+注册赠送)、UserSecurity.php(注册赠送积分金币)
|
||||
"""
|
||||
|
||||
import os
|
||||
@@ -24,6 +24,16 @@ UPLOAD_FILES = [
|
||||
'remote': 'application/api/controller/Rank.php',
|
||||
'desc': '赛季排行榜API控制器',
|
||||
},
|
||||
{
|
||||
'local': r'e:\project\flutter\f\xianyan\docs\toolsapi\application\api\controller\UserCenter.php',
|
||||
'remote': 'application/api/controller/UserCenter.php',
|
||||
'desc': '用户中心API控制器(补签coin_rule+签到配置+注册赠送)',
|
||||
},
|
||||
{
|
||||
'local': r'e:\project\flutter\f\xianyan\docs\toolsapi\application\api\controller\UserSecurity.php',
|
||||
'remote': 'application/api/controller/UserSecurity.php',
|
||||
'desc': '用户安全API控制器(注册赠送积分金币)',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
||||
94
scripts/verify_server_changes.py
Normal file
94
scripts/verify_server_changes.py
Normal file
@@ -0,0 +1,94 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
闲言APP — 服务端修改验证脚本
|
||||
创建时间: 2026-05-27
|
||||
更新时间: 2026-05-27
|
||||
作用: 验证本次服务端代码修改后的接口是否正常工作
|
||||
上次更新: 初始创建
|
||||
"""
|
||||
|
||||
import requests
|
||||
import json
|
||||
import sys
|
||||
|
||||
BASE_URL = 'https://tools.wktyl.com/api'
|
||||
|
||||
|
||||
def print_result(name, response):
|
||||
print(f'\n{"="*50}')
|
||||
print(f'测试: {name}')
|
||||
print(f'状态码: {response.status_code}')
|
||||
try:
|
||||
data = response.json()
|
||||
print(f'返回: {json.dumps(data, ensure_ascii=False, indent=2)}')
|
||||
except Exception:
|
||||
print(f'返回: {response.text[:500]}')
|
||||
print(f'{"="*50}')
|
||||
|
||||
|
||||
def test_signin_config():
|
||||
"""测试签到配置接口"""
|
||||
resp = requests.get(f'{BASE_URL}/user_center/signin_config', timeout=10)
|
||||
print_result('签到配置接口 (signin_config)', resp)
|
||||
if resp.status_code == 200:
|
||||
data = resp.json()
|
||||
if data.get('code') == 1 and 'makeup_cost' in str(data):
|
||||
print(' ✅ 签到配置接口正常')
|
||||
return True
|
||||
else:
|
||||
print(' ⚠️ 签到配置接口返回异常')
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
def test_signin_makeup_without_token():
|
||||
"""测试补签接口(无token应返回未登录)"""
|
||||
resp = requests.post(
|
||||
f'{BASE_URL}/user_center/signin_makeup',
|
||||
data={'date': '2026-05-20'},
|
||||
timeout=10,
|
||||
)
|
||||
print_result('补签接口(无token)', resp)
|
||||
if resp.status_code in (200, 401):
|
||||
data = resp.json() if resp.status_code == 200 else {}
|
||||
code = data.get('code', 0)
|
||||
if resp.status_code == 401 or code == 0 or code == 401:
|
||||
print(' ✅ 未登录时正确拒绝')
|
||||
return True
|
||||
else:
|
||||
print(' ⚠️ 未登录时应返回错误')
|
||||
return False
|
||||
return False
|
||||
|
||||
|
||||
def main():
|
||||
print('=' * 60)
|
||||
print('闲言APP 服务端修改验证脚本')
|
||||
print('验证内容: 补签coin_rule配置 + 签到配置接口 + 注册赠送')
|
||||
print('=' * 60)
|
||||
|
||||
results = []
|
||||
results.append(('签到配置接口', test_signin_config()))
|
||||
results.append(('补签接口(无token)', test_signin_makeup_without_token()))
|
||||
|
||||
print('\n' + '=' * 60)
|
||||
print('验证结果汇总:')
|
||||
all_pass = True
|
||||
for name, passed in results:
|
||||
status = '✅ 通过' if passed else '❌ 失败'
|
||||
print(f' {name}: {status}')
|
||||
if not passed:
|
||||
all_pass = False
|
||||
print('=' * 60)
|
||||
|
||||
if all_pass:
|
||||
print('\n🎉 所有验证通过!')
|
||||
else:
|
||||
print('\n⚠️ 部分验证失败,请检查服务端代码')
|
||||
|
||||
return 0 if all_pass else 1
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user