| | |
| | | |
| | | import 'package:flutter/cupertino.dart'; |
| | | import 'package:flutter/material.dart'; |
| | | import 'package:makemoney/api/msg_api.dart'; |
| | | import 'package:makemoney/api/team_api.dart'; |
| | | import 'package:makemoney/model/msg/app_notify_msg_model.dart'; |
| | | import 'package:makemoney/model/team/team_member_list_vo.dart'; |
| | | import 'package:makemoney/ui/mine/invite_friends.dart'; |
| | | import 'package:makemoney/ui/widget/base_ui.dart'; |
| | | import 'package:makemoney/ui/widget/button.dart'; |
| | | import 'package:makemoney/ui/widget/images_widget.dart'; |
| | | import 'package:makemoney/ui/widget/refresh_listview.dart'; |
| | |
| | | level = widget.first ? 0 : 1; |
| | | }); |
| | | _refresh(); |
| | | _getNotify(); |
| | | } |
| | | |
| | | BoxDecoration getItemDecoration(Color bgColor, Color shadowColor) { |
| | |
| | | |
| | | _refreshController.refreshCompleted(); |
| | | _refreshController.loadComplete(); |
| | | |
| | | if (result == null && |
| | | _page == 1 && |
| | | (_teamList == null || _teamList!.isEmpty)) { |
| | | _refreshController.apiError!(); |
| | | } |
| | | |
| | | if (result == null || result["code"] != 0) { |
| | | //页码回滚 |
| | | if (_page > 1) { |
| | |
| | | } |
| | | } |
| | | |
| | | AppNotifyMsgModel? _notifyMsg; |
| | | |
| | | void _getNotify() async { |
| | | AppNotifyMsgModel? notifyMsgModel = |
| | | await MsgApiUtil.getNotifyMsg(context, "team"); |
| | | setState(() { |
| | | _notifyMsg = notifyMsgModel; |
| | | }); |
| | | } |
| | | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return Scaffold( |
| | |
| | | height: 20, |
| | | ), |
| | | rightClick: () { |
| | | NavigatorUtil.navigateToNextPage(context, InviteFriendsPage(title: ""), (data) { }); |
| | | NavigatorUtil.navigateToNextPage( |
| | | context, InviteFriendsPage(title: ""), (data) {}); |
| | | }, |
| | | ), |
| | | Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ |
| | | Expanded(flex: 1, child: getNavItem("直接队员", 0)), |
| | | Container( |
| | | width: 1, |
| | | height: 20, |
| | | color: const Color(0xFFE0E0E0), |
| | | ), |
| | | Expanded(flex: 1, child: getNavItem("间接队员", 1)), |
| | | ]), |
| | | // Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ |
| | | // Expanded(flex: 1, child: getNavItem("直接队员", 0)), |
| | | // Container( |
| | | // width: 1, |
| | | // height: 20, |
| | | // color: const Color(0xFFE0E0E0), |
| | | // ), |
| | | // Expanded(flex: 1, child: getNavItem("间接队员", 1)), |
| | | // ]), |
| | | |
| | | //通知消息 |
| | | _notifyMsg == null |
| | | ? Container() |
| | | : NotifyWidget(_notifyMsg!.content!, |
| | | textColor: const Color(0xFFFF8316), |
| | | bgColor: const Color(0xFFF5EBA4), |
| | | paddingRight: 0), |
| | | Expanded( |
| | | child: Container( |
| | | color: Color(0xFFF0F0F0), |
| | | color: const Color(0xFFF0F0F0), |
| | | child: RefreshListView( |
| | | refreshController: _refreshController, |
| | | refresh: () { |
| | |
| | | height: 44, |
| | | fontSize: 15, |
| | | onClick: () { |
| | | NavigatorUtil.navigateToNextPage(context, InviteFriendsPage(title: ""), (data) { }); |
| | | NavigatorUtil.navigateToNextPage(context, |
| | | InviteFriendsPage(title: ""), (data) {}); |
| | | }, |
| | | )), |
| | | InkWell( |
| | | onTap: () { |
| | | print("跳转帮助"); |
| | | ConfigUtil.getConfig(context, "helpLink") |
| | | .then((value) { |
| | | if (value == null) { |
| | | return; |
| | | } |
| | | NavigatorUtil.navigateToNextPage( |
| | | context, |
| | | BrowserPage(title: "帮助中心", url: value), |
| | | (data) {}); |
| | | }); |
| | | }, |
| | | child: const Padding( |
| | | padding: EdgeInsets.all(10), |
| | |
| | | height: 45, |
| | | )), |
| | | const SizedBox( |
| | | width: 5, |
| | | width: 12, |
| | | ), |
| | | Expanded( |
| | | child: Container( |
| | |
| | | _teamList![index].todayGoldCorn == 0 |
| | | ? Container() |
| | | : Column( |
| | | crossAxisAlignment: CrossAxisAlignment.center, |
| | | crossAxisAlignment: CrossAxisAlignment.end, |
| | | mainAxisAlignment: MainAxisAlignment.center, |
| | | children: [ |
| | | const Text( |