x1ongzhu 6 years ago
parent
commit
c6156a58d8
5 changed files with 12 additions and 9 deletions
  1. 7 4
      lib/main.dart
  2. 1 1
      lib/model/PlayerInfo.dart
  3. 1 1
      lib/model/PlayerInfo.g.dart
  4. 2 2
      lib/net/HttpManager.dart
  5. 1 1
      lib/pages/TipInfo.dart

+ 7 - 4
lib/main.dart

@@ -77,10 +77,13 @@ Future<void> main() async {
 
   if (debugMode() && HttpManager.token.isEmpty) {
     HttpManager.token = ''
-        'eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIwOTkyZDBkMC0xN2Y3LTQ2'
-        'NzktOTY4My01YWFlY2VlZmU1YzgiLCJpc3MiOiJhZG1pbiIsImlh'
-        'dCI6MTU2MDk5NTYwNCwic3ViIjoiODQ3MDMiLCJleHAiOjE1NjM1'
-        'ODc2MDR9.WBB9F2KBb_xOv3rXnyxCVXYTC7_BiqhS1IFhMcnKvT8';
+        'eyJhbGciOiJIUzI1NiJ9.eyJqdGkiO'
+        'iI2Mzk2MDcxOS00ODBkLTRmMDgtYmF'
+        'mYi1mMjdhN2ZhN2JmNWMiLCJpc3MiO'
+        'iJhZG1pbiIsImlhdCI6MTU2NDAyMzM'
+        '0Mywic3ViIjoiODQ4NDgiLCJleHAiO'
+        'jE1NjY2MTUzNDN9.UGLtR6y6nNzo9t'
+        '94Wzfpk1Bo3YNIMuaSxEAIEebkVfs';
   }
 
   Result result = await HttpManager.get('userInfo/getUserInfo');

+ 1 - 1
lib/model/PlayerInfo.dart

@@ -44,7 +44,7 @@ class PlayerInfo {
   int points; //积分
   GameInfo gameInfo;
   HouseInfo houseInfo;
-  String liveTime;
+  double liveTime;
   double score;
   int rank; //名次
   int ranking;

+ 1 - 1
lib/model/PlayerInfo.g.dart

@@ -22,7 +22,7 @@ PlayerInfo _$PlayerInfoFromJson(Map<String, dynamic> json) {
       json['houseInfo'] == null
           ? null
           : HouseInfo.fromJson(json['houseInfo'] as Map<String, dynamic>),
-      json['liveTime'] as String,
+      (json['liveTime'] as num)?.toDouble(),
       (json['score'] as num)?.toDouble(),
       json['rank'] as int,
       json['ranking'] as int,

+ 2 - 2
lib/net/HttpManager.dart

@@ -3,8 +3,8 @@ import 'Result.dart';
 import 'package:intl/intl.dart';
 
 class HttpManager {
-   static String baseUrl = 'http://123.58.240.138:8090/';
-//  static String baseUrl = 'http://192.168.50.132:8080/';
+  //  static String baseUrl = 'http://123.58.240.138:8090/';
+ static String baseUrl = 'http://192.168.50.132:8080/';
   static String token;
   static bool debug;
 

+ 1 - 1
lib/pages/TipInfo.dart

@@ -321,7 +321,7 @@ class TipInfoState extends State<TipInfo> {
                             child: Container(
                               margin: EdgeInsets.only(left: 5),
                               child: Text(
-                                (notice.playerInfo?.liveTime ?? '') + '分钟',
+                                (notice.playerInfo?.liveTime?.toString() ?? '') + '分钟',
                                 style: TextStyle(color: Colors.yellow, fontSize: 14, fontWeight: FontWeight.bold),
                               ),
                             ),