Browse Source

bug修改

dart3_last
fff 1 week ago
parent
commit
cdb046d930
  1. 1
      lib/community/community_details.dart
  2. 1
      lib/home/help_farmers/help_farmers_page.dart
  3. 4
      lib/home/home_page.dart
  4. 1
      lib/home/huixiang_brand_page.dart
  5. 1
      lib/home/points_mall_page.dart
  6. 1
      lib/home/welfare_exchange.dart
  7. 3
      lib/home/welfare_page.dart
  8. 4
      lib/im/chat_details_page.dart
  9. 2
      lib/im/im_view/im_page.dart
  10. 4
      lib/login/login_page.dart
  11. 18
      lib/login/new_login_page.dart
  12. 1
      lib/message/system_message.dart
  13. 1
      lib/mine/invitation_record.dart
  14. 1
      lib/mine/mine_greenery.dart
  15. 2
      lib/mine/mine_page.dart
  16. 4
      lib/mine/mine_shop_details.dart
  17. 1
      lib/mine/mine_shop_page.dart
  18. 2
      lib/mine/mine_shop_recharge.dart
  19. 6
      lib/mine/mine_view/community_follow.dart
  20. 1
      lib/mine/mine_vip/legal_right_details.dart
  21. 2
      lib/mine/mine_vip/mine_attainment_page.dart
  22. 2
      lib/mine/mine_vip/mine_vip_core.dart
  23. 2
      lib/mine/recharge_page.dart
  24. 4
      lib/mine/vip_detail_page.dart
  25. 2
      lib/order/bargain_group_order.dart
  26. 1
      lib/order/exchange_history_page.dart
  27. 4
      lib/order/invoices_manage/add_invoices_title.dart
  28. 18
      lib/order/invoices_manage/edit_invoices_info.dart
  29. 3
      lib/order/invoices_manage/invoices_history.dart
  30. 3
      lib/order/invoices_manage/invoices_manage_page.dart
  31. 4
      lib/order/invoices_manage/invoices_title_info.dart
  32. 2
      lib/order/logistics_information_page.dart
  33. 3
      lib/order/order_detail_page.dart
  34. 3
      lib/order/order_history_page.dart
  35. 2
      lib/order/order_view/order_address.dart
  36. 1
      lib/qr/invite_friends.dart
  37. 1
      lib/qr/qr_share.dart
  38. 5
      lib/retrofit/min_api.dart
  39. 13
      lib/retrofit/retrofit_api.dart
  40. 12
      lib/settlement/settlement.dart
  41. 2
      lib/store/shop_details_page.dart
  42. 2
      lib/store/shopping/activity_prefecture_details.dart
  43. 4
      lib/store/shopping/shopping_goods_details.dart
  44. 3
      lib/store/shopping/shopping_mall_home.dart
  45. 5
      lib/store/store_order.dart
  46. 1
      lib/store/store_view/product_meals_sku.dart
  47. 2
      lib/union/union_details_page.dart
  48. 1
      lib/union/union_list.dart
  49. 2
      lib/union/union_page.dart
  50. 7
      lib/utils/upload_async.dart
  51. 1
      lib/view_widget/vip_dialog.dart

1
lib/community/community_details.dart

@ -19,7 +19,6 @@ import 'package:huixiang/view_widget/tips_dialog.dart';
import 'package:huixiang/web/web_view/comment_list.dart'; import 'package:huixiang/web/web_view/comment_list.dart';
import 'package:huixiang/web/web_view/input_comment.dart'; import 'package:huixiang/web/web_view/input_comment.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
class CommunityDetails extends StatefulWidget { class CommunityDetails extends StatefulWidget {

1
lib/home/help_farmers/help_farmers_page.dart

@ -68,7 +68,6 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
} }
} finally { } finally {
setState(() {}); setState(() {});
SmartDialog.dismiss();
} }
} }

4
lib/home/home_page.dart

@ -192,7 +192,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
_loadCount += 1; _loadCount += 1;
if (_loadCount == 7) { if (_loadCount == 7) {
_loadCount = 0; _loadCount = 0;
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
String toastText = AppUtils.dioErrorTypeToString(dioErrorType); String toastText = AppUtils.dioErrorTypeToString(dioErrorType);
if (toastText.isNotEmpty) { if (toastText.isNotEmpty) {
SmartDialog.showToast(toastText, alignment: Alignment.center); SmartDialog.showToast(toastText, alignment: Alignment.center);
@ -266,7 +266,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
if (isRefresh) if (isRefresh)
addLoadCount(); addLoadCount();
else { else {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
setState(() {}); setState(() {});
} }
} }

1
lib/home/huixiang_brand_page.dart

@ -88,7 +88,6 @@ class _BrandPage extends State<BrandPage> with SingleTickerProviderStateMixin, A
} else { } else {
refreshController.refreshFailed(); refreshController.refreshFailed();
} }
SmartDialog.dismiss();
refreshController.refreshCompleted(); refreshController.refreshCompleted();
if (mounted) setState(() {}); if (mounted) setState(() {});
} }

