diff --git a/lib/pages/dynamics/view.dart b/lib/pages/dynamics/view.dart index 773caad5..5113df4b 100644 --- a/lib/pages/dynamics/view.dart +++ b/lib/pages/dynamics/view.dart @@ -272,6 +272,7 @@ class _CreatePanelState extends State { dynamic result = await MsgHttp.uploadBfs( path: _pathList[i], category: 'daily', + biz: 'new_dyn', ); if (result['status']) { int imageSize = await File(_pathList[i]).length(); diff --git a/lib/pages/member/new/widget/edit_profile_page.dart b/lib/pages/member/new/widget/edit_profile_page.dart index f3803db5..cb424589 100644 --- a/lib/pages/member/new/widget/edit_profile_page.dart +++ b/lib/pages/member/new/widget/edit_profile_page.dart @@ -3,6 +3,7 @@ import 'package:PiliPalaX/common/widgets/http_error.dart'; import 'package:PiliPalaX/http/constants.dart'; import 'package:PiliPalaX/http/index.dart'; import 'package:PiliPalaX/http/loading_state.dart'; +import 'package:PiliPalaX/utils/extension.dart'; import 'package:PiliPalaX/utils/storage.dart'; import 'package:PiliPalaX/utils/utils.dart'; import 'package:cached_network_image/cached_network_image.dart'; @@ -15,6 +16,7 @@ import 'package:get/get.dart' hide FormData, MultipartFile; import 'package:image_cropper/image_cropper.dart'; import 'package:image_picker/image_picker.dart'; import 'package:intl/intl.dart'; +import 'package:mime/mime.dart'; enum ProfileType { uname, sign, sex, birthday } @@ -451,6 +453,12 @@ class _EditProfilePageState extends State { imageQuality: 100, ); if (pickedFile != null && mounted) { + String? mimeType = + lookupMimeType(pickedFile.path)?.split('/').getOrNull(1); + if (mimeType == 'gif') { + SmartDialog.showToast('不能选GIF'); + return; + } CroppedFile? croppedFile = await ImageCropper().cropImage( sourcePath: pickedFile.path, uiSettings: [ diff --git a/lib/pages/msg_feed_top/sys_msg/view.dart b/lib/pages/msg_feed_top/sys_msg/view.dart index e6e87131..481df55b 100644 --- a/lib/pages/msg_feed_top/sys_msg/view.dart +++ b/lib/pages/msg_feed_top/sys_msg/view.dart @@ -169,7 +169,7 @@ class _SysMsgPageState extends State { InlineSpan _buildContent(String content) { final List spanChildren = []; RegExp urlRegExp = RegExp( - '#\\{([^}]*)\\}\\{"?([^}]*)"?\\}|https?:\\/\\/[^\\s/\$.?#].[^\\s]*|www\\.[^\\s/\$.?#].[^\\s]*'); + r'#\{([^}]*)\}\{([^}]*)\}|https?:\/\/[^\s/\$.?#].[^\s]*|www\.[^\s/\$.?#].[^\s]*'); content.splitMapJoin( urlRegExp, onMatch: (Match match) { @@ -181,7 +181,7 @@ class _SysMsgPageState extends State { recognizer: TapGestureRecognizer() ..onTap = () { try { - Uri uri = Uri.parse(match[2]!); + Uri uri = Uri.parse(match[2]!.replaceAll('"', '')); PiliScheme.routePush(uri); } catch (err) { SmartDialog.showToast(err.toString()); diff --git a/lib/pages/video/detail/reply_new/reply_page.dart b/lib/pages/video/detail/reply_new/reply_page.dart index 5eca775e..3a2c712b 100644 --- a/lib/pages/video/detail/reply_new/reply_page.dart +++ b/lib/pages/video/detail/reply_new/reply_page.dart @@ -480,6 +480,7 @@ class _ReplyPageState extends State dynamic result = await MsgHttp.uploadBfs( path: _pathList[i], category: 'daily', + biz: 'new_dyn', ); if (result['status']) { int imageSize = await File(_pathList[i]).length();