Commit 18699a34d46a8439c91faa4b44c9d918c63361ae
1 parent
6778c289
fixed: 客服手机,手机规则教研
Showing
5 changed files
with
20 additions
and
26 deletions
lib/common/request/basic_config.dart
| 1 | 1 | import 'package:flutter/foundation.dart'; |
| 2 | 2 | |
| 3 | 3 | class BasicConfig { |
| 4 | - static bool isTestDev = !isEnvProd(); | |
| 5 | - // static bool isTestDev = false; | |
| 6 | - | |
| 7 | - | |
| 8 | - // 暂时未启用 | |
| 9 | - static bool isEnvProd() { | |
| 10 | - if (kReleaseMode) { | |
| 11 | - debugPrint("dart.vm.product-现在是release环境."); | |
| 12 | - } else { | |
| 13 | - debugPrint("dart.vm.product-现在是debug环境."); | |
| 14 | - } | |
| 15 | - return kReleaseMode; | |
| 16 | - } | |
| 4 | + static bool isTestDev = !isEnvProd(); | |
| 5 | + //static bool isTestDev = false; | |
| 17 | 6 | |
| 7 | + // 暂时未启用 | |
| 8 | + static bool isEnvProd() { | |
| 9 | + if (kReleaseMode) { | |
| 10 | + debugPrint("dart.vm.product-现在是release环境."); | |
| 11 | + } else { | |
| 12 | + debugPrint("dart.vm.product-现在是debug环境."); | |
| 13 | + } | |
| 14 | + return kReleaseMode; | |
| 15 | + } | |
| 18 | 16 | } | ... | ... |
lib/pages/login/forgetpwd/bloc/forget_pwd_home_bloc.dart
| 1 | -import 'package:common_utils/common_utils.dart'; | |
| 2 | 1 | import 'package:flutter/cupertino.dart'; |
| 3 | 2 | import 'package:flutter/material.dart'; |
| 4 | 3 | import 'package:flutter_bloc/flutter_bloc.dart'; |
| 4 | +import 'package:wow_english/common/core/user_util.dart'; | |
| 5 | 5 | import 'package:wow_english/common/request/dao/user_dao.dart'; |
| 6 | 6 | import 'package:wow_english/common/request/exception.dart'; |
| 7 | 7 | import 'package:wow_english/utils/loading.dart'; |
| 8 | 8 | import 'package:wow_english/utils/toast_util.dart'; |
| 9 | 9 | |
| 10 | -import 'package:wow_english/common/core/user_util.dart'; | |
| 11 | - | |
| 12 | 10 | part 'forget_pwd_home_event.dart'; |
| 13 | 11 | part 'forget_pwd_home_state.dart'; |
| 14 | 12 | |
| ... | ... | @@ -72,7 +70,8 @@ class ForgetPwdHomeBloc extends Bloc<ForgetPwdHomeEvent, ForgetPwdHomeState> { |
| 72 | 70 | |
| 73 | 71 | void _setPassWord( |
| 74 | 72 | SetPassWordEvent event, Emitter<ForgetPwdHomeState> emitter) async { |
| 75 | - if (!RegexUtil.isMobileExact(phoneNumController.text)) { | |
| 73 | + final phoneNumber = phoneNumController.text; | |
| 74 | + if (phoneNumber.length != 11) { | |
| 76 | 75 | showToast('手机号不正确!'); |
| 77 | 76 | return; |
| 78 | 77 | } |
| ... | ... | @@ -82,7 +81,7 @@ class ForgetPwdHomeBloc extends Bloc<ForgetPwdHomeEvent, ForgetPwdHomeState> { |
| 82 | 81 | void _sendSmsCode( |
| 83 | 82 | SendSmsCodeEvent event, Emitter<ForgetPwdHomeState> emitter) async { |
| 84 | 83 | final phoneNumber = phoneNumController.text; |
| 85 | - if (!RegexUtil.isMobileExact(phoneNumber)) { | |
| 84 | + if (phoneNumber.length != 11) { | |
| 86 | 85 | showToast('请检查手机号'); |
| 87 | 86 | return; |
| 88 | 87 | } | ... | ... |
lib/pages/login/loginpage/bloc/login_bloc.dart
| 1 | -import 'package:common_utils/common_utils.dart'; | |
| 2 | 1 | import 'package:flutter/cupertino.dart'; |
| 3 | 2 | import 'package:flutter/foundation.dart'; |
| 4 | 3 | import 'package:flutter_bloc/flutter_bloc.dart'; |
| ... | ... | @@ -94,7 +93,7 @@ class LoginBloc extends Bloc<LoginEvent, LoginState> { |
| 94 | 93 | ///请求验证码 |
| 95 | 94 | void _requestSmsCodeApi(RequestSmsCodeEvent event, Emitter<LoginState> emitter) async { |
| 96 | 95 | final phoneNumber = phoneNumController.text; |
| 97 | - if (!RegexUtil.isMobileExact(phoneNumber)) { | |
| 96 | + if (phoneNumber.length != 11) { | |
| 98 | 97 | showToast('请检查手机号'); |
| 99 | 98 | return; |
| 100 | 99 | } | ... | ... |
lib/pages/user/user_page.dart
| 1 | -import 'dart:io'; | |
| 2 | -import 'dart:async'; | |
| 3 | -import 'package:flutter/services.dart'; | |
| 4 | 1 | import 'package:flutter/material.dart'; |
| 2 | +import 'package:flutter/services.dart'; | |
| 5 | 3 | import 'package:flutter_bloc/flutter_bloc.dart'; |
| 6 | 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 5 | +import 'package:url_launcher/url_launcher.dart'; | |
| 7 | 6 | import 'package:wow_english/common/core/app_config_helper.dart'; |
| 8 | 7 | import 'package:wow_english/common/core/app_consts.dart'; |
| 9 | 8 | import 'package:wow_english/common/core/assets_const.dart'; |
| ... | ... | @@ -14,7 +13,6 @@ import 'package:wow_english/models/user_entity.dart'; |
| 14 | 13 | import 'package:wow_english/pages/user/bloc/user_bloc.dart'; |
| 15 | 14 | import 'package:wow_english/route/route.dart'; |
| 16 | 15 | import 'package:wow_english/utils/image_util.dart'; |
| 17 | -import 'package:url_launcher/url_launcher.dart'; | |
| 18 | 16 | |
| 19 | 17 | class UserPage extends StatelessWidget { |
| 20 | 18 | const UserPage({super.key}); |
| ... | ... | @@ -220,7 +218,7 @@ class _UserView extends StatelessWidget { |
| 220 | 218 | 12.verticalSpace, |
| 221 | 219 | OutlinedButton( |
| 222 | 220 | onPressed: () { |
| 223 | - String phone = 'tel:+8618856084180'; | |
| 221 | + String phone = 'tel:+8618827093087'; | |
| 224 | 222 | _launchPhone(phone); |
| 225 | 223 | }, |
| 226 | 224 | style: normalButtonStyle, | ... | ... |
pubspec.yaml
| ... | ... | @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev |
| 16 | 16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html |
| 17 | 17 | # In Windows, build-name is used as the major, minor, and patch parts |
| 18 | 18 | # of the product and file versions while build-number is used as the build suffix. |
| 19 | -version: 1.0.5+5 | |
| 19 | +version: 1.0.6+6 | |
| 20 | 20 | |
| 21 | 21 | environment: |
| 22 | 22 | sdk: '>=3.2.0 <4.0.0' | ... | ... |