x1ongzhu 6 anos atrás
pai
commit
cc6efdc5c5
4 arquivos alterados com 25 adições e 31 exclusões
  1. 1 1
      lib/net/HttpManager.dart
  2. 23 5
      lib/pages/HomePage.dart
  3. 1 1
      lib/pages/roomInfo.dart
  4. 0 24
      lib/styles/api.dart

+ 1 - 1
lib/net/HttpManager.dart

@@ -3,7 +3,7 @@ import 'Result.dart';
 import 'package:intl/intl.dart';
 import 'package:intl/intl.dart';
 
 
 class HttpManager {
 class HttpManager {
-  static String baseUrl = "http://49.4.66.233:8201/";
+  static String baseUrl = "http://47.96.141.102:8201/";
   // static String baseUrl='http://192.168.50.121:8080/';
   // static String baseUrl='http://192.168.50.121:8080/';
   static String token;
   static String token;
   static bool debug;
   static bool debug;

+ 23 - 5
lib/pages/HomePage.dart

@@ -35,7 +35,6 @@ class _HomePageState extends State<HomePage> {
       setState(() {
       setState(() {
         seasonList = list;
         seasonList = list;
       });
       });
-      print(seasonList);
     } else {}
     } else {}
   }
   }
 
 
@@ -287,6 +286,7 @@ class _HomePageState extends State<HomePage> {
                 onTapHomeMenu: () {
                 onTapHomeMenu: () {
                   Navigator.push(context, new CupertinoPageRoute(builder: (context) => new TipList()));
                   Navigator.push(context, new CupertinoPageRoute(builder: (context) => new TipList()));
                 },
                 },
+                showBadge: true,
               ),
               ),
             ],
             ],
           ),
           ),
@@ -302,7 +302,8 @@ class HomeMenu extends StatelessWidget {
   final String icon;
   final String icon;
   final String title;
   final String title;
   final OnTapHomeMenu onTapHomeMenu;
   final OnTapHomeMenu onTapHomeMenu;
-  HomeMenu(this.icon, this.title, {this.onTapHomeMenu});
+  final bool showBadge;
+  HomeMenu(this.icon, this.title, {this.onTapHomeMenu, this.showBadge = false});
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     return Container(
     return Container(
@@ -323,11 +324,28 @@ class HomeMenu extends StatelessWidget {
               child: Column(
               child: Column(
                 mainAxisAlignment: MainAxisAlignment.center,
                 mainAxisAlignment: MainAxisAlignment.center,
                 children: <Widget>[
                 children: <Widget>[
-                  Image.asset(
-                    icon,
-                    fit: BoxFit.contain,
+                  Container(
                     width: 44,
                     width: 44,
                     height: 34,
                     height: 34,
+                    child: Stack(
+                      children: <Widget>[
+                        Image.asset(
+                          icon,
+                          fit: BoxFit.contain,
+                          width: 44,
+                          height: 34,
+                        ),
+                        Positioned(
+                          right: 0,
+                          top: 0,
+                          child: Container(
+                            width: showBadge ? 10 : 0,
+                            height: showBadge ? 10 : 0,
+                            decoration: BoxDecoration(color: Color.fromARGB(255, 239, 0, 9), borderRadius: BorderRadius.all(Radius.circular(10))),
+                          ),
+                        )
+                      ],
+                    ),
                   ),
                   ),
                   Text(
                   Text(
                     title,
                     title,

+ 1 - 1
lib/pages/roomInfo.dart

@@ -98,7 +98,7 @@ class RoomInfoState extends State<RoomInfo>
     bool success=true;
     bool success=true;
     if (result) {
     if (result) {
       success = await ScreenStreamPlugin.start(
       success = await ScreenStreamPlugin.start(
-          'rtmp://49.4.66.233:1935/myapp/' +
+          'rtmp://47.96.141.102:1935/myapp/' +
               playerInfo.userId.toString() +
               playerInfo.userId.toString() +
               '?playerInfoId=' +
               '?playerInfoId=' +
               playerInfo.id.toString());
               playerInfo.id.toString());

+ 0 - 24
lib/styles/api.dart

@@ -1,24 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:intl/intl.dart';
-
-String domain='http://49.4.66.233:8201/';
-// String domain='http://192.168.50.121:8080/'; //本地ip
-
-String debugID='84671';//测试id
-
-bool isDebug=false;//是否测试(未链接登录需要该值获取测试id)
-
-bool checkPhone (phone){
-    bool result = false;
-    RegExp exp=new RegExp(r"^1[3|4|5|8|7|6|9][0-9]\d{8}$");
-    if (exp.hasMatch(phone)) {
-        result = true;
-    }
-    return result;
-}
-
-String readTimestamp(int timestamp,String _timeType) {
-   
-
-    return DateFormat(_timeType).format(DateTime.fromMillisecondsSinceEpoch(timestamp));
-  }