Merge branch 'feature-appScheme'
This commit is contained in:
@ -36,7 +36,7 @@ class NetworkImgLayer extends StatelessWidget {
|
|||||||
final int defaultImgQuality = GlobalData().imgQuality;
|
final int defaultImgQuality = GlobalData().imgQuality;
|
||||||
final String imageUrl =
|
final String imageUrl =
|
||||||
'${src!.startsWith('//') ? 'https:${src!}' : src!}@${quality ?? defaultImgQuality}q.webp';
|
'${src!.startsWith('//') ? 'https:${src!}' : src!}@${quality ?? defaultImgQuality}q.webp';
|
||||||
print(imageUrl);
|
// print(imageUrl);
|
||||||
int? memCacheWidth, memCacheHeight;
|
int? memCacheWidth, memCacheHeight;
|
||||||
double aspectRatio = (width / height).toDouble();
|
double aspectRatio = (width / height).toDouble();
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class PiliSchame {
|
|||||||
/// 完整链接进入 b23.无效
|
/// 完整链接进入 b23.无效
|
||||||
appScheme.getLatestScheme().then((SchemeEntity? value) {
|
appScheme.getLatestScheme().then((SchemeEntity? value) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
_fullPathPush(value);
|
_routePush(value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -37,7 +37,6 @@ class PiliSchame {
|
|||||||
final String scheme = value.scheme;
|
final String scheme = value.scheme;
|
||||||
final String host = value.host;
|
final String host = value.host;
|
||||||
final String path = value.path;
|
final String path = value.path;
|
||||||
|
|
||||||
if (scheme == 'bilibili') {
|
if (scheme == 'bilibili') {
|
||||||
if (host == 'root') {
|
if (host == 'root') {
|
||||||
Navigator.popUntil(
|
Navigator.popUntil(
|
||||||
@ -85,6 +84,14 @@ 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': 'https://www.bilibili.com/read/cv$id',
|
||||||
|
'title': 'cv$id',
|
||||||
|
'id': 'cv$id',
|
||||||
|
'dynamicType': 'read'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (scheme == 'https') {
|
if (scheme == 'https') {
|
||||||
@ -155,9 +162,14 @@ class PiliSchame {
|
|||||||
final String host = value.host!;
|
final String host = value.host!;
|
||||||
final String? path = value.path;
|
final String? path = value.path;
|
||||||
Map<String, String>? query = value.query;
|
Map<String, String>? query = value.query;
|
||||||
RegExp regExp = RegExp(r'^(www\.)?m?\.(bilibili\.com)$');
|
RegExp regExp = RegExp(r'^((www\.)|(m\.))?bilibili\.com$');
|
||||||
if (regExp.hasMatch(host)) {
|
if (regExp.hasMatch(host)) {
|
||||||
print('bilibili.com');
|
print('bilibili.com host: $host');
|
||||||
|
print('bilibili.com path: $path');
|
||||||
|
final String lastPathSegment = path!.split('/').last;
|
||||||
|
if (lastPathSegment.contains('BV')) {
|
||||||
|
_videoPush(null, lastPathSegment);
|
||||||
|
}
|
||||||
} else if (host.contains('live')) {
|
} else if (host.contains('live')) {
|
||||||
int roomId = int.parse(path!.split('/').last);
|
int roomId = int.parse(path!.split('/').last);
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
@ -226,6 +238,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