1
lib/home/points_mall_page.dart

@ -132,7 +132,6 @@ class _PointsMallPage extends State<PointsMallPage>
_refreshController.refreshFailed(); _refreshController.refreshFailed();
return BaseData<PageInfo<Goods>>()..isSuccess = false; return BaseData<PageInfo<Goods>>()..isSuccess = false;
}); });
SmartDialog.dismiss();
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
if (pageNum == 1) { if (pageNum == 1) {
goods.clear(); goods.clear();

1
lib/home/welfare_exchange.dart

@ -150,7 +150,6 @@ class _WelfareExchange extends State<WelfareExchange>
refreshController.refreshFailed(); refreshController.refreshFailed();
} }
} finally { } finally {
SmartDialog.dismiss();
setState(() {}); setState(() {});
} }
} }

3
lib/home/welfare_page.dart

@ -75,7 +75,6 @@ class _WelfarePage extends State<WelfarePage> {
refreshController.refreshFailed(); refreshController.refreshFailed();
return BaseData<PageInfo<Goods>>()..isSuccess = false; return BaseData<PageInfo<Goods>>()..isSuccess = false;
}); });
SmartDialog.dismiss();
if (pageGoods?.isSuccess ?? false) { if (pageGoods?.isSuccess ?? false) {
goods.clear(); goods.clear();
goods.addAll(pageGoods?.data?.list ?? []); goods.addAll(pageGoods?.data?.list ?? []);
@ -129,7 +128,7 @@ class _WelfarePage extends State<WelfarePage> {
_loadCount += 1; _loadCount += 1;
if (_loadCount == 2) { if (_loadCount == 2) {
_loadCount = 0; _loadCount = 0;
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
if (refreshController.isRefresh) refreshController.refreshCompleted(); if (refreshController.isRefresh) refreshController.refreshCompleted();
if (mounted) setState(() {}); if (mounted) setState(() {});
} }

4
lib/im/chat_details_page.dart

@ -130,7 +130,9 @@ class _ChatDetailsPage extends State<ChatDetailsPage>
}); });
if (scrollController.hasClients) { if (scrollController.hasClients) {
debugPrint("refresh-message-height: ${height} page: $page"); debugPrint("refresh-message-height: ${height} page: $page");
scrollController.position.restoreOffset(height, initialRestore: true); if (scrollController.position.maxScrollExtent > 0) {
scrollController.position.restoreOffset(height, initialRestore: true);
}
} }
newmessages.addAll(messagePage.reversed.toList()); newmessages.addAll(messagePage.reversed.toList());
newanimatedListKey.currentState?.insertAllItems(0, messagePage.length); newanimatedListKey.currentState?.insertAllItems(0, messagePage.length);

2
lib/im/im_view/im_page.dart

@ -240,7 +240,7 @@ class _IMPage extends State<IMPage> implements OnChatMessage {
_refreshController.loadComplete(); _refreshController.loadComplete();
_refreshController.refreshCompleted(); _refreshController.refreshCompleted();
} }
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
} }
@override @override

4
lib/login/login_page.dart

@ -333,9 +333,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
"firstLoginCouponList": value.data?.firstLoginCouponList "firstLoginCouponList": value.data?.firstLoginCouponList
}, },
); );
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
} else {
SmartDialog.showToast("${value?.msg}", alignment: Alignment.center);
} }
}); });
} }

18
lib/login/new_login_page.dart

