Ez@isqQ=bSN{Q{R6?r|t&S@s6wj|17Nu=Un>;cPU8|*!B`jQzB()1&@z=`;@Fm$
z%^umcd0CRr+*1TMgKX(u!M_L-7q(N%u*otNEL(S?j>%i~gt+CVhF}Jqh@d{}`$skA
zpOPub_&3>?mM+-&q--@a7yqVCawQgC*9mxybB|ZRwwccPG1oitYN4L*Q!BV0Dq!69
zOdpe%86o^qqs6+awL#N0RjcjrFb~R%7adIz^c@cI4!3Q6A0&r_fCXnp2$-f?Y{QJP
zeBHQOC@Gk4XkP;`yCIyngBpm4WflgY1<6e_4Qj?!)oLws2j_TzW|DTq$DYqFyXUm_
z-)Fhesf;0|7_-Cb5+ilxP(przR@=Sb`7my6l%EY!Qb|?w;Tj1sb~rH?t<+!FhYk7d
z-xVJ@1@z~aa>o>2V7PoHs7efszE+lT(4*y3P4XDeNo##IeZ@s7=s#@jc37=}hujam
zpM)Sw*$7OT6XLw`Ty*Yr0B#ymm1S(LCeHNIqI00?YF%kg|C&sf3}GV@&MZmqNsH#$
z8H6h-6H0SoKwo0KQi9WhL5Plu3cO?-32Xks$Ha0-FH9Q?NU+gK!Tp%!7*`&rR>k&$
zb7(vW7eveFTf|OWl*oeX#5coUWfQw_`5S5f#YGV$>&+sGBF?G5+b3$TO<%C|k22@d
zw3jD)eDLa$1Ix3)2`LCz5Vxdy$a~(hgWPySkCa+AW&ePoe!-c0h2LPslyJdT7HklS
zO=f58c&jCj!Q-~1nBRj=ixX-7NDgs9uY@sp?yygp?-KS@5wJ2
zQk#dpKLynuXDJvj!%^L@g|}RL-teah0e$dYQ>K@y`YiZH^}SfLVIcNCs2!KBB?h
z44zInb$Gc)+>y;7Qa?-zmddoJzQ8r_Jw}aE;^!2sn7OWJ{t(X8(Ps0lHd7nvLrAu>S*qJ9O><
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
index 812f938..29b8ae1 100644
--- a/android/app/src/main/res/values/colors.xml
+++ b/android/app/src/main/res/values/colors.xml
@@ -15,7 +15,7 @@
#25282c
#303237
- #ffffff
+ #FFFFFF
#dddddd
#0094FE
#E3E3E3
diff --git a/lib/beans/game_info_bean.dart b/lib/beans/game_info_bean.dart
index 503d0e1..c35bbdb 100644
--- a/lib/beans/game_info_bean.dart
+++ b/lib/beans/game_info_bean.dart
@@ -19,10 +19,9 @@ class GameInfoBean {
String? gameIntroduce;
String? gameShare;
String? gameShareUserIcon;
- bool? isCollect;
GameInfoBean(this.gameId, this.gameName, this.subtitle, this.gameDetailsofCharges, this.gameIcon, this.gameBg, this.gameTags, this.score,
- this.gameLoadTime, this.gameIntroduce, this.gameShare, this.gameShareUserIcon,this.isCollect);
+ this.gameLoadTime, this.gameIntroduce, this.gameShare, this.gameShareUserIcon);
factory GameInfoBean.fromJson(Map json) => _$GameInfoBeanFromJson(json);
diff --git a/lib/beans/game_info_bean.g.dart b/lib/beans/game_info_bean.g.dart
index a3c17ba..be7f202 100644
--- a/lib/beans/game_info_bean.g.dart
+++ b/lib/beans/game_info_bean.g.dart
@@ -21,7 +21,6 @@ GameInfoBean _$GameInfoBeanFromJson(Map json) => GameInfoBean(
json['gameIntroduce'] as String?,
json['gameShare'] as String?,
json['gameShareUserIcon'] as String?,
- json['isCollect'] as bool?,
);
Map _$GameInfoBeanToJson(GameInfoBean instance) =>
@@ -38,5 +37,4 @@ Map _$GameInfoBeanToJson(GameInfoBean instance) =>
'gameIntroduce': instance.gameIntroduce,
'gameShare': instance.gameShare,
'gameShareUserIcon': instance.gameShareUserIcon,
- 'isCollect': instance.isCollect,
};
diff --git a/lib/beans/game_user_info_bean.dart b/lib/beans/game_user_info_bean.dart
new file mode 100644
index 0000000..9765e99
--- /dev/null
+++ b/lib/beans/game_user_info_bean.dart
@@ -0,0 +1,15 @@
+import 'package:json_annotation/json_annotation.dart';
+
+part 'game_user_info_bean.g.dart';
+
+///
+@JsonSerializable(explicitToJson: true)
+class GameUserInfoBean {
+ bool? isCollect;
+
+ GameUserInfoBean(this.isCollect);
+
+ factory GameUserInfoBean.fromJson(Map json) => _$GameUserInfoBeanFromJson(json);
+
+ Map toJson() => _$GameUserInfoBeanToJson(this);
+}
diff --git a/lib/beans/game_user_info_bean.g.dart b/lib/beans/game_user_info_bean.g.dart
new file mode 100644
index 0000000..94572bd
--- /dev/null
+++ b/lib/beans/game_user_info_bean.g.dart
@@ -0,0 +1,17 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'game_user_info_bean.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+GameUserInfoBean _$GameUserInfoBeanFromJson(Map json) =>
+ GameUserInfoBean(
+ json['isCollect'] as bool?,
+ );
+
+Map _$GameUserInfoBeanToJson(GameUserInfoBean instance) =>
+ {
+ 'isCollect': instance.isCollect,
+ };
diff --git a/lib/beans/user_info_bean.g.dart b/lib/beans/user_info_bean.g.dart
index e61f6cf..0a0b287 100644
--- a/lib/beans/user_info_bean.g.dart
+++ b/lib/beans/user_info_bean.g.dart
@@ -18,11 +18,14 @@ UserInfoBean _$UserInfoBeanFromJson(Map json) => UserInfoBean(
json['isJuveniles'] as bool?,
json['userName'] as String?,
json['idCard'] as String?,
- json['nightCard'] == null ? null : NightCardBean.fromJson(json['nightCard'] as Map),
+ json['nightCard'] == null
+ ? null
+ : NightCardBean.fromJson(json['nightCard'] as Map),
(json['userPlayGameTime'] as num?)?.toInt(),
);
-Map _$UserInfoBeanToJson(UserInfoBean instance) => {
+Map _$UserInfoBeanToJson(UserInfoBean instance) =>
+ {
'nickName': instance.nickName,
'userId': instance.userId,
'phoneNum': instance.phoneNum,
diff --git a/lib/network/NetworkConfig.dart b/lib/network/NetworkConfig.dart
index 7e06757..4d5b469 100644
--- a/lib/network/NetworkConfig.dart
+++ b/lib/network/NetworkConfig.dart
@@ -114,4 +114,6 @@ class NetworkConfig {
static const String accountLogOff = "api/Account/AccountLogOff"; //注销账号
+ static const String getGameUserInfo = "api/Game/GetGameUserInfo"; //获取用户游戏详情数据
+
}
diff --git a/lib/tools/game/game_info_page.dart b/lib/tools/game/game_info_page.dart
index c989e2d..2fd81a2 100644
--- a/lib/tools/game/game_info_page.dart
+++ b/lib/tools/game/game_info_page.dart
@@ -8,6 +8,7 @@ import 'package:game/network/NetworkConfig.dart';
import '../../beans/game_info_bean.dart';
import '../../beans/game_info_recommend_bean.dart';
+import '../../beans/game_user_info_bean.dart';
import '../../common/EventBusUtil.dart';
import '../../common/func.dart';
import 'game_model.dart';
@@ -29,6 +30,7 @@ class _GameInfoPageState extends State {
late GameInfoBean gameData;
bool _isInitialized = false;
bool isCollect = false;
+ late GameUserInfoBean gameUserInfoBean;
List infoRecommendList = [];
@@ -43,7 +45,6 @@ class _GameInfoPageState extends State {
case "getGameInfo":
EasyLoading.dismiss();
gameData = event['data'];
- isCollect = gameData.isCollect!;
_isInitialized = true;
break;
@@ -54,6 +55,11 @@ class _GameInfoPageState extends State {
case "gameCollect":
isCollect = event['data'];
break;
+
+ case "getGameUserInfo":
+ gameUserInfoBean = event['data'];
+ isCollect = gameUserInfoBean.isCollect!;
+ break;
}
setState(() {});
@@ -63,6 +69,7 @@ class _GameInfoPageState extends State {
FunctionUtil.loading();
_viewModel.getGameInfo(widget.gameId);
_viewModel.gameRecommendations(widget.gameId);
+ _viewModel.getGameUserInfo(widget.gameId);
}
///开始游戏
diff --git a/lib/tools/game/game_model.dart b/lib/tools/game/game_model.dart
index 8d295a8..b912cb7 100644
--- a/lib/tools/game/game_model.dart
+++ b/lib/tools/game/game_model.dart
@@ -7,6 +7,7 @@ import '../../beans/game_info_recommend_bean.dart';
import '../../beans/game_list_bean.dart';
import '../../beans/game_play_time_bean.dart';
import '../../beans/game_type_bean.dart';
+import '../../beans/game_user_info_bean.dart';
import '../../network/BaseEntity.dart';
import '../../network/NetworkConfig.dart';
import '../../network/RequestCenter.dart';
@@ -151,4 +152,26 @@ class GameModel {
print("errorEntity==${errorEntity.message}");
});
}
+
+ ///获取用户游戏详情数据
+ Future getGameUserInfo(gameId) async {
+ RequestCenter.instance.requestGet(NetworkConfig.getGameUserInfo, {"gameId": gameId}, (BaseEntity dataEntity) {
+ if (dataEntity.code == 0) {
+
+ GameUserInfoBean gameUserInfoBean = GameUserInfoBean.fromJson(dataEntity.data);
+
+ streamController.sink.add({
+ 'code': "getGameUserInfo", //有数据
+ 'data': gameUserInfoBean
+ });
+ } else {
+ streamController.sink.add({
+ 'code': "-1", //有数据
+ 'data': dataEntity.message
+ });
+ }
+ }, (ErrorEntity errorEntity) {
+ print("errorEntity==${errorEntity.message}");
+ });
+ }
}
diff --git a/lib/tools/me/my_page.dart b/lib/tools/me/my_page.dart
index 693d2c0..5cd9f4a 100644
--- a/lib/tools/me/my_page.dart
+++ b/lib/tools/me/my_page.dart
@@ -193,7 +193,7 @@ class _MyPageState extends State with AutomaticKeepAliveClientMixin {
left: l23,
top: t22,
child: Text(
- "我的游戏时长",
+ "已游玩时长",
style: TextStyle(fontSize: l11, color: Color(0xFFE2F3FF)),
)),
Positioned(