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,4 +2,5 @@ distributionBase=GRADLE_USER_HOME | ||
2 | distributionPath=wrapper/dists | 2 | distributionPath=wrapper/dists |
3 | zipStoreBase=GRADLE_USER_HOME | 3 | zipStoreBase=GRADLE_USER_HOME |
4 | zipStorePath=wrapper/dists | 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,11 +92,14 @@ class TopicPictureBloc extends Bloc<TopicPictureEvent, TopicPictureState> { | ||
92 | _isResultSoundPlaying = false; | 92 | _isResultSoundPlaying = false; |
93 | if (_forbiddenWhenCorrect) { | 93 | if (_forbiddenWhenCorrect) { |
94 | _forbiddenWhenCorrect = false; | 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 | } else { | 105 | } else { |
@@ -286,7 +289,11 @@ class TopicPictureBloc extends Bloc<TopicPictureEvent, TopicPictureState> { | @@ -286,7 +289,11 @@ class TopicPictureBloc extends Bloc<TopicPictureEvent, TopicPictureState> { | ||
286 | } | 289 | } |
287 | 290 | ||
288 | void _playResultSound(bool isCorrect) async { | 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 | _isResultSoundPlaying = true; | 297 | _isResultSoundPlaying = true; |
291 | _forbiddenWhenCorrect = isCorrect; | 298 | _forbiddenWhenCorrect = isCorrect; |
292 | if (isCorrect) { | 299 | if (isCorrect) { |
lib/pages/shop/home/shop_home_page.dart
@@ -68,8 +68,8 @@ class _ShopHomeView extends StatelessWidget { | @@ -68,8 +68,8 @@ class _ShopHomeView extends StatelessWidget { | ||
68 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | 68 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( |
69 | crossAxisCount: 2, | 69 | crossAxisCount: 2, |
70 | childAspectRatio: 2, | 70 | childAspectRatio: 2, |
71 | - mainAxisSpacing: 14.h, | ||
72 | - crossAxisSpacing: 6.w, | 71 | + mainAxisSpacing: 16.h, |
72 | + crossAxisSpacing: 12.w, | ||
73 | ), | 73 | ), |
74 | itemBuilder: (BuildContext context, int index) { | 74 | itemBuilder: (BuildContext context, int index) { |
75 | final productEntity = bloc.productDatas[index]; | 75 | final productEntity = bloc.productDatas[index]; |
lib/pages/shop/home/widgets/product_item.dart
@@ -18,11 +18,10 @@ class ProductItem extends StatelessWidget { | @@ -18,11 +18,10 @@ class ProductItem extends StatelessWidget { | ||
18 | border: Border.all(width: 1.0, color: Colors.black)), | 18 | border: Border.all(width: 1.0, color: Colors.black)), |
19 | padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), | 19 | padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), |
20 | child: Row( | 20 | child: Row( |
21 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
22 | children: [ | 21 | children: [ |
23 | Container( | 22 | Container( |
24 | width: 124.w, // 图片宽度 | 23 | width: 124.w, // 图片宽度 |
25 | - height: 124.h, // 图片高度 | 24 | + height: 124.w, // 图片高度 |
26 | decoration: BoxDecoration( | 25 | decoration: BoxDecoration( |
27 | borderRadius: BorderRadius.circular(5), | 26 | borderRadius: BorderRadius.circular(5), |
28 | // 圆角为5 | 27 | // 圆角为5 |
lib/pages/shopping/view.dart
@@ -85,7 +85,7 @@ class _ShoppingView extends StatelessWidget { | @@ -85,7 +85,7 @@ class _ShoppingView extends StatelessWidget { | ||
85 | children: [ | 85 | children: [ |
86 | Container( | 86 | Container( |
87 | width: 210.w, // 图片宽度 | 87 | width: 210.w, // 图片宽度 |
88 | - height: 210.h, // 图片高度 | 88 | + height: 210.w, // 图片高度 |
89 | decoration: BoxDecoration( | 89 | decoration: BoxDecoration( |
90 | borderRadius: BorderRadius.circular(5.w), | 90 | borderRadius: BorderRadius.circular(5.w), |
91 | // 圆角为5 | 91 | // 圆角为5 |
lib/pages/user/user_page.dart
@@ -107,7 +107,7 @@ class _UserView extends StatelessWidget { | @@ -107,7 +107,7 @@ class _UserView extends StatelessWidget { | ||
107 | ), | 107 | ), |
108 | 14.horizontalSpace, | 108 | 14.horizontalSpace, |
109 | Offstage( | 109 | Offstage( |
110 | - offstage: user.effectiveDate == null, | 110 | + offstage: user.effectiveDate == null || AppConfigHelper.shouldHidePay(), |
111 | child: Image.asset( | 111 | child: Image.asset( |
112 | AssetsConst.icVip, | 112 | AssetsConst.icVip, |
113 | height: 18.h, | 113 | height: 18.h, |
@@ -116,7 +116,7 @@ class _UserView extends StatelessWidget { | @@ -116,7 +116,7 @@ class _UserView extends StatelessWidget { | ||
116 | ], | 116 | ], |
117 | ), | 117 | ), |
118 | Offstage( | 118 | Offstage( |
119 | - offstage: user.effectiveDate == null, | 119 | + offstage: user.effectiveDate == null || AppConfigHelper.shouldHidePay(), |
120 | child: Row( | 120 | child: Row( |
121 | children: [ | 121 | children: [ |
122 | Text( | 122 | Text( |