@ -12,7 +12,9 @@ import 'package:get/get.dart';
import 'package:huixiang/data/base_data.dart'; import 'package:huixiang/data/base_data.dart';
import 'package:huixiang/data/channels.dart'; import 'package:huixiang/data/channels.dart';
import 'package:huixiang/data/examine_instance.dart'; import 'package:huixiang/data/examine_instance.dart';
import 'package:huixiang/data/login_info.dart';
import 'package:huixiang/data/user_entity.dart'; import 'package:huixiang/data/user_entity.dart';
import 'package:huixiang/data/user_info.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart'; import 'package:huixiang/main.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
@ -212,27 +214,24 @@ class _NewLoginPage extends State<NewLoginPage> {
SmartDialog.showLoading( SmartDialog.showLoading(
msg: S.of(context).zhengzaijiazai, msg: S.of(context).zhengzaijiazai,
); );
BaseData? value = await apiService?.memberLogin(param).catchError((error) { BaseData<LoginInfo>? value = await apiService?.memberLogin(param).catchError((error) {
return BaseData()..isSuccess = false; return BaseData<LoginInfo>()..isSuccess = false;
}); });
// SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai); // SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai);
if (value?.isSuccess ?? false) { if (value?.isSuccess ?? false) {
var userInfo = value!.data; var userInfo = value!.data;
ExamineInstance.instance.isExamine = userInfo.authInfo?.account == "13800138000"; ExamineInstance.instance.isExamine = userInfo?.authInfo?.account == "13800138000";
saveUserJson(userInfo.authInfo?.toJson()); saveUserJson(userInfo?.authInfo?.toJson());
eventBus.fire(EventType(3)); eventBus.fire(EventType(3));
Navigator.of(context).pushNamedAndRemoveUntil( Navigator.of(context).pushNamedAndRemoveUntil(
'/router/main_page', (route) => false, '/router/main_page', (route) => false,
arguments: { arguments: {
"invite": invite, "invite": invite,
"interviewCouponList": userInfo.interviewCouponList, "interviewCouponList": userInfo?.interviewCouponList,
"firstLoginCouponList": userInfo.firstLoginCouponList "firstLoginCouponList": userInfo?.firstLoginCouponList
}); });
} else {
SmartDialog.showToast("${value?.msg}", alignment: Alignment.center);
} }
SmartDialog.dismiss();
} }
saveUserJson(userJson) { saveUserJson(userJson) {
@ -738,7 +737,6 @@ class _NewLoginPage extends State<NewLoginPage> {
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
print("11111");
// if (widget.arguments != null) { // if (widget.arguments != null) {
// Navigator.of(context).pop(); // Navigator.of(context).pop();
// } else { // } else {

1
lib/message/system_message.dart

@ -110,7 +110,6 @@ class _SystemMessagePage extends State<SystemMessagePage> {
_refreshController.loadComplete(); _refreshController.loadComplete();
_refreshController.refreshCompleted(); _refreshController.refreshCompleted();
} }
SmartDialog.dismiss();
} }
RefreshController _refreshController = RefreshController(); RefreshController _refreshController = RefreshController();

1
lib/mine/invitation_record.dart

@ -81,7 +81,6 @@ class _InvitationRecord extends State<InvitationRecord>
} else { } else {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
} }
SmartDialog.dismiss();
} }
@override @override

1
lib/mine/mine_greenery.dart

@ -56,7 +56,6 @@ class _MineGreenery extends State<MineGreenery> {
refreshController.refreshFailed(); refreshController.refreshFailed();
return BaseData<PageInfo<Goods>>()..isSuccess = false; return BaseData<PageInfo<Goods>>()..isSuccess = false;
}); });
SmartDialog.dismiss();
if (pageGoods?.isSuccess ?? false) { if (pageGoods?.isSuccess ?? false) {
if (pageGoods?.data?.list?.isNotEmpty ?? false) { if (pageGoods?.data?.list?.isNotEmpty ?? false) {
setState(() { setState(() {

2
lib/mine/mine_page.dart

@ -208,7 +208,6 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin,
infoNumber = baseData?.data; infoNumber = baseData?.data;
_refreshController.refreshCompleted(); _refreshController.refreshCompleted();
} }
SmartDialog.dismiss();
} }
/// ///
@ -224,7 +223,6 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin,
}); });
}); });
} }
SmartDialog.dismiss();
} }
@override @override

4
lib/mine/mine_shop_details.dart

@ -93,11 +93,11 @@ class _MineShopDetails extends State<MineShopDetails> {
if (result?.latitude != null && result?.longitude != null) { if (result?.latitude != null && result?.longitude != null) {
vipDetail(result?.latitude, result?.longitude); vipDetail(result?.latitude, result?.longitude);
} else { } else {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
} }
}).then((value) { }).then((value) {
if (!value) { if (!value) {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
refreshController.refreshFailed(); refreshController.refreshFailed();
} }
}); });

1
lib/mine/mine_shop_page.dart

@ -108,7 +108,6 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver {
refreshController.refreshFailed(); refreshController.refreshFailed();
} }
} finally { } finally {
SmartDialog.dismiss();
setState(() {}); setState(() {});
} }
} }

2
lib/mine/mine_shop_recharge.dart

