admin
2022-05-05 355fe96b2a4c7821256d9e8828d2cb9539904878
flutter_module/lib/ui/mine/team.dart
@@ -3,9 +3,12 @@
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';
@@ -56,6 +59,7 @@
      level = widget.first ? 0 : 1;
    });
    _refresh();
    _getNotify();
  }
  BoxDecoration getItemDecoration(Color bgColor, Color shadowColor) {
@@ -97,6 +101,13 @@
    _refreshController.refreshCompleted();
    _refreshController.loadComplete();
    if (result == null &&
        _page == 1 &&
        (_teamList == null || _teamList!.isEmpty)) {
      _refreshController.apiError!();
    }
    if (result == null || result["code"] != 0) {
      //页码回滚
      if (_page > 1) {
@@ -139,6 +150,16 @@
    }
  }
  AppNotifyMsgModel? _notifyMsg;
  void _getNotify() async {
    AppNotifyMsgModel? notifyMsgModel =
        await MsgApiUtil.getNotifyMsg(context, "team");
    setState(() {
      _notifyMsg = notifyMsgModel;
    });
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
@@ -152,21 +173,30 @@
                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: () {
@@ -194,12 +224,22 @@
                                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),
@@ -277,7 +317,7 @@
                height: 45,
              )),
          const SizedBox(
            width: 5,
            width: 12,
          ),
          Expanded(
              child: Container(
@@ -315,7 +355,7 @@
                  _teamList![index].todayGoldCorn == 0
              ? Container()
              : Column(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.end,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    const Text(