From 12023c38f96a271bee50dcf87246c053bb26c182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyanghuaxuan=E2=80=9D?= <“646903573@qq.com”> Date: Tue, 9 Feb 2021 14:26:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E5=A4=9A=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/ios/Runner/Info.plist | 2 +- lib/widgets/share/share_alert_select.dart | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index 12c229b..3b55609 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -77,7 +77,7 @@ weixin CFBundleURLSchemes - wx + wx598aaef252cd78e4 diff --git a/lib/widgets/share/share_alert_select.dart b/lib/widgets/share/share_alert_select.dart index 0183675..770d685 100644 --- a/lib/widgets/share/share_alert_select.dart +++ b/lib/widgets/share/share_alert_select.dart @@ -376,6 +376,18 @@ class _ShareAlertContentState extends State<_ShareAlertContent> { return; } + int count = 0; + if (_shareDataModel.poster != null) { + count++; + } + count += (_shareDataModel?.image?.length ?? 0); + // 多图分享 + if (count > 1) { + _shareMultipleImages(item.type); + return; + } + + if (item.type == 'wx') { _shareByMob(ShareSDKPlatforms.wechatSession); } else if (item.type == 'pyq') { @@ -403,11 +415,14 @@ class _ShareAlertContentState extends State<_ShareAlertContent> { return; } + Loading.show(context); Timer(Duration(milliseconds: 2000), () { Loading.dismiss(); }); + + SSDKMap params; if (_shareDataModel.poster != null) { String path = await _savePoster();