@ -218,7 +218,7 @@ class _MineShopRecharge extends State<MineShopRecharge> {
_loadCount += 1; _loadCount += 1;
if (_loadCount == 2) { if (_loadCount == 2) {
_loadCount = 0; _loadCount = 0;
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
if (refreshController.isRefresh) refreshController.refreshCompleted(); if (refreshController.isRefresh) refreshController.refreshCompleted();
if (mounted) setState(() {}); if (mounted) setState(() {});
} }

6
lib/mine/mine_view/community_follow.dart

@ -44,14 +44,14 @@ class _CommunityFollow extends State<CommunityFollow>
apiService = ApiService(Dio(), apiService = ApiService(Dio(),
context: context, token: SharedInstance.instance.token, showLoading: true); context: context, token: SharedInstance.instance.token, showLoading: true);
BaseData<SocialInfo>? baseData = BaseData<SocialInfo>? baseData = await apiService?.socialInfo().catchError((onError) {
await apiService?.socialInfo().catchError((onError) {}); return BaseData<SocialInfo>()..isSuccess = false;
});
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
setState(() { setState(() {
infoNumber = baseData?.data; infoNumber = baseData?.data;
}); });
} }
SmartDialog.dismiss();
} }
@override @override

1
lib/mine/mine_vip/legal_right_details.dart

@ -64,7 +64,6 @@ class _LegalRightDetails extends State<LegalRightDetails> {
} }
}); });
} }
SmartDialog.dismiss();
} }
/// ///

2
lib/mine/mine_vip/mine_attainment_page.dart

@ -89,7 +89,6 @@ class _MineAttainmentPage extends State<MineAttainmentPage> {
showDeleteDialog(index); showDeleteDialog(index);
}); });
} }
SmartDialog.dismiss();
} }
///(//) ///(//)
@ -111,7 +110,6 @@ class _MineAttainmentPage extends State<MineAttainmentPage> {
refreshController.refreshCompleted(); refreshController.refreshCompleted();
}); });
} }
SmartDialog.dismiss();
} }
_onRefresh() { _onRefresh() {

2
lib/mine/mine_vip/mine_vip_core.dart

@ -136,7 +136,6 @@ class _MineVipCore extends State<MineVipCore> {
refreshController.refreshCompleted(); refreshController.refreshCompleted();
refreshController.loadComplete(); refreshController.loadComplete();
} }
SmartDialog.dismiss();
} }
////// //////
@ -154,7 +153,6 @@ class _MineVipCore extends State<MineVipCore> {
refreshController.refreshCompleted(); refreshController.refreshCompleted();
refreshController.loadComplete(); refreshController.loadComplete();
} }
SmartDialog.dismiss();
} }
/// ///

2
lib/mine/recharge_page.dart

@ -153,7 +153,7 @@ class _RechargePage extends State<RechargePage> {
_loadCount += 1; _loadCount += 1;
if (_loadCount == 4) { if (_loadCount == 4) {
_loadCount = 0; _loadCount = 0;
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
if (refreshController.isRefresh) refreshController.refreshCompleted(); if (refreshController.isRefresh) refreshController.refreshCompleted();
if (mounted) setState(() {}); if (mounted) setState(() {});
} }

4
lib/mine/vip_detail_page.dart

@ -56,11 +56,11 @@ class _VipDetailPage extends State<VipDetailPage> {
if (result?.latitude != null && result?.longitude != null) { if (result?.latitude != null && result?.longitude != null) {
vipDetail(result?.latitude, result?.longitude); vipDetail(result?.latitude, result?.longitude);
} else { } else {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
} }
}).then((value) { }).then((value) {
if (!value) { if (!value) {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
refreshController.refreshFailed(); refreshController.refreshFailed();
} }
}); });

2
lib/order/bargain_group_order.dart

@ -181,6 +181,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
?.queryStoreInfo(activityOrderList[0].storeId ?? "") ?.queryStoreInfo(activityOrderList[0].storeId ?? "")
.catchError((error) { .catchError((error) {
debugPrint(error.toString()); debugPrint(error.toString());
return BaseData()..isSuccess = false;
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
storeInfo = StoreInfo.fromJson(baseData!.data); storeInfo = StoreInfo.fromJson(baseData!.data);
@ -191,7 +192,6 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
setState(() {}); setState(() {});
} }
} }
SmartDialog.dismiss();
} }
_refresh() { _refresh() {

1
lib/order/exchange_history_page.dart

@ -183,7 +183,6 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
_refreshController.loadFailed(); _refreshController.loadFailed();
} }
} finally { } finally {
SmartDialog.dismiss();
setState(() {}); setState(() {});
} }
} }

4
lib/order/invoices_manage/add_invoices_title.dart

