From fd51cddecae4956ff4cdf343affc8eb70521840e Mon Sep 17 00:00:00 2001 From: orz12 Date: Mon, 20 May 2024 14:37:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=89=B9=E5=AE=9A=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/utils/app_scheme.dart | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart index 7c696bbf..0e75fddc 100644 --- a/lib/utils/app_scheme.dart +++ b/lib/utils/app_scheme.dart @@ -268,15 +268,22 @@ class PiliSchame { Get.toNamed('/member?mid=$area', arguments: {'face': ''}); break; default: - SmartDialog.showToast('未知路径或匹配错误:${value.dataString},先采用浏览器打开'); - Get.toNamed( - '/webview', - parameters: { - 'url': value.dataString ?? "", - 'type': 'url', - 'pageTitle': '' - }, - ); + var res = IdUtils.matchAvorBv(input: area.split('?').first); + if (res.containsKey('AV')) { + _videoPush(res['AV']! as int, null); + } else if (res.containsKey('BV')) { + _videoPush(null, res['BV'] as String); + } else { + SmartDialog.showToast('未知路径或匹配错误:${value.dataString},先采用浏览器打开'); + Get.toNamed( + '/webview', + parameters: { + 'url': value.dataString ?? "", + 'type': 'url', + 'pageTitle': '' + }, + ); + } } } }