mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 专栏未跳转;路由处理短路
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:appscheme/appscheme.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import '../http/dynamics.dart';
|
||||||
import '../http/search.dart';
|
import '../http/search.dart';
|
||||||
import '../models/common/search_type.dart';
|
import '../models/common/search_type.dart';
|
||||||
import 'id_utils.dart';
|
import 'id_utils.dart';
|
||||||
@@ -85,9 +86,30 @@ class PiliSchame {
|
|||||||
}
|
}
|
||||||
} else if (host == 'search') {
|
} else if (host == 'search') {
|
||||||
Get.toNamed('/searchResult', parameters: {'keyword': ''});
|
Get.toNamed('/searchResult', parameters: {'keyword': ''});
|
||||||
|
} else if (host == 'article') {
|
||||||
|
final String id = path.split('/').last.split('?').first;
|
||||||
|
Get.toNamed(
|
||||||
|
'/htmlRender',
|
||||||
|
parameters: {
|
||||||
|
'url': 'www.bilibili.com/read/cv$id',
|
||||||
|
'title': '',
|
||||||
|
'id': 'cv$id',
|
||||||
|
'dynamicType': 'read'
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
print(value.dataString);
|
||||||
|
SmartDialog.showToast('未知路径:${value.dataString},请截图反馈给开发者');
|
||||||
|
// Get.toNamed(
|
||||||
|
// '/webview',
|
||||||
|
// parameters: {
|
||||||
|
// 'url': value.dataString ?? "",
|
||||||
|
// 'type': 'url',
|
||||||
|
// 'pageTitle': ''
|
||||||
|
// },
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
} else if (scheme == 'https') {
|
||||||
if (scheme == 'https') {
|
|
||||||
_fullPathPush(value);
|
_fullPathPush(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -164,6 +186,7 @@ class PiliSchame {
|
|||||||
'/liveRoom?roomid=$roomId',
|
'/liveRoom?roomid=$roomId',
|
||||||
arguments: {'liveItem': null, 'heroTag': roomId.toString()},
|
arguments: {'liveItem': null, 'heroTag': roomId.toString()},
|
||||||
);
|
);
|
||||||
|
return;
|
||||||
} else if (host.contains('space')) {
|
} else if (host.contains('space')) {
|
||||||
var mid = path!.split('/').last;
|
var mid = path!.split('/').last;
|
||||||
Get.toNamed('/member?mid=$mid', arguments: {'face': ''});
|
Get.toNamed('/member?mid=$mid', arguments: {'face': ''});
|
||||||
@@ -200,6 +223,7 @@ class PiliSchame {
|
|||||||
parameters: {'url': redirectUrl, 'type': 'url', 'pageTitle': ''},
|
parameters: {'url': redirectUrl, 'type': 'url', 'pageTitle': ''},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
@@ -227,6 +251,13 @@ class PiliSchame {
|
|||||||
break;
|
break;
|
||||||
case 'read':
|
case 'read':
|
||||||
print('专栏');
|
print('专栏');
|
||||||
|
String id = 'cv${matchNum(query!['id']!).first}';
|
||||||
|
Get.toNamed('/htmlRender', parameters: {
|
||||||
|
'url': value.dataString!,
|
||||||
|
'title': '',
|
||||||
|
'id': id,
|
||||||
|
'dynamicType': 'read'
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'space':
|
case 'space':
|
||||||
print('个人空间');
|
print('个人空间');
|
||||||
|
|||||||
Reference in New Issue
Block a user