Commit 422b3273 by tanghuan

跳转打卡详情页

1 parent 72b713ac
......@@ -76,6 +76,7 @@ class NotificationService {
try {
final data = jsonDecode(payload) as Map<String, dynamic>;
final func = data['func'] as String?;
final uniqueCode = data['uniqueCode'] as String?;
final classCode = data['classCode'] as String?;
if (uniqueCode == null || uniqueCode.isEmpty || classCode == null || classCode.isEmpty) {
......@@ -107,14 +108,23 @@ class NotificationService {
final sessionCode = prefs.getString('auth_sessionCode') ?? '';
final userCode = prefs.getString('auth_userCode') ?? '';
var funcPage = '';
if (func == 'homework') {
funcPage = 'page=homeworkdetail&uniqueCode=$uniqueCode';
} else if (func == 'clockin') {
funcPage = 'page=clockdetail&clockUnique=$uniqueCode';
} else {
debugPrint('[notification_service] 不支持功能的类型: $func');
return null;
}
return '/h5/login/pages/applogin?'
'sessionCode=$sessionCode&'
'userCode=$userCode&'
'classCode=$classCode&'
'userType=2&'
'stuId=$stuId&'
'page=homeworkdetail&'
'uniqueCode=$uniqueCode';
'$funcPage';
} catch (e, stackTrace) {
debugPrint('[notification_service] 解析 payload 失败: $e\n$stackTrace');
return null;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!