mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
@@ -79,10 +79,14 @@ class DynamicsHttp {
|
|||||||
//
|
//
|
||||||
static Future dynamicDetail({
|
static Future dynamicDetail({
|
||||||
String? id,
|
String? id,
|
||||||
|
dynamic rid,
|
||||||
|
dynamic type,
|
||||||
}) async {
|
}) async {
|
||||||
var res = await Request().get(Api.dynamicDetail, queryParameters: {
|
var res = await Request().get(Api.dynamicDetail, queryParameters: {
|
||||||
'timezone_offset': -480,
|
'timezone_offset': -480,
|
||||||
'id': id,
|
if (id != null) 'id': id,
|
||||||
|
if (rid != null) 'rid': rid,
|
||||||
|
if (type != null) 'type': type,
|
||||||
'features': 'itemOpusStyle',
|
'features': 'itemOpusStyle',
|
||||||
});
|
});
|
||||||
if (res.data['code'] == 0) {
|
if (res.data['code'] == 0) {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ class PiliScheme {
|
|||||||
//fmt.Sprintf("bilibili://comment/detail/%d/%d/%d/?subType=%d&anchor=%d&showEnter=1&extraIntentId=%d", rp.Type, rp.Oid, rootID, subType, rp.RpID, extraIntentID)
|
//fmt.Sprintf("bilibili://comment/detail/%d/%d/%d/?subType=%d&anchor=%d&showEnter=1&extraIntentId=%d", rp.Type, rp.Oid, rootID, subType, rp.RpID, extraIntentID)
|
||||||
debugPrint('${value.queryParameters}');
|
debugPrint('${value.queryParameters}');
|
||||||
List<String> pathParts = path.split('/');
|
List<String> pathParts = path.split('/');
|
||||||
// int type = int.parse(pathParts[2]);
|
int type = int.parse(pathParts[2]);
|
||||||
int oid = int.parse(pathParts[3]);
|
int oid = int.parse(pathParts[3]);
|
||||||
int rootId = int.parse(pathParts[4]);
|
int rootId = int.parse(pathParts[4]);
|
||||||
// int subType = int.parse(value.queryParameters['subType'] ?? '0');
|
// int subType = int.parse(value.queryParameters['subType'] ?? '0');
|
||||||
@@ -150,7 +150,7 @@ class PiliScheme {
|
|||||||
oid: oid,
|
oid: oid,
|
||||||
rpid: rootId, // rpID,
|
rpid: rootId, // rpID,
|
||||||
source: 'routePush',
|
source: 'routePush',
|
||||||
replyType: ReplyType.dynamics,
|
replyType: ReplyType.values[type],
|
||||||
firstFloor: null,
|
firstFloor: null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -211,6 +211,23 @@ class PiliScheme {
|
|||||||
} else {
|
} else {
|
||||||
getToOpusWeb();
|
getToOpusWeb();
|
||||||
}
|
}
|
||||||
|
} else if (host == 'album') {
|
||||||
|
String? rid =
|
||||||
|
RegExp(r'album/(\d+)').firstMatch(value.toString())?.group(1);
|
||||||
|
if (rid != null) {
|
||||||
|
SmartDialog.showLoading();
|
||||||
|
dynamic res = await DynamicsHttp.dynamicDetail(rid: rid, type: 2);
|
||||||
|
SmartDialog.dismiss();
|
||||||
|
if (res['status']) {
|
||||||
|
Get.toNamed('/dynamicDetail', arguments: {
|
||||||
|
'item': res['data'],
|
||||||
|
'floor': 1,
|
||||||
|
'action': 'detail'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
SmartDialog.showToast(res['msg']);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
debugPrint('$value');
|
debugPrint('$value');
|
||||||
SmartDialog.showToast('未知路径:$value,请截图反馈给开发者');
|
SmartDialog.showToast('未知路径:$value,请截图反馈给开发者');
|
||||||
|
|||||||
Reference in New Issue
Block a user