x1ongzhu 6 years ago
parent
commit
cddece3457
3 changed files with 9 additions and 8 deletions
  1. 3 0
      ios/ScreenRecorder/SampleHandler.m
  2. 2 2
      lib/net/HttpManager.dart
  3. 4 6
      lib/pages/loginSecond.dart

+ 3 - 0
ios/ScreenRecorder/SampleHandler.m

@@ -47,6 +47,9 @@ static void onDarwinPushStop(CFNotificationCenterRef center, void *observer, CFS
     }
     }
     TXLivePushConfig* config = [[TXLivePushConfig alloc] init];
     TXLivePushConfig* config = [[TXLivePushConfig alloc] init];
     config.audioChannels = 0;
     config.audioChannels = 0;
+    config.videoFPS = 10;
+    config.videoBitrateMin = 4 * 1024 * 1024 * 8;
+    config.videoBitrateMax = 10 * 1024 * 1024 * 8;
     config.customModeType |= CUSTOM_MODE_VIDEO_CAPTURE; //自定义视频模式
     config.customModeType |= CUSTOM_MODE_VIDEO_CAPTURE; //自定义视频模式
     config.enableAutoBitrate = YES;
     config.enableAutoBitrate = YES;
     config.enableHWAcceleration = YES;
     config.enableHWAcceleration = YES;

+ 2 - 2
lib/net/HttpManager.dart

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

+ 4 - 6
lib/pages/loginSecond.dart

@@ -123,14 +123,12 @@ class LoginSecondState extends State<LoginSecond> {
                                 highlightColor: Color(0xFF763434),
                                 highlightColor: Color(0xFF763434),
                                 child: Text('注册/登录'),
                                 child: Text('注册/登录'),
                                 onPressed: () async {
                                 onPressed: () async {
-                                  if (_sessionID == null) {
-                                    Toast.show(context, '请发送验证码', 1500, 'info');
-                                  } else if (inputCode.length != 6) {
+                                  if (inputCode.length != 6) {
                                     Toast.show(context, '请输入验证码', 1500, 'info');
                                     Toast.show(context, '请输入验证码', 1500, 'info');
                                   } else {
                                   } else {
                                     Toast.show(context, '加载中', -1, 'loading');
                                     Toast.show(context, '加载中', -1, 'loading');
-                                    final Result res = await HttpManager.post('auth/loginSms',
-                                        data: {'phone': widget.phone, 'code': inputCode, 'sessionId': _sessionID, 'requireToken': true});
+                                    final Result res =
+                                        await HttpManager.post('auth/loginSms', data: {'phone': widget.phone, 'code': inputCode, 'requireToken': true});
                                     Toast.hide();
                                     Toast.hide();
                                     if (res.success) {
                                     if (res.success) {
                                       if (timer != null) {
                                       if (timer != null) {
@@ -170,7 +168,7 @@ class LoginSecondState extends State<LoginSecond> {
 
 
   Future<void> sendMsg() async {
   Future<void> sendMsg() async {
     Toast.show(context, '加载中', -1, 'loading');
     Toast.show(context, '加载中', -1, 'loading');
-    final Result res = await HttpManager.get('rong/sendCode', data: {'phone': widget.phone});
+    final Result res = await HttpManager.post('userInfo/sendSms', data: {'mobile': widget.phone});
     Toast.hide();
     Toast.hide();
     if (res.success) {
     if (res.success) {
       Toast.show(context, '发送成功', 1500, 'success');
       Toast.show(context, '发送成功', 1500, 'success');