@ -109,17 +109,15 @@ class _AddInvoicesTitle extends State<AddInvoicesTitle> {
}).catchError((error) { }).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center); alignment: Alignment.center);
return BaseData()..isSuccess = false;
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
Navigator.of(context).pop(); Navigator.of(context).pop();
Future.delayed(Duration(milliseconds: 500), () { Future.delayed(Duration(milliseconds: 500), () {
SmartDialog.showToast("添加抬头信息成功", alignment: Alignment.center); SmartDialog.showToast("添加抬头信息成功", alignment: Alignment.center);
}); });
} else {
SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center);
} }
} finally { } finally {
SmartDialog.dismiss();
} }
} }

18
lib/order/invoices_manage/edit_invoices_info.dart

@ -3,13 +3,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/utils/shared_preference.dart'; import 'package:huixiang/utils/shared_preference.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart'; import 'package:shimmer/shimmer.dart';
import '../../data/base_data.dart'; import '../../data/base_data.dart';
import '../../generated/l10n.dart'; import '../../generated/l10n.dart';
import '../../retrofit/retrofit_api.dart'; import '../../retrofit/retrofit_api.dart';
import '../../utils/flutter_utils.dart';
import '../../utils/font_weight.dart'; import '../../utils/font_weight.dart';
import '../../view_widget/my_appbar.dart'; import '../../view_widget/my_appbar.dart';
@ -95,16 +93,12 @@ class _EditInvoicesInfo extends State<EditInvoicesInfo> {
? mobile ? mobile
: editPhoneController.text, // : editPhoneController.text, //
}).catchError((error) { }).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), return BaseData()..isSuccess = false;
alignment: Alignment.center);
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
Navigator.of(context).pop(1); Navigator.of(context).pop(1);
} else {
SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center);
} }
} finally { } finally {
SmartDialog.dismiss();
} }
} }
@ -243,11 +237,11 @@ class _EditInvoicesInfo extends State<EditInvoicesInfo> {
arguments: { arguments: {
"enterType": 0, "enterType": 0,
}).then((value) { }).then((value) {
if (value != null) { if (value != null && value is Map) {
invoicesInfo = value as Map?; invoicesInfo = value;
headerId = (value as Map)['id']; headerId = value['id'];
phone = (value as Map)['phone']; phone = value['phone'];
name = (value as Map)['name']; name = value['name'];
setState(() {}); setState(() {});
} }
}); });

3
lib/order/invoices_manage/invoices_history.dart

@ -99,9 +99,8 @@ class _InvoicesHistory extends State<InvoicesHistory> {
msg: S.current.zhengzaijiazai, msg: S.current.zhengzaijiazai,
); );
await queryInvoiceList(); await queryInvoiceList();
SmartDialog.dismiss();
if (!mounted) return;
if (refreshController.isRefresh) refreshController.refreshCompleted(); if (refreshController.isRefresh) refreshController.refreshCompleted();
if (!mounted) return;
setState(() {}); setState(() {});
} }

3
lib/order/invoices_manage/invoices_manage_page.dart

@ -88,9 +88,8 @@ class _InvoicesManagePage extends State<InvoicesManagePage> {
msg: S.current.zhengzaijiazai, msg: S.current.zhengzaijiazai,
); );
await queryInvoiceList(); await queryInvoiceList();
SmartDialog.dismiss();
if (!mounted) return;
if (refreshController.isRefresh) refreshController.refreshCompleted(); if (refreshController.isRefresh) refreshController.refreshCompleted();
if (!mounted) return;
setState(() {}); setState(() {});
} }

4
lib/order/invoices_manage/invoices_title_info.dart

@ -58,7 +58,6 @@ class _InvoicesTitleInfo extends State<InvoicesTitleInfo> {
msg: S.current.zhengzaijiazai, msg: S.current.zhengzaijiazai,
); );
await queryInvoiceHeadersList(); await queryInvoiceHeadersList();
SmartDialog.dismiss();
if (!mounted) return; if (!mounted) return;
if (refreshController.isRefresh) refreshController.refreshCompleted(); if (refreshController.isRefresh) refreshController.refreshCompleted();
setState(() {}); setState(() {});
@ -123,11 +122,8 @@ class _InvoicesTitleInfo extends State<InvoicesTitleInfo> {
SmartDialog.showToast("删除信息成功", alignment: Alignment.center); SmartDialog.showToast("删除信息成功", alignment: Alignment.center);
}); });
networkStatus = 1; networkStatus = 1;
} else {
SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center);
} }
} finally { } finally {
SmartDialog.dismiss();
} }
} }

2
lib/order/logistics_information_page.dart

