diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index 1a609062..7514b407 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -72,15 +72,16 @@ class _PointsMallPage extends State } refreshUserInfo() { - SharedPreferences.getInstance().then((value) => { - client = ApiService(Dio(), - context: context, - token: value.getString('token'), - showLoading: false), - SmartDialog.showLoading(msg: S.current.zhengzaijiazai), - creditGoods(categoryId), - queryUser(), - }); + if(mounted) + SharedPreferences.getInstance().then((value) => { + client = ApiService(Dio(), + context: context, + token: value.getString('token'), + showLoading: false), + SmartDialog.showLoading(msg: S.current.zhengzaijiazai), + creditGoods(categoryId), + queryUser(), + }); } int pageNum = 1;