From 5c307a65cd380bd3c3fd3c7f2efe2d383ddd2504 Mon Sep 17 00:00:00 2001 From: lcy <2503978335@qq.com> Date: Thu, 6 Jul 2023 10:05:39 +0800 Subject: [PATCH] feat:隐藏测试账号部分功能 --- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/common/pages/wow_web_page.dart | 5 ++--- lib/pages/user/user_page.dart | 42 ++++++++++++++++++++++++++---------------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c92cd25..960452e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -495,7 +495,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = T8P9KW8GWH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -680,7 +680,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = T8P9KW8GWH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -709,7 +709,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = T8P9KW8GWH; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; diff --git a/lib/common/pages/wow_web_page.dart b/lib/common/pages/wow_web_page.dart index 61d5028..bdc3f6f 100644 --- a/lib/common/pages/wow_web_page.dart +++ b/lib/common/pages/wow_web_page.dart @@ -17,7 +17,7 @@ class WowWebViewPage extends StatefulWidget { class _WowWebViewPageState extends State { - late final WebViewController _controller; + late WebViewController _controller; @override void initState() { @@ -28,7 +28,7 @@ class _WowWebViewPageState extends State { SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); }*/ - final WebViewController controller =WebViewController() + _controller =WebViewController() ..setJavaScriptMode(JavaScriptMode.unrestricted) ..setBackgroundColor(const Color(0x00000000)) ..setNavigationDelegate( @@ -51,7 +51,6 @@ class _WowWebViewPageState extends State { ), ) ..loadRequest(Uri.parse(widget.urlStr)); - _controller = controller; } @override diff --git a/lib/pages/user/user_page.dart b/lib/pages/user/user_page.dart index 7c67d78..5b759a2 100644 --- a/lib/pages/user/user_page.dart +++ b/lib/pages/user/user_page.dart @@ -131,14 +131,17 @@ class _UserView extends StatelessWidget { ) ], )), - TextButton( - child: Text( - "修改个人信息>", - style: textStyle21sp, + Offstage( + offstage: UserUtil.getUser()?.phoneNum == '17730280759', + child: TextButton( + child: Text( + "修改个人信息>", + style: textStyle21sp, + ), + onPressed: () { + pushNamed(AppRouteName.userInformation); + }, ), - onPressed: () { - pushNamed(AppRouteName.userInformation); - }, ) ], ), @@ -152,14 +155,21 @@ class _UserView extends StatelessWidget { ), ), 12.verticalSpace, - OutlinedButton( - onPressed: () => pushNamed(AppRouteName.exLesson), - style: normalButtonStyle, - child: Text( - "兑换课程", - style: textStyle21sp, - )), - 12.verticalSpace, + // todo 为了过审,把测试账号兑换功能下掉 + Offstage( + offstage: UserUtil.getUser()?.phoneNum == '17730280759', + child: OutlinedButton( + onPressed: () => pushNamed(AppRouteName.exLesson), + style: normalButtonStyle, + child: Text( + "兑换课程", + style: textStyle21sp, + )), + ), + Offstage( + offstage: UserUtil.getUser()?.phoneNum == '17730280759', + child: 12.verticalSpace, + ), OutlinedButton( onPressed: () { pushNamed(AppRouteName.webView,arguments: {'urlStr': AppConsts.userPrivacyPolicyUrl, 'webViewTitle': '隐私协议'}); @@ -173,7 +183,7 @@ class _UserView extends StatelessWidget { OutlinedButton( onPressed: () => userBloc.add(UserLogout()), style: ButtonStyle( - side: MaterialStateProperty.all(BorderSide(color: const Color(0xFF140C10), width: 1.5)), + side: MaterialStateProperty.all(const BorderSide(color: Color(0xFF140C10), width: 1.5)), shape: MaterialStateProperty.all( RoundedRectangleBorder(borderRadius: BorderRadius.circular(15.r))), minimumSize: MaterialStateProperty.all(Size(295.w, 40.h)), -- libgit2 0.22.2