@ -13,8 +13,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
class LogisticsInformationPage extends StatefulWidget { class LogisticsInformationPage extends StatefulWidget {

3
lib/order/order_detail_page.dart

@ -129,11 +129,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
setState(() { setState(() {
statusTitle(); statusTitle();
}); });
SmartDialog.dismiss();
refreshController.refreshCompleted(); refreshController.refreshCompleted();
refreshController.loadComplete(); refreshController.loadComplete();
} else { } else {
SmartDialog.dismiss();
refreshController.refreshFailed(); refreshController.refreshFailed();
refreshController.loadFailed(); refreshController.loadFailed();
} }
@ -256,7 +254,6 @@ class _OrderDetailPage extends State<OrderDetailPage> {
payResult(BaseData baseData) async { payResult(BaseData baseData) async {
await queryDetails(); await queryDetails();
Future.delayed(Duration(milliseconds: 800), () { Future.delayed(Duration(milliseconds: 800), () {
SmartDialog.dismiss();
SmartDialog.showToast(baseData.msg == "ok" ? "订单支付成功" : "${baseData.msg}", SmartDialog.showToast(baseData.msg == "ok" ? "订单支付成功" : "${baseData.msg}",
alignment: Alignment.center); alignment: Alignment.center);
}); });

3
lib/order/order_history_page.dart

@ -207,7 +207,6 @@ class _OrderHistoryList extends State<OrderHistoryList>
refreshController.loadFailed(); refreshController.loadFailed();
} }
} finally { } finally {
SmartDialog.dismiss();
} }
} }
@ -592,7 +591,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
SmartDialog.show( SmartDialog.show(
builder: (ctx) => Tips( builder: (ctx) => Tips(
() { () {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.dialog);
}, },
text: "暂不支持此功能", text: "暂不支持此功能",
)); ));

2
lib/order/order_view/order_address.dart

@ -159,7 +159,7 @@ class _OrderAddress extends State<OrderAddress> {
callMobile(mobile); callMobile(mobile);
} }
} }
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.dialog);
}, },
leftText: S.of(context).quxiao, leftText: S.of(context).quxiao,
width: MediaQuery.of(context).size.width - 30.w, width: MediaQuery.of(context).size.width - 30.w,

1
lib/qr/invite_friends.dart

