mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:PiliPlus/http/dynamics.dart';
|
||||||
import 'package:PiliPlus/models/common/reply_type.dart';
|
import 'package:PiliPlus/models/common/reply_type.dart';
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
import 'package:app_links/app_links.dart';
|
import 'package:app_links/app_links.dart';
|
||||||
@@ -122,9 +123,9 @@ class PiliScheme {
|
|||||||
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');
|
||||||
int rpID = int.parse(value.queryParameters['anchor'] ?? '0');
|
// int rpID = int.parse(value.queryParameters['anchor'] ?? '0');
|
||||||
// int extraIntentId =
|
// int extraIntentId =
|
||||||
// int.parse(value.queryParameters['extraIntentId'] ?? '0');
|
// int.parse(value.queryParameters['extraIntentId'] ?? '0');
|
||||||
Get.to(
|
Get.to(
|
||||||
@@ -146,24 +147,41 @@ class PiliScheme {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: VideoReplyReplyPanel(
|
body: VideoReplyReplyPanel(
|
||||||
oid: oid,
|
oid: oid,
|
||||||
rpid: rpID,
|
rpid: rootId, // rpID,
|
||||||
source: 'routePush',
|
source: 'routePush',
|
||||||
replyType: ReplyType.dynamics,
|
replyType: ReplyType.dynamics,
|
||||||
firstFloor: null),
|
firstFloor: null,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (host == 'following' && path.startsWith("/detail/")) {
|
} else if (host == 'following' && path.startsWith("/detail/")) {
|
||||||
void getToOpusWeb() {
|
void getToOpusWeb() async {
|
||||||
var opusId = path.split('/').last;
|
String? id = RegExp(r'detail/(\d+)').firstMatch(path)?.group(1);
|
||||||
Utils.toDupNamed(
|
if (id != null) {
|
||||||
'/webview',
|
SmartDialog.showLoading();
|
||||||
parameters: {
|
dynamic res = await DynamicsHttp.dynamicDetail(id: id);
|
||||||
'url': 'https://m.bilibili.com/dynamic/$opusId',
|
SmartDialog.dismiss();
|
||||||
'type': 'url',
|
if (res['status']) {
|
||||||
'pageTitle': '',
|
Get.toNamed('/dynamicDetail', arguments: {
|
||||||
},
|
'item': res['data'],
|
||||||
);
|
'floor': 1,
|
||||||
|
'action': 'detail'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
SmartDialog.showToast(res['msg']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var opusId = path.split('/').last;
|
||||||
|
Utils.toDupNamed(
|
||||||
|
'/webview',
|
||||||
|
parameters: {
|
||||||
|
'url': 'https://m.bilibili.com/dynamic/$opusId',
|
||||||
|
'type': 'url',
|
||||||
|
'pageTitle': '',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.queryParameters['comment_root_id'] != null) {
|
if (value.queryParameters['comment_root_id'] != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user