mod: arguments

This commit is contained in:
guozhigq
2024-09-26 22:12:00 +08:00
parent 008c2488af
commit 1ed098fd81
3 changed files with 11 additions and 13 deletions

View File

@ -163,10 +163,9 @@ class DynamicsController extends GetxController {
});
} else {
Get.toNamed('/opus', parameters: {
'url': url,
'title': title,
'id': number,
'dynamicType': url.split('/')[1]
'articleType': 'opus'
});
}
} else {

View File

@ -6,16 +6,18 @@ class OpusController extends GetxController {
late String url;
late String title;
late String id;
late String dynamicType;
late String articleType;
Rx<OpusDataModel> opusData = OpusDataModel().obs;
@override
void onInit() {
super.onInit();
url = Get.parameters['url']!;
title = Get.parameters['title']!;
id = Get.parameters['id']!;
dynamicType = Get.parameters['dynamicType']!;
articleType = Get.parameters['articleType']!;
if (articleType == 'opus') {
url = 'https://www.bilibili.com/opus/$id';
}
}
Future fetchOpusData() async {

View File

@ -82,14 +82,11 @@ class PiliSchame {
case 'opus':
if (path.startsWith('/detail')) {
var opusId = path.split('/').last;
Get.toNamed(
'/webview',
parameters: {
'url': 'https://www.bilibili.com/opus/$opusId',
'type': 'url',
'pageTitle': '',
},
);
Get.toNamed('/opus', arguments: {
'title': '',
'id': opusId,
'articleType': 'opus',
});
}
break;
case 'search':