show forwarded dyn pic

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-18 20:50:38 +08:00
parent cc4100d74f
commit 448d7c38db
4 changed files with 73 additions and 29 deletions

View File

@@ -892,4 +892,6 @@ class Api {
static const String dynTopicRcmd = '/x/topic/web/dynamic/rcmd';
static const String matchInfo = '/x/esports/match/info';
static const String dynPic = '/x/polymer/web-dynamic/v1/detail/pic';
}

View File

@@ -493,4 +493,21 @@ class DynamicsHttp {
return Error(res.data['message']);
}
}
static Future<LoadingState<List<OpusPicModel>?>> dynPic(dynamic id) async {
final res = await Request().get(
Api.dynPic,
queryParameters: {
'id': id,
'web_location': 333.1368,
},
);
if (res.data['code'] == 0) {
return Success((res.data['data'] as List?)
?.map((e) => OpusPicModel.fromJson(e))
.toList());
} else {
return Error(res.data['message']);
}
}
}