diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart index 61c2284f..a8ad1aa0 100644 --- a/lib/utils/app_scheme.dart +++ b/lib/utils/app_scheme.dart @@ -304,8 +304,13 @@ class PiliSchame { break; case 'member': if (arg != '') { + final int? mid = int.tryParse(arg); + if (mid == null) { + SmartDialog.showToast('用户id有误'); + return; + } Get.toNamed( - '/member?mid=$arg', + '/member?mid=$mid', arguments: {'face': null}, ); } else { @@ -314,7 +319,8 @@ class PiliSchame { break; case 'search': if (arg != '') { - Get.toNamed('/searchResult', parameters: {'keyword': arg}); + final String encodedArg = Uri.decodeComponent(arg); + Get.toNamed('/searchResult', parameters: {'keyword': encodedArg}); } else { Get.toNamed('/search'); }