From 355fe96b2a4c7821256d9e8828d2cb9539904878 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 05 五月 2022 19:29:16 +0800
Subject: [PATCH] 功能完善

---
 flutter_module/lib/ui/mine/team.dart |   70 +++++++++++++++++++++++++++-------
 1 files changed, 55 insertions(+), 15 deletions(-)

diff --git a/flutter_module/lib/ui/mine/team.dart b/flutter_module/lib/ui/mine/team.dart
index 765a36f..3bde577 100644
--- a/flutter_module/lib/ui/mine/team.dart
+++ b/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(

--
Gitblit v1.8.0