Commit 80da3bb71b97cff524fd492be348cdd6baa9cf6f
Merge branch 'feat-wqf-payment' into xiaoyu_cocossteve
Showing
6 changed files
with
21 additions
and
14 deletions
android/gradle/wrapper/gradle-wrapper.properties
| ... | ... | @@ -2,4 +2,5 @@ distributionBase=GRADLE_USER_HOME |
| 2 | 2 | distributionPath=wrapper/dists |
| 3 | 3 | zipStoreBase=GRADLE_USER_HOME |
| 4 | 4 | zipStorePath=wrapper/dists |
| 5 | -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip | |
| 5 | +#distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip | |
| 6 | +distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.5-all.zip | ... | ... |
lib/pages/practice/bloc/topic_picture_bloc.dart
| ... | ... | @@ -92,11 +92,14 @@ class TopicPictureBloc extends Bloc<TopicPictureEvent, TopicPictureState> { |
| 92 | 92 | _isResultSoundPlaying = false; |
| 93 | 93 | if (_forbiddenWhenCorrect) { |
| 94 | 94 | _forbiddenWhenCorrect = false; |
| 95 | - // 答对后自动翻页 | |
| 96 | - pageController.nextPage( | |
| 97 | - duration: const Duration(milliseconds: 500), | |
| 98 | - curve: Curves.ease, | |
| 99 | - ); | |
| 95 | + debugPrint('播放完成后解除禁止'); | |
| 96 | + if (event == PlayerState.completed) { | |
| 97 | + // 答对后且播放完自动翻页 | |
| 98 | + pageController.nextPage( | |
| 99 | + duration: const Duration(milliseconds: 500), | |
| 100 | + curve: Curves.ease, | |
| 101 | + ); | |
| 102 | + } | |
| 100 | 103 | } |
| 101 | 104 | } |
| 102 | 105 | } else { |
| ... | ... | @@ -286,7 +289,11 @@ class TopicPictureBloc extends Bloc<TopicPictureEvent, TopicPictureState> { |
| 286 | 289 | } |
| 287 | 290 | |
| 288 | 291 | void _playResultSound(bool isCorrect) async { |
| 289 | - await audioPlayer.stop(); | |
| 292 | + // await audioPlayer.stop(); | |
| 293 | + if (audioPlayer.state == PlayerState.playing && _isResultSoundPlaying == false) { | |
| 294 | + _voicePlayState = VoicePlayState.stop; | |
| 295 | + } | |
| 296 | + debugPrint("_playResultSound isCorrect=$isCorrect"); | |
| 290 | 297 | _isResultSoundPlaying = true; |
| 291 | 298 | _forbiddenWhenCorrect = isCorrect; |
| 292 | 299 | if (isCorrect) { | ... | ... |
lib/pages/shop/home/shop_home_page.dart
| ... | ... | @@ -68,8 +68,8 @@ class _ShopHomeView extends StatelessWidget { |
| 68 | 68 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( |
| 69 | 69 | crossAxisCount: 2, |
| 70 | 70 | childAspectRatio: 2, |
| 71 | - mainAxisSpacing: 14.h, | |
| 72 | - crossAxisSpacing: 6.w, | |
| 71 | + mainAxisSpacing: 16.h, | |
| 72 | + crossAxisSpacing: 12.w, | |
| 73 | 73 | ), |
| 74 | 74 | itemBuilder: (BuildContext context, int index) { |
| 75 | 75 | final productEntity = bloc.productDatas[index]; | ... | ... |
lib/pages/shop/home/widgets/product_item.dart
| ... | ... | @@ -18,11 +18,10 @@ class ProductItem extends StatelessWidget { |
| 18 | 18 | border: Border.all(width: 1.0, color: Colors.black)), |
| 19 | 19 | padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), |
| 20 | 20 | child: Row( |
| 21 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
| 22 | 21 | children: [ |
| 23 | 22 | Container( |
| 24 | 23 | width: 124.w, // 图片宽度 |
| 25 | - height: 124.h, // 图片高度 | |
| 24 | + height: 124.w, // 图片高度 | |
| 26 | 25 | decoration: BoxDecoration( |
| 27 | 26 | borderRadius: BorderRadius.circular(5), |
| 28 | 27 | // 圆角为5 | ... | ... |
lib/pages/shopping/view.dart
lib/pages/user/user_page.dart
| ... | ... | @@ -107,7 +107,7 @@ class _UserView extends StatelessWidget { |
| 107 | 107 | ), |
| 108 | 108 | 14.horizontalSpace, |
| 109 | 109 | Offstage( |
| 110 | - offstage: user.effectiveDate == null, | |
| 110 | + offstage: user.effectiveDate == null || AppConfigHelper.shouldHidePay(), | |
| 111 | 111 | child: Image.asset( |
| 112 | 112 | AssetsConst.icVip, |
| 113 | 113 | height: 18.h, |
| ... | ... | @@ -116,7 +116,7 @@ class _UserView extends StatelessWidget { |
| 116 | 116 | ], |
| 117 | 117 | ), |
| 118 | 118 | Offstage( |
| 119 | - offstage: user.effectiveDate == null, | |
| 119 | + offstage: user.effectiveDate == null || AppConfigHelper.shouldHidePay(), | |
| 120 | 120 | child: Row( |
| 121 | 121 | children: [ |
| 122 | 122 | Text( | ... | ... |