diff --git a/assets/image/2x/di_zhi.png b/assets/image/2x/di_zhi.png new file mode 100644 index 00000000..723f79c8 Binary files /dev/null and b/assets/image/2x/di_zhi.png differ diff --git a/assets/image/2x/ding_dan.png b/assets/image/2x/ding_dan.png new file mode 100644 index 00000000..da1a9bc6 Binary files /dev/null and b/assets/image/2x/ding_dan.png differ diff --git a/assets/image/2x/dong_tai.png b/assets/image/2x/dong_tai.png new file mode 100644 index 00000000..e264afcf Binary files /dev/null and b/assets/image/2x/dong_tai.png differ diff --git a/assets/image/2x/fen_si.png b/assets/image/2x/fen_si.png new file mode 100644 index 00000000..76aec509 Binary files /dev/null and b/assets/image/2x/fen_si.png differ diff --git a/assets/image/2x/guan_zhu.png b/assets/image/2x/guan_zhu.png new file mode 100644 index 00000000..4100e4e5 Binary files /dev/null and b/assets/image/2x/guan_zhu.png differ diff --git a/assets/image/2x/ka.png b/assets/image/2x/ka.png new file mode 100644 index 00000000..bb66655b Binary files /dev/null and b/assets/image/2x/ka.png differ diff --git a/assets/image/2x/shopping_k.png b/assets/image/2x/shopping_k.png new file mode 100644 index 00000000..09a1f810 Binary files /dev/null and b/assets/image/2x/shopping_k.png differ diff --git a/assets/image/2x/xiao_fei.png b/assets/image/2x/xiao_fei.png new file mode 100644 index 00000000..ff427bb8 Binary files /dev/null and b/assets/image/2x/xiao_fei.png differ diff --git a/assets/image/3x/di_zhi.png b/assets/image/3x/di_zhi.png new file mode 100644 index 00000000..47fea0b9 Binary files /dev/null and b/assets/image/3x/di_zhi.png differ diff --git a/assets/image/3x/ding_dan.png b/assets/image/3x/ding_dan.png new file mode 100644 index 00000000..415d6844 Binary files /dev/null and b/assets/image/3x/ding_dan.png differ diff --git a/assets/image/3x/dong_tai.png b/assets/image/3x/dong_tai.png new file mode 100644 index 00000000..0f509803 Binary files /dev/null and b/assets/image/3x/dong_tai.png differ diff --git a/assets/image/3x/fen_si.png b/assets/image/3x/fen_si.png new file mode 100644 index 00000000..999e78ba Binary files /dev/null and b/assets/image/3x/fen_si.png differ diff --git a/assets/image/3x/guan_zhu.png b/assets/image/3x/guan_zhu.png new file mode 100644 index 00000000..94d3d42e Binary files /dev/null and b/assets/image/3x/guan_zhu.png differ diff --git a/assets/image/3x/ka.png b/assets/image/3x/ka.png new file mode 100644 index 00000000..c05163f3 Binary files /dev/null and b/assets/image/3x/ka.png differ diff --git a/assets/image/3x/shopping_k.png b/assets/image/3x/shopping_k.png new file mode 100644 index 00000000..b15bb5a5 Binary files /dev/null and b/assets/image/3x/shopping_k.png differ diff --git a/assets/image/3x/xiao_fei.png b/assets/image/3x/xiao_fei.png new file mode 100644 index 00000000..561d6005 Binary files /dev/null and b/assets/image/3x/xiao_fei.png differ diff --git a/assets/image/di_zhi.png b/assets/image/di_zhi.png new file mode 100644 index 00000000..469c5e6a Binary files /dev/null and b/assets/image/di_zhi.png differ diff --git a/assets/image/ding_dan.png b/assets/image/ding_dan.png new file mode 100644 index 00000000..c64ac543 Binary files /dev/null and b/assets/image/ding_dan.png differ diff --git a/assets/image/dong_tai.png b/assets/image/dong_tai.png new file mode 100644 index 00000000..54d4b464 Binary files /dev/null and b/assets/image/dong_tai.png differ diff --git a/assets/image/fen_si.png b/assets/image/fen_si.png new file mode 100644 index 00000000..48715fb2 Binary files /dev/null and b/assets/image/fen_si.png differ diff --git a/assets/image/guan_zhu.png b/assets/image/guan_zhu.png new file mode 100644 index 00000000..63eb501f Binary files /dev/null and b/assets/image/guan_zhu.png differ diff --git a/assets/image/ka.png b/assets/image/ka.png new file mode 100644 index 00000000..dfe1580a Binary files /dev/null and b/assets/image/ka.png differ diff --git a/assets/image/shopping_k.png b/assets/image/shopping_k.png new file mode 100644 index 00000000..e03be6e7 Binary files /dev/null and b/assets/image/shopping_k.png differ diff --git a/assets/image/xiao_fei.png b/assets/image/xiao_fei.png new file mode 100644 index 00000000..11363d43 Binary files /dev/null and b/assets/image/xiao_fei.png differ diff --git a/lib/community/community_child_page.dart b/lib/community/community_child_page.dart index 449d5701..6747abf6 100644 --- a/lib/community/community_child_page.dart +++ b/lib/community/community_child_page.dart @@ -10,8 +10,10 @@ import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/my_footer.dart'; +import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; class CommunityChildPage extends StatefulWidget { final String typeStr; @@ -81,7 +83,7 @@ class _CommunityChildPage extends State with AutomaticKeepAl article.id = element.id; article.content = jsonEncode(element.subjectInfo); article.mainTitle =element.subject; - article.liked = element.selfFollow; + article.isFollow = element.selfFollow; article.authorHeadImg = element.memberInfo?.avatar; article.authorName = element.memberInfo?.nickname; article.createTime = element.createTime; @@ -121,7 +123,13 @@ class _CommunityChildPage extends State with AutomaticKeepAl isLoadMore = true; setState(() {}); }, - child: ListView.builder( + child: (articles == null || articles.length == 0)? NoDataView( + src: "assets/image/guan_zhu.png", + isShowBtn: false, + text: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w), + ):ListView.builder( physics: NeverScrollableScrollPhysics(), itemBuilder: (context, position) { return InkWell( @@ -145,7 +153,9 @@ class _CommunityChildPage extends State with AutomaticKeepAl }, ).then((value) { _onRefresh(); + setState(() {}); }); + setState(() {}); }, ); }, diff --git a/lib/community/community_view/community_dynamic.dart b/lib/community/community_view/community_dynamic.dart index 148d6d8a..6e894817 100644 --- a/lib/community/community_view/community_dynamic.dart +++ b/lib/community/community_view/community_dynamic.dart @@ -227,8 +227,7 @@ class _CommunityDynamic extends State { onTap: () { setState(() { if (widget.commentType == 0) { - widget.article.isFollow = - !(widget.article.isFollow ?? false); + widget.article.isFollow = !(widget.article.isFollow ?? false); _vipFollow(widget.article.updateUser, widget.article.isFollow ?? false); } else { diff --git a/lib/message/system_details.dart b/lib/message/system_details.dart index d64c85e9..c3593d90 100644 --- a/lib/message/system_details.dart +++ b/lib/message/system_details.dart @@ -198,6 +198,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( + src: "assets/image/icon_empty.png", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, @@ -322,6 +323,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( + src:"assets/image/icon_empty.png", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, @@ -457,6 +459,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( + src:"assets/image/icon_empty.png", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, @@ -603,6 +606,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( + src:"assets/image/icon_empty.png", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, @@ -846,6 +850,7 @@ class _SystemDetails extends State { children: [ (messages == null || messages.length == 0) ? NoDataView( + src:"assets/image/icon_empty.png", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, diff --git a/lib/message/system_message.dart b/lib/message/system_message.dart index 35fa22e2..ff302caf 100644 --- a/lib/message/system_message.dart +++ b/lib/message/system_message.dart @@ -403,6 +403,7 @@ class _SystemMessagePage extends State { ), (messages == null || messages.length == 0) ? NoDataView( + src: "assets/image/icon_empty.png", isShowBtn: false, text: S.of(context).haimeiyouxiaoxi, fontSize: 16.sp, diff --git a/lib/mine/coupons_page.dart b/lib/mine/coupons_page.dart index 1d89e3e3..b8803e8d 100644 --- a/lib/mine/coupons_page.dart +++ b/lib/mine/coupons_page.dart @@ -200,6 +200,7 @@ class _CouponsPage extends State { itemCount: coupons != null ? coupons.length : 0, ) : NoDataView( + src:"assets/image/ka.png", isShowBtn: false, text: "你还没有券~", fontSize: 16.sp, diff --git a/lib/mine/fans_page.dart b/lib/mine/fans_page.dart index c69c6ccb..65df75bc 100644 --- a/lib/mine/fans_page.dart +++ b/lib/mine/fans_page.dart @@ -10,6 +10,7 @@ import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/my_footer.dart'; +import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:huixiang/view_widget/round_button.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -110,7 +111,13 @@ class _FansPage extends State { controller: _refreshController, onRefresh: (){_queryFollowList();}, physics: BouncingScrollPhysics(), - child: ListView.builder( + child: (list == null || list.length == 0)? NoDataView( + src: "assets/image/fen_si.png", + isShowBtn: false, + text: "目前暂无粉丝,听说多发动态可以涨粉哦~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w), + ):ListView.builder( itemCount: list == null ? 0 : list.length, padding: EdgeInsets.symmetric(vertical: 8.h), shrinkWrap: true, diff --git a/lib/mine/follow_page.dart b/lib/mine/follow_page.dart index 8a09f3d1..fb6f5850 100644 --- a/lib/mine/follow_page.dart +++ b/lib/mine/follow_page.dart @@ -112,7 +112,13 @@ class _FollowPage extends State { controller: _refreshController, onRefresh: (){_queryFollowList();}, physics: BouncingScrollPhysics(), - child: ListView.builder( + child:(list == null || list.length == 0)? NoDataView( + src: "assets/image/guan_zhu.png", + isShowBtn: false, + text: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~", + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w), + ):ListView.builder( itemCount: list == null ? 0 : list.length, shrinkWrap: true, physics: NeverScrollableScrollPhysics(), @@ -123,13 +129,7 @@ class _FollowPage extends State { child: followItem(list[position]), ); }, - ), - // NoDataView( - // isShowBtn: false, - // text: "共关注0人", - // fontSize: 16.sp, - // margin: EdgeInsets.only(top: 120.h), - // ), + ) ), ), diff --git a/lib/mine/invitation_record.dart b/lib/mine/invitation_record.dart index 359a2698..c401ab63 100644 --- a/lib/mine/invitation_record.dart +++ b/lib/mine/invitation_record.dart @@ -305,6 +305,7 @@ class _InvitationRecord extends State Expanded(child: (invitationList.length == null || invitationList.length == 0) ? NoDataView( + src: "assets/image/icon_empty.png", isShowBtn: false, text:"还没有邀请记录哦~", fontSize: 16.sp, diff --git a/lib/mine/manage_address_page.dart b/lib/mine/manage_address_page.dart index 890eaf5b..b432cc10 100644 --- a/lib/mine/manage_address_page.dart +++ b/lib/mine/manage_address_page.dart @@ -66,6 +66,7 @@ class _ManageAddressPage extends State { Expanded( child: (addressList == null || addressList.length == 0) ? NoDataView( + src:"assets/image/di_zhi.png", isShowBtn: false, text: "目前暂无送货地址,请添加", fontSize: 16.sp, diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart index faf730b8..eb9b2ee0 100644 --- a/lib/mine/mine_wallet_page.dart +++ b/lib/mine/mine_wallet_page.dart @@ -172,6 +172,7 @@ class _MineWalletPage extends State { margin: EdgeInsets.only(top: 14.h), child: (userBills == null || userBills.length == 0) ? NoDataView( + src: "assets/image/xiao_fei.png", isShowBtn: false, text: "目前暂未记录哦", fontSize: 16.sp, diff --git a/lib/mine/release_page.dart b/lib/mine/release_page.dart index c09215f2..d38f1ba1 100644 --- a/lib/mine/release_page.dart +++ b/lib/mine/release_page.dart @@ -76,7 +76,7 @@ class _ReleasePage extends State { article.id = element.id; article.content = jsonEncode(element.subjectInfo); article.mainTitle =element.subject; - article.liked = element.selfFollow; + article.isFollow = element.selfFollow; article.authorHeadImg = element.memberInfo?.avatar; article.authorName = element.memberInfo?.nickname; article.createTime = element.createTime; @@ -132,7 +132,9 @@ class _ReleasePage extends State { _onRefresh(); });}, removalDynamic: () { - _onRefresh(); + setState(() { + _onRefresh(); + }); }, ), onTap: () { @@ -141,7 +143,9 @@ class _ReleasePage extends State { arguments: { "businessId": articles[position].id,"userId":userId, }, - ); + ).then((value) { + _onRefresh(); + }); }, ); }, diff --git a/lib/mine/roll_center_page.dart b/lib/mine/roll_center_page.dart index d4a5eccc..582a5291 100644 --- a/lib/mine/roll_center_page.dart +++ b/lib/mine/roll_center_page.dart @@ -152,6 +152,7 @@ class _RollCenterPage extends State { itemCount: (coupons != null && coupons.length > 0) ? coupons.length : 0, ) : NoDataView( + src: "assets/image/ka.png", isShowBtn: false, text: S.of(context).haimeiyouyouhuiquankeyilingqu, fontSize: 16.sp, diff --git a/lib/mine/vip_balance_page.dart b/lib/mine/vip_balance_page.dart index 24e90cc2..6715b87b 100644 --- a/lib/mine/vip_balance_page.dart +++ b/lib/mine/vip_balance_page.dart @@ -92,6 +92,7 @@ class _VipBalancePage extends State { body: Container( child: (userBills == null || userBills.length == 0) ? NoDataView( + src: "assets/image/icon_empty.png", isShowBtn: false, text: S.of(context).nihaimeiyouchongzhihuoxiaofeijilu, fontSize: 16.sp, diff --git a/lib/mine/vip_card_page.dart b/lib/mine/vip_card_page.dart index 55cb6dfd..a7df5bb5 100644 --- a/lib/mine/vip_card_page.dart +++ b/lib/mine/vip_card_page.dart @@ -88,6 +88,7 @@ class _VipCardPage extends State { itemCount: coupons != null ? coupons.length : 0, ) : NoDataView( + src: "assets/image/icon_empty.png", isShowBtn: false, text: "还没有会员卡~", fontSize: 16.sp, diff --git a/lib/order/exchange_history_page.dart b/lib/order/exchange_history_page.dart index 36f293c0..157b1a76 100644 --- a/lib/order/exchange_history_page.dart +++ b/lib/order/exchange_history_page.dart @@ -192,6 +192,7 @@ class _ExchangeHistoryList extends State { onLoading: queryHistory, child: orders == null || orders.length == 0 ? NoDataView( + src: "assets/image/ding_dan.png", isShowBtn: false, text: "暂无已完成的订单", fontSize: 16.sp, diff --git a/lib/order/logistics_information_page.dart b/lib/order/logistics_information_page.dart index 2b70548d..8af795c2 100644 --- a/lib/order/logistics_information_page.dart +++ b/lib/order/logistics_information_page.dart @@ -153,6 +153,7 @@ class _LogisticsInformationPage extends State { position, logistics.length); }) : NoDataView( + src: "assets/image/ding_dan.png", isShowBtn: false, text: "暂无物流信息~", fontSize: 16.sp, diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 0e2dc417..94172cf1 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -156,6 +156,7 @@ class _OrderHistoryList extends State ); }) : NoDataView( + src: "assets/image/ding_dan.png", isShowBtn: false, text: "还没有订单,快去下一单吧~", fontSize: 16.sp, @@ -411,7 +412,8 @@ class _OrderHistoryList extends State ), ), TextSpan( - text: totalPrice(orderInfo), + // text: totalPrice(orderInfo), + text:orderInfo.finalPayPrice, style: TextStyle( fontSize: 12.sp, fontWeight: FontWeight.bold, diff --git a/lib/store/store_view/store_activity.dart b/lib/store/store_view/store_activity.dart index 7c385d3e..7739e695 100644 --- a/lib/store/store_view/store_activity.dart +++ b/lib/store/store_view/store_activity.dart @@ -30,6 +30,7 @@ class _StoreActivity extends State { ), color: Colors.white, child: NoDataView( + src: "assets/image/icon_empty.png", isShowBtn: false, text: "还没有活动~", iconWidth: 220, diff --git a/lib/view_widget/no_data_view.dart b/lib/view_widget/no_data_view.dart index 28a5ddce..6ad3d0b2 100644 --- a/lib/view_widget/no_data_view.dart +++ b/lib/view_widget/no_data_view.dart @@ -3,6 +3,7 @@ import 'package:huixiang/view_widget/round_button.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class NoDataView extends StatelessWidget { + final String src; final bool isShowBtn; final String text; final double fontSize; @@ -11,6 +12,7 @@ class NoDataView extends StatelessWidget { final EdgeInsets margin; NoDataView({ + this.src, this.isShowBtn = true, this.text, this.fontSize, @@ -27,7 +29,7 @@ class NoDataView extends StatelessWidget { child: Column( children: [ Image( - image: AssetImage("assets/image/icon_empty.png"), + image: AssetImage(src), width: iconWidth, height: iconHeight, ), @@ -36,8 +38,10 @@ class NoDataView extends StatelessWidget { ), Text( text, + textAlign: TextAlign.center, style: TextStyle( fontSize: fontSize, + height: 1.5, color: Color(0xFF353535), ), ), @@ -60,4 +64,4 @@ class NoDataView extends StatelessWidget { ), ); } -} +} \ No newline at end of file