@ -98,7 +98,6 @@ class _InviteFriends extends State<InviteFriends> {
} else { } else {
refreshController.refreshFailed(); refreshController.refreshFailed();
} }
SmartDialog.dismiss();
} }
_onRefresh() { _onRefresh() {

1
lib/qr/qr_share.dart

@ -36,7 +36,6 @@ class _QrSharePage extends State<QrSharePage> {
@override @override
void dispose() { void dispose() {
SmartDialog.dismiss();
super.dispose(); super.dispose();
} }

5
lib/retrofit/min_api.dart

@ -100,9 +100,6 @@ abstract class MinApiService {
p(jsonEncode(response.data)); p(jsonEncode(response.data));
Map map = response.data; Map map = response.data;
if (map["code"] != 0) {
SmartDialog.dismiss();
}
if (map["code"] == 40005 || map["code"] == 40001) { if (map["code"] == 40005 || map["code"] == 40001) {
if (!LoginTipsDialog().isShow) { if (!LoginTipsDialog().isShow) {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
@ -125,7 +122,7 @@ abstract class MinApiService {
ErrorInterceptorHandler handler, ErrorInterceptorHandler handler,
) { ) {
if (SmartDialog.checkExist(dialogTypes: {SmartAllDialogType.loading})) { if (SmartDialog.checkExist(dialogTypes: {SmartAllDialogType.loading})) {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
} }
debugPrint( debugPrint(
"\n======================= Min_错误响应数据 ======================="); "\n======================= Min_错误响应数据 =======================");

13
lib/retrofit/retrofit_api.dart

@ -138,7 +138,7 @@ abstract class ApiService {
if (showLoading && if (showLoading &&
SmartDialog.checkExist( SmartDialog.checkExist(
dialogTypes: {SmartAllDialogType.loading})) { dialogTypes: {SmartAllDialogType.loading})) {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
} }
debugPrint("code = ${response.statusCode}"); debugPrint("code = ${response.statusCode}");
p(jsonEncode(response.data)); p(jsonEncode(response.data));
@ -150,8 +150,7 @@ abstract class ApiService {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
} }
} }
debugPrint( debugPrint("======================= 响应数据结束 =======================\n");
"======================= 响应数据结束 =======================\n");
if (map["code"] == 0 || map["code"] == 200) {} if (map["code"] == 0 || map["code"] == 200) {}
} }
} catch (e2) { } catch (e2) {
@ -162,12 +161,10 @@ abstract class ApiService {
DioException e, DioException e,
ErrorInterceptorHandler handler, ErrorInterceptorHandler handler,
) { ) {
if (SmartDialog.checkExist( if (SmartDialog.checkExist(dialogTypes: {SmartAllDialogType.loading})) {
dialogTypes: {SmartAllDialogType.loading})) { SmartDialog.dismiss(status: SmartStatus.loading);
SmartDialog.dismiss();
} }
debugPrint( debugPrint("\n======================= 错误响应数据 =======================");
"\n======================= 错误响应数据 =======================");
debugPrint("type = ${e.type}"); debugPrint("type = ${e.type}");
debugPrint("message = ${e.message}"); debugPrint("message = ${e.message}");
debugPrint("\n"); debugPrint("\n");

12
lib/settlement/settlement.dart

@ -302,7 +302,6 @@ class _Settlement extends State<Settlement> {
} }
} finally { } finally {
setState(() {}); setState(() {});
SmartDialog.dismiss();
} }
} }
@ -333,7 +332,6 @@ class _Settlement extends State<Settlement> {
coupons = minOrderInfo?.couponName ?? ""; coupons = minOrderInfo?.couponName ?? "";
}); });
} }
SmartDialog.dismiss();
} }
/// ///
@ -694,15 +692,9 @@ class _Settlement extends State<Settlement> {
queryOrderDetails(parentId); queryOrderDetails(parentId);
setState(() {}); setState(() {});
} }
} else {
// orderButton = false;
SmartDialog.showToast(baseData?.msg ?? "",
alignment: Alignment.center);
} }
} }
} finally { } finally {}
SmartDialog.dismiss();
}
} }
/// ///
@ -752,8 +744,6 @@ class _Settlement extends State<Settlement> {
sign: wxPay.sign!, sign: wxPay.sign!,
)); ));
} else { } else {
SmartDialog.dismiss();
SmartDialog.showToast("${baseData?.msg}", alignment: Alignment.center);
Future.delayed(Duration(seconds: 2), () { Future.delayed(Duration(seconds: 2), () {
toOrderDetails(placeOrderFirst!.id); toOrderDetails(placeOrderFirst!.id);
}); });

2
lib/store/shop_details_page.dart

@ -168,7 +168,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
} }
}); });
}); });
SmartDialog.dismiss();
refreshController.refreshCompleted(); refreshController.refreshCompleted();
} else { } else {
refreshController.refreshFailed(); refreshController.refreshFailed();
@ -338,7 +337,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
showStoreSelector(baseData!.data, id, count); showStoreSelector(baseData!.data, id, count);
} }
SmartDialog.dismiss();
} }
/// ///

2
lib/store/shopping/activity_prefecture_details.dart

@ -116,7 +116,6 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
showLoading: false, showLoading: false,
); );
queryFindActListByType(pageType == "2" ? false : true); queryFindActListByType(pageType == "2" ? false : true);
SmartDialog.dismiss();
} }
}); });
} }
@ -136,7 +135,6 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
setState(() {}); setState(() {});
} }
} }
SmartDialog.dismiss();
} }
///// /////

4
lib/store/shopping/shopping_goods_details.dart

@ -137,7 +137,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
); );
queryMemberInfo(); queryMemberInfo();
queryMiNiDetail(productId); queryMiNiDetail(productId);
SmartDialog.dismiss();
} }
}); });
} }
@ -166,7 +165,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
setState(() {}); setState(() {});
} }
} }
SmartDialog.dismiss();
} }
/// ///
@ -217,7 +215,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
// miNiDetail.attrList[0].attrValueList.length == 1) { // miNiDetail.attrList[0].attrValueList.length == 1) {
// _addShopCar(miNiDetail, [], count); // _addShopCar(miNiDetail, [], count);
// } else { // } else {
SmartDialog.dismiss();
dialogShowing = true; dialogShowing = true;
SmartDialog.show( SmartDialog.show(
builder: (ctx) { builder: (ctx) {
@ -303,7 +300,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
}, },
], ],
}).catchError((error) => BaseListData<ShoppingCart>()..isSuccess = false); }).catchError((error) => BaseListData<ShoppingCart>()..isSuccess = false);
SmartDialog.dismiss();
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
SmartDialog.showToast("添加购物车成功", alignment: Alignment.center); SmartDialog.showToast("添加购物车成功", alignment: Alignment.center);
} }

3
lib/store/shopping/shopping_mall_home.dart

