panhui 6 år sedan
förälder
incheckning
a94b6a3098

+ 1 - 4
lib/pages/ChangePassword.dart

@@ -35,7 +35,6 @@ class _ChangePasswordState extends State<ChangePassword> with WidgetsBindingObse
                   height: 10,
                 ),
                 ITextField(
-                  maxLength: 6,
                   keyboardType: ITextInputType.password,
                   prefixIcon: Container(
                     child: Image.asset(
@@ -60,7 +59,6 @@ class _ChangePasswordState extends State<ChangePassword> with WidgetsBindingObse
                   height: 10,
                 ),
                 ITextField(
-                  maxLength: 6,
                   keyboardType: ITextInputType.password,
                   prefixIcon: Container(
                     child: Image.asset(
@@ -85,7 +83,6 @@ class _ChangePasswordState extends State<ChangePassword> with WidgetsBindingObse
                   height: 10,
                 ),
                 ITextField(
-                  maxLength: 6,
                   keyboardType: ITextInputType.password,
                   prefixIcon: Container(
                     child: Image.asset(
@@ -121,7 +118,7 @@ class _ChangePasswordState extends State<ChangePassword> with WidgetsBindingObse
                     onTapHomeMenu: (password_new == password_se && password_se != '' && password_old != '')
                         ? () async {
                             Toast.show(context, '加载中', -1, 'loading');
-                            Result res = await HttpManager.post('userInfo/updatePassword',
+                            Result res = await HttpManager.post('userInfo/changePassword',
                                 data: {"userId": userInfo.id, "oldPassword": password_old, "newPassword": password_new});
                             Toast.hide();
                             if (res.success) {

+ 0 - 1
lib/pages/LoginSecond.dart

@@ -87,7 +87,6 @@ class LoginSecondState extends State<LoginSecond> {
                             Container(
                               margin: EdgeInsets.only(top: 10),
                               child: ITextField(
-                                maxLength: 6,
                                 keyboardType: ITextInputType.password,
                                 prefixIcon: Container(
                                   padding: EdgeInsets.all(10),

+ 11 - 3
lib/pages/RoomInfo.dart

@@ -7,7 +7,6 @@ import 'package:url_launcher/url_launcher.dart';
 import 'package:battery/battery.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import 'package:flutter/cupertino.dart';
-import 'package:wanna_battle/model/HouseLevel.dart';
 import '../styles/colors.dart';
 import 'package:screen_stream_plugin/screen_stream_plugin.dart';
 import '../net/HttpManager.dart';
@@ -26,6 +25,7 @@ import '../model/UserInfo.dart';
 import '../widget/LinearButton.dart';
 import 'Appeal.dart';
 import 'ShoppingMall.dart';
+import '../redux/UserRedux.dart';
 
 class RoomInfo extends StatefulWidget {
   RoomInfo({Key key, this.roomId}) : super(key: key);
@@ -362,8 +362,16 @@ class RoomInfoState extends State<RoomInfo> with SingleTickerProviderStateMixin
 
 //加入房间
   Future<void> joinRoom() async {
-    print(StoreProvider.of<AppState>(context).state.userInfo.moneyTicket);
-    if (StoreProvider.of<AppState>(context).state.userInfo.moneyTicket < houseInfo.houseLevel.entryCoin) {
+    UserInfo myUser;
+    Toast.show(context, '加载中', -1, 'loading');
+    Result res2 = await HttpManager.get('userInfo/getUserInfo');
+    if (res2.success) {
+      StoreProvider.of<AppState>(context).dispatch(UpdateUserAction(UserInfo.fromJson(res2.data)));
+      myUser = UserInfo.fromJson(res2.data);
+    } else {}
+    Toast.hide();
+
+    if (myUser.moneyTicket < houseInfo.houseLevel.entryCoin) {
       MyDialog.showDialog(context, '门票不足不能加入', onsubmit: () {
         Navigator.push(context, CupertinoPageRoute(builder: (context) => ShoppingMall()));
       });

+ 1 - 1
lib/pages/Setting.dart

@@ -71,7 +71,7 @@ class SettingState extends State<Setting> {
                           _sectionDivier(),
                           _section([
                             _cell('修改密码', ' ', onTap: () {
-                           Navigator.push(context, MaterialPageRoute(builder: (context) => ChangePassword()));
+                               Navigator.push(context, CupertinoPageRoute(builder: (context) => ChangePassword()));
                             })
                           ]),
                           _sectionDivier(),

+ 1 - 0
lib/pages/VideoPlayer.dart

@@ -46,6 +46,7 @@ class _VideoPlayerPageState extends State<VideoPlayerPage> {
             // height: 300.0,
             child: isNet
                 ? LocalVideoPlayer(
+                  
                     _defalutUrl,
                     isFullScreen: true,
                     isNet:true,

+ 1 - 1
lib/widget/VideoWidget.dart

@@ -91,7 +91,7 @@ class VideoWidgetState extends State<VideoWidget> {
   Widget _playContainer() {
     return Container(
       // color: Colors.black,
-      // height: 200,
+      height: 200,
       width: double.infinity,
       child: Center(
         child: Stack(