mod: arguments
This commit is contained in:
@ -163,10 +163,9 @@ class DynamicsController extends GetxController {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Get.toNamed('/opus', parameters: {
|
Get.toNamed('/opus', parameters: {
|
||||||
'url': url,
|
|
||||||
'title': title,
|
'title': title,
|
||||||
'id': number,
|
'id': number,
|
||||||
'dynamicType': url.split('/')[1]
|
'articleType': 'opus'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -6,16 +6,18 @@ class OpusController extends GetxController {
|
|||||||
late String url;
|
late String url;
|
||||||
late String title;
|
late String title;
|
||||||
late String id;
|
late String id;
|
||||||
late String dynamicType;
|
late String articleType;
|
||||||
Rx<OpusDataModel> opusData = OpusDataModel().obs;
|
Rx<OpusDataModel> opusData = OpusDataModel().obs;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
url = Get.parameters['url']!;
|
|
||||||
title = Get.parameters['title']!;
|
title = Get.parameters['title']!;
|
||||||
id = Get.parameters['id']!;
|
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 {
|
Future fetchOpusData() async {
|
||||||
|
@ -82,14 +82,11 @@ class PiliSchame {
|
|||||||
case 'opus':
|
case 'opus':
|
||||||
if (path.startsWith('/detail')) {
|
if (path.startsWith('/detail')) {
|
||||||
var opusId = path.split('/').last;
|
var opusId = path.split('/').last;
|
||||||
Get.toNamed(
|
Get.toNamed('/opus', arguments: {
|
||||||
'/webview',
|
'title': '',
|
||||||
parameters: {
|
'id': opusId,
|
||||||
'url': 'https://www.bilibili.com/opus/$opusId',
|
'articleType': 'opus',
|
||||||
'type': 'url',
|
});
|
||||||
'pageTitle': '',
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'search':
|
case 'search':
|
||||||
|
Reference in New Issue
Block a user