x1ongzhu há 6 anos atrás
pai
commit
4f9bf8b12f

+ 4 - 2
lib/pages/CompetitionInformation.dart

@@ -1,3 +1,5 @@
+import 'dart:io';
+
 import 'package:flutter/material.dart';
 import 'package:flutter_swiper/flutter_swiper.dart';
 import 'package:wanna_battle/model/HouseInfo.dart';
@@ -283,11 +285,11 @@ class InfoBox extends StatelessWidget {
                     style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
                   ),
                   TextSpan(
-                    text: '完成杀人目标后立刻点击',
+                    text:Platform.isIOS?'完成杀人目标后立刻回到':'完成杀人目标后立刻点击',
                     style: _text,
                   ),
                   TextSpan(
-                    text: '悬浮窗',
+                    text: Platform.isIOS?'游戏':'悬浮窗',
                     style: TextStyle(color: Color(0xFFFFB726), fontSize: 14, fontWeight: FontWeight.w600),
                   ),
                   TextSpan(

+ 0 - 1
lib/pages/LoginFirst.dart

@@ -22,7 +22,6 @@ class LoginFirstState extends State<LoginFirst> {
 
   @override
   void initState() {
-    // TODO: implement initState
     super.initState();
     Future.delayed(Duration.zero, () {
       getVersion(context);

+ 1 - 1
lib/pages/MyCode.dart

@@ -60,7 +60,7 @@ class MyCodeState extends State<MyCode> {
     Result res2 = await HttpManager.get('systemVariable/get', data: {'name': "ticketPrice"});
     if (res2.success) {
       setState(() {
-        race = res2.data;
+        race = double.parse( res2.data);
       });
     }
   }

+ 79 - 61
lib/pages/RoomInfo.dart

@@ -1,8 +1,10 @@
 import 'dart:async';
+import 'dart:io';
 import 'dart:ui';
 import 'package:flutter/material.dart';
 import 'package:flutter/painting.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:intl/intl.dart';
 import 'package:url_launcher/url_launcher.dart';
 import 'package:battery/battery.dart';
 import 'package:flutter_redux/flutter_redux.dart';
@@ -58,6 +60,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
   bool showJiexie = false;
   bool showHelloWord = false;
   bool showWait = false;
+  num race = 10;
 
 //获取房间信息
   Future<void> getRoomInfo(type) async {
@@ -472,6 +475,13 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
     };
 
     Future.delayed(Duration.zero, () async {
+      Result res2 = await HttpManager.get('systemVariable/get', data: {'name': "ticketPrice"});
+      if (res2.success) {
+        print(res2.data);
+        setState(() {
+          race = double.parse(res2.data);
+        });
+      }
       // showSucessInfo(3);
       getRoomInfo('first');
       userInfo = StoreProvider.of<AppState>(context).state.userInfo;
@@ -706,66 +716,74 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                           ),
 
                           Container(
-                            padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
-                            margin: EdgeInsets.fromLTRB(15, 7, 15, 0),
-                            decoration: BoxDecoration(color: Color(0xFF23253C), borderRadius: BorderRadius.all(Radius.circular(4))),
-                            child: Row(
-                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
-                              children: <Widget>[
-                                Column(
-                                  children: <Widget>[
-                                    Row(
-                                      children: <Widget>[
-                                        Image.asset('images/icon_jifen.png'),
-                                        Text(
-                                          'x${houseInfo.bonus * houseInfo.houseLevel.firstRatio / 100}',
-                                          style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
-                                        )
-                                      ],
-                                    ),
-                                    Container(
-                                      height: 3,
-                                    ),
-                                    Text('第一名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
-                                  ],
-                                ),
-                                Column(
-                                  children: <Widget>[
-                                    Row(
-                                      children: <Widget>[
-                                        Image.asset('images/icon_jifen.png'),
-                                        Text(
-                                          'x${houseInfo.bonus * houseInfo.houseLevel.secondRatio / 100}',
-                                          style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
-                                        )
-                                      ],
-                                    ),
-                                    Container(
-                                      height: 3,
-                                    ),
-                                    Text('第二名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
-                                  ],
-                                ),
-                                Column(
-                                  children: <Widget>[
-                                    Row(
-                                      children: <Widget>[
-                                        Image.asset('images/icon_jifen.png'),
-                                        Text(
-                                          'x${houseInfo.bonus * houseInfo.houseLevel.thirdRatio / 100}',
-                                          style: TextStyle(color: Color(0xFFB1B2C0), fontSize: 14, fontWeight: FontWeight.w600),
-                                        )
-                                      ],
-                                    ),
-                                    Container(
-                                      height: 3,
-                                    ),
-                                    Text('第三名奖励', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
-                                  ],
-                                )
-                              ],
-                            ),
-                          ),
+                              padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
+                              margin: EdgeInsets.fromLTRB(15, 7, 15, 0),
+                              decoration: BoxDecoration(color: Color(0xFF23253C), borderRadius: BorderRadius.all(Radius.circular(4))),
+                              child: Column(
+                                crossAxisAlignment: CrossAxisAlignment.start,
+                                children: <Widget>[
+                                  Row(
+                                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                                    children: <Widget>[
+                                      Column(
+                                        children: <Widget>[
+                                          Row(
+                                            children: <Widget>[
+                                              Image.asset('images/icon_jifen.png'),
+                                              Text(
+                                                'x${houseInfo.bonus * houseInfo.houseLevel.firstRatio / 100}/${houseInfo.maxNumber * race * houseInfo.houseLevel.entryCoin * houseInfo.houseLevel.firstRatio / 100}',
+                                                style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
+                                              )
+                                            ],
+                                          ),
+                                          Container(
+                                            height: 3,
+                                          ),
+                                          Text('第一名', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
+                                        ],
+                                      ),
+                                      Column(
+                                        children: <Widget>[
+                                          Row(
+                                            children: <Widget>[
+                                              Image.asset('images/icon_jifen.png'),
+                                              Text(
+                                                'x${houseInfo.bonus * houseInfo.houseLevel.secondRatio / 100}/${houseInfo.maxNumber * race * houseInfo.houseLevel.entryCoin * houseInfo.houseLevel.secondRatio / 100}',
+                                                style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
+                                              )
+                                            ],
+                                          ),
+                                          Container(
+                                            height: 3,
+                                          ),
+                                          Text('第二名', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
+                                        ],
+                                      ),
+                                      Column(
+                                        children: <Widget>[
+                                          Row(
+                                            children: <Widget>[
+                                              Image.asset('images/icon_jifen.png'),
+                                              Text(
+                                                'x${houseInfo.bonus * houseInfo.houseLevel.thirdRatio / 100}/${houseInfo.maxNumber * race * houseInfo.houseLevel.entryCoin * houseInfo.houseLevel.thirdRatio / 100}',
+                                                style: TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.w500),
+                                              )
+                                            ],
+                                          ),
+                                          Container(
+                                            height: 3,
+                                          ),
+                                          Text('第三名', style: TextStyle(fontSize: 12, color: Color(0xFFB1B2C0)))
+                                        ],
+                                      )
+                                    ],
+                                  ),
+                                  Container(
+                                    height: 10,
+                                  ),
+                                  Text('注:上方显示数值为前三名的“当前奖励/最高奖励”',style: TextStyle(color: Colors.white30,fontSize: 12),)
+                                ],
+                              )),
 
                           timeStr != ''
                               ? Container(
@@ -834,7 +852,7 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
                                         Text.rich(TextSpan(children: [
                                           TextSpan(text: '完成本房间任务目标后,'),
                                           TextSpan(
-                                            text: '切记立刻点击悬浮窗',
+                                            text: Platform.isIOS ? '切记立刻返回应用' : '切记立刻点击悬浮窗',
                                             style: TextStyle(fontWeight: FontWeight.w600, color: Color(0xFFFFB726)),
                                           ),
                                           TextSpan(text: '回到房间')