@ -80,8 +80,6 @@ class _ShoppingMallHome extends State<ShoppingMallHome>
storeId: storeId, storeId: storeId,
showLoading: false, showLoading: false,
); );
SmartDialog.dismiss();
} }
}); });
} }
@ -101,7 +99,6 @@ class _ShoppingMallHome extends State<ShoppingMallHome>
setState(() {}); setState(() {});
} }
} }
SmartDialog.dismiss();
} }
@override @override

5
lib/store/store_order.dart

@ -701,7 +701,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
return; return;
} }
BaseData<MiniDetail>? baseData = await minService?.miNiDetail(id); BaseData<MiniDetail>? baseData = await minService?.miNiDetail(id);
SmartDialog.dismiss();
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
miniDetail = baseData!.data; miniDetail = baseData!.data;
if (baseData.data != null) { if (baseData.data != null) {
@ -862,10 +861,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
Map<String, dynamic> shopCarTemp = shopCarGoods?.toJson() ?? {}; Map<String, dynamic> shopCarTemp = shopCarGoods?.toJson() ?? {};
cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) - 1; cartSkuItem.buyNum = (cartSkuItem.buyNum ?? 0) - 1;
shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()]; shopCarTemp["shoppingCartSkuItemList"] = [cartSkuItem.toJson()];
BaseListData<ShoppingCart>? baseDate = BaseListData<ShoppingCart>? baseDate = await minService?.shoppingCartSingle(shopCarTemp);
await minService?.shoppingCartSingle(shopCarTemp);
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
SmartDialog.dismiss();
this.shopCarGoods = await queryShopCar(); this.shopCarGoods = await queryShopCar();
if (shopCartKey.currentState != null) { if (shopCartKey.currentState != null) {
shopCartKey.currentState!.setState(() {}); shopCartKey.currentState!.setState(() {});

1
lib/store/store_view/product_meals_sku.dart

@ -120,7 +120,6 @@ class _ProductMealsSku extends State<ProductMealsSku> {
BaseListData<ShoppingCart>? baseDate = await minService BaseListData<ShoppingCart>? baseDate = await minService
?.addShoppingCart(requestData) ?.addShoppingCart(requestData)
.catchError((error) => BaseListData<ShoppingCart>()..isSuccess = false); .catchError((error) => BaseListData<ShoppingCart>()..isSuccess = false);
SmartDialog.dismiss();
if (baseDate?.isSuccess ?? false) { if (baseDate?.isSuccess ?? false) {
Navigator.of(context).pop(); Navigator.of(context).pop();
} else { } else {

2
lib/union/union_details_page.dart

@ -298,7 +298,7 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
print("print 下载失败"); print("print 下载失败");
} }
Future.delayed(Duration(seconds: 1), () { Future.delayed(Duration(seconds: 1), () {
SmartDialog.dismiss(); SmartDialog.dismiss(status: SmartStatus.loading);
}); });
} }
} }

1
lib/union/union_list.dart

@ -80,7 +80,6 @@ class _UnionList extends State<UnionList> with AutomaticKeepAliveClientMixin {
_refreshController.refreshFailed(); _refreshController.refreshFailed();
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
} }
SmartDialog.dismiss();
if (!mounted) return; if (!mounted) return;
setState(() {}); setState(() {});
} }

2
lib/union/union_page.dart

@ -215,8 +215,8 @@ class UnionPageState extends State<UnionPage>
} }
} finally { } finally {
getLocation(showLoading: false); getLocation(showLoading: false);
SmartDialog.dismiss();
} }
SmartDialog.dismiss();
} }
loadFinish({bool showLoading = true}) { loadFinish({bool showLoading = true}) {

7
lib/utils/upload_async.dart

@ -120,17 +120,12 @@ class UploadAsync {
"location": addressText, "location": addressText,
"longitude": "", "longitude": "",
}).catchError((onError) { }).catchError((onError) {
SmartDialog.dismiss();
}); });
if (baseData?.isSuccess ?? false) { if (baseData?.isSuccess ?? false) {
SmartDialog.showToast("发布成功!"); SmartDialog.showToast("发布成功!");
UploadInstance.instance.notifyAllObservers(); UploadInstance.instance.notifyAllObservers();
} else {
if (baseData.msg?.isNotEmpty ?? false) {
SmartDialog.showToast("${baseData.msg}", alignment: Alignment.center);
}
} }
SmartDialog.dismiss();
}); });
} }

1
lib/view_widget/vip_dialog.dart

@ -53,7 +53,6 @@ class _VipDialog extends State<VipDialog> {
} }
}); });
} }
SmartDialog.dismiss();
} }
@override @override

Loading…
Cancel
Save