mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 09:37:02 +08:00
opt handle res
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
class SystemNotifyList {
|
||||
int? id;
|
||||
int? cursor;
|
||||
@@ -46,7 +48,18 @@ class SystemNotifyList {
|
||||
: null;
|
||||
type = json['type'];
|
||||
title = json['title'];
|
||||
content = json['content'];
|
||||
if (json['content'] != null) {
|
||||
try {
|
||||
dynamic jsonContent = jsonDecode(json['content']);
|
||||
if (jsonContent?['web'] != null) {
|
||||
content = jsonContent['web'];
|
||||
} else {
|
||||
content = json['content'];
|
||||
}
|
||||
} catch (_) {
|
||||
content = json['content'];
|
||||
}
|
||||
}
|
||||
source = json['source'] != null ? Source.fromJson(json['source']) : null;
|
||||
timeAt = json['time_at'];
|
||||
cardType = json['card_type'];
|
||||
|
||||
Reference in New Issue
Block a user