|
|
@@ -56,8 +56,7 @@ class TipInfoState extends State<TipInfo> {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- Result res3 =
|
|
|
- await HttpManager.get('playerInfo/getOne', data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'houseId': tipInfo.houseId});
|
|
|
+ Result res3 = await HttpManager.get('playerInfo/getOne', data: {'userId': StoreProvider.of<AppState>(context).state.userInfo.id, 'houseId': tipInfo.houseId});
|
|
|
if (res3.success) {
|
|
|
playerInfo = PlayerInfo.fromJson(res3.data);
|
|
|
print(res3.data);
|
|
|
@@ -143,13 +142,11 @@ class TipInfoState extends State<TipInfo> {
|
|
|
height: 1,
|
|
|
color: Colors.black26,
|
|
|
),
|
|
|
- Padding(
|
|
|
- padding: EdgeInsets.only(top: 10, bottom: 0),
|
|
|
- child: Text.rich(TextSpan(style: TextStyle(color: Colors.white, fontSize: 14), children: _tipContent(tipInfo.content, context)))),
|
|
|
+ Padding(padding: EdgeInsets.only(top: 10, bottom: 0), child: Text.rich(TextSpan(style: TextStyle(color: Colors.white, fontSize: 14), children: _tipContent(tipInfo.content, context)))),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
- tipInfo.typeFlag == 4
|
|
|
+ playerInfo != null && playerInfo.dataError
|
|
|
? Padding(
|
|
|
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
|
|
|
child: DefaultTextStyle(
|
|
|
@@ -161,37 +158,60 @@ class TipInfoState extends State<TipInfo> {
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: <Widget>[
|
|
|
Text('造成此情况等原因可能是:'),
|
|
|
- Text('1、确认开始游戏后没有授权系统进行录屏'),
|
|
|
- Text('2、视频没有录制到最后的分数名次结算页面就回到APP点击完成比赛了 '),
|
|
|
- Text('3、在游戏过程中,猿人点击APP后台进程被退出 '),
|
|
|
- Text('4、没有实际进行游戏比赛 '),
|
|
|
- Text('5、使用作弊手段录制视频'),
|
|
|
+ Text('1、没有实际进行游戏比赛 '),
|
|
|
+ Text('2、使用作弊手段进行游戏'),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
)
|
|
|
- : Container(),
|
|
|
- tipInfo.typeFlag == 5
|
|
|
- ? Padding(
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
|
|
|
- child: DefaultTextStyle(
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 13,
|
|
|
- color: Colors.white54,
|
|
|
- ),
|
|
|
- child: Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: <Widget>[
|
|
|
- Text('造成此情况等原因可能是:'),
|
|
|
- Text('1、游戏结束后没有在规定时间内返回APP点击完成比赛按钮'),
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
- )
|
|
|
- : Container(),
|
|
|
+ : Container(
|
|
|
+ height: 30,
|
|
|
+ ),
|
|
|
+ // tipInfo.typeFlag == 4
|
|
|
+ // ? Padding(
|
|
|
+ // padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
|
|
|
+ // child: DefaultTextStyle(
|
|
|
+ // style: TextStyle(
|
|
|
+ // fontSize: 13,
|
|
|
+ // color: Colors.white54,
|
|
|
+ // ),
|
|
|
+ // child: Column(
|
|
|
+ // crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ // children: <Widget>[
|
|
|
+ // Text('造成此情况等原因可能是:'),
|
|
|
+ // Text('1、确认开始游戏后没有授权系统进行录屏'),
|
|
|
+ // Text('2、视频没有录制到最后的分数名次结算页面就回到APP点击完成比赛了 '),
|
|
|
+ // Text('3、在游戏过程中,猿人点击APP后台进程被退出 '),
|
|
|
+ // Text('4、没有实际进行游戏比赛 '),
|
|
|
+ // Text('5、使用作弊手段录制视频'),
|
|
|
+ // ],
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // )
|
|
|
+ // : Container(),
|
|
|
+ // tipInfo.typeFlag == 5
|
|
|
+ // ? Padding(
|
|
|
+ // padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
|
|
|
+ // child: DefaultTextStyle(
|
|
|
+ // style: TextStyle(
|
|
|
+ // fontSize: 13,
|
|
|
+ // color: Colors.white54,
|
|
|
+ // ),
|
|
|
+ // child: Column(
|
|
|
+ // crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ // children: <Widget>[
|
|
|
+ // Text('造成此情况等原因可能是:'),
|
|
|
+ // Text('1、游戏结束后没有在规定时间内返回APP点击完成比赛按钮'),
|
|
|
+ // ],
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // )
|
|
|
+ // : Container(
|
|
|
+ // height: 30,
|
|
|
+ // ),
|
|
|
// houseInfo != null && tipInfo.typeFlag != 4 && tipInfo.typeFlag != 5 ? RankContent(roomId: houseInfo.id.toString()) : Container(),
|
|
|
houseInfo != null && type != 3 ? HouseItem(houseInfo, gameInfo) : Container(),
|
|
|
- houseInfo != null && playerInfo != null && type != 3 ? _resultContent(houseInfo, playerInfo) : Container(),
|
|
|
+ houseInfo != null && playerInfo != null && type != 3 ? _resultContent(houseInfo, playerInfo, tipInfo.typeFlag) : Container(),
|
|
|
(type == 2 || type == 3)
|
|
|
? Container(
|
|
|
width: double.infinity,
|
|
|
@@ -202,9 +222,7 @@ class TipInfoState extends State<TipInfo> {
|
|
|
btntext: '立即领取',
|
|
|
onTapHomeMenu: () async {
|
|
|
Toast.show(context, '加载中', -1, 'loading');
|
|
|
- Result res = type == 2
|
|
|
- ? await HttpManager.post('playerInfo/receive', data: {'id': tipInfo.playerId})
|
|
|
- : await HttpManager.post('systemNotice/receive', data: {'id': widget.tipId});
|
|
|
+ Result res = type == 2 ? await HttpManager.post('playerInfo/receive', data: {'id': tipInfo.playerId}) : await HttpManager.post('systemNotice/receive', data: {'id': widget.tipId});
|
|
|
Toast.hide();
|
|
|
if (res.success) {
|
|
|
if (tipInfo.playerInfo != null) {
|
|
|
@@ -269,7 +287,7 @@ class TipInfoState extends State<TipInfo> {
|
|
|
}
|
|
|
|
|
|
Widget _btnContent() {
|
|
|
- if (tipInfo.typeFlag != 3 && canAppeal && appealState == 0) {
|
|
|
+ if ((tipInfo.typeFlag == 4 || tipInfo.typeFlag == 5 || (playerInfo != null && playerInfo.dataError)) && canAppeal && appealState == 0) {
|
|
|
return Container(
|
|
|
width: double.infinity,
|
|
|
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
|
|
|
@@ -289,11 +307,7 @@ class TipInfoState extends State<TipInfo> {
|
|
|
},
|
|
|
));
|
|
|
} else if (tipInfo.typeFlag != 3 && canAppeal && appealState == 1) {
|
|
|
- return Container(
|
|
|
- width: double.infinity,
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20),
|
|
|
- height: 88,
|
|
|
- child: LinearButton(btntext: '已提交申诉', colorList: [Color(0xFFAF4946), Color(0xFFAF4946)], textColor: Color(0xFF252532)));
|
|
|
+ return Container(width: double.infinity, padding: EdgeInsets.symmetric(horizontal: 15, vertical: 20), height: 88, child: LinearButton(btntext: '已提交申诉', colorList: [Color(0xFFAF4946), Color(0xFFAF4946)], textColor: Color(0xFF252532)));
|
|
|
} else {
|
|
|
return Container();
|
|
|
}
|
|
|
@@ -334,7 +348,7 @@ class TipInfoState extends State<TipInfo> {
|
|
|
return _widgetList;
|
|
|
}
|
|
|
|
|
|
- Widget _resultContent(HouseInfo houseInfo, PlayerInfo playerInfo) {
|
|
|
+ Widget _resultContent(HouseInfo houseInfo, PlayerInfo playerInfo, int typeFlag) {
|
|
|
List jiangpaiImg = ['images/jiangpai_huangjin.png', 'images/jiangpai_baiyin.png', 'images/jiangpai_qingtong.png', 'images/jiangpai_bojin.png'];
|
|
|
|
|
|
String img = '';
|
|
|
@@ -349,52 +363,79 @@ class TipInfoState extends State<TipInfo> {
|
|
|
img = jiangpaiImg[2];
|
|
|
}
|
|
|
}
|
|
|
- return Container(
|
|
|
- margin: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
|
|
- padding: EdgeInsets.all(15),
|
|
|
- height: 140,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: Color(0xFF3A3E61),
|
|
|
- borderRadius: BorderRadius.only(topRight: Radius.circular(8), bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8))),
|
|
|
- child: Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
- children: <Widget>[
|
|
|
- Text('比赛结果', style: TextStyle(color: Colors.white54, fontSize: 13)),
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
- children: <Widget>[
|
|
|
- Text("参数成员 ", style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
- Text("${houseInfo.playerNumber}人 ", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
|
|
|
- ],
|
|
|
- ),
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
- children: <Widget>[
|
|
|
- Text("是否吃鸡 ", style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
- Text(playerInfo.ranking == 1 ? '是' : '否', style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
|
|
|
- ],
|
|
|
- ),
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
- children: <Widget>[
|
|
|
- Text("获得奖牌 ", style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
- img != ''
|
|
|
- ? Row(
|
|
|
- children: <Widget>[
|
|
|
- Image.asset(
|
|
|
- img,
|
|
|
- width: 20,
|
|
|
- ),
|
|
|
- Text("+1", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
|
|
|
- ],
|
|
|
- )
|
|
|
- : Text("无", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
|
|
|
- ],
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- );
|
|
|
+
|
|
|
+ return Column(children: <Widget>[
|
|
|
+ (typeFlag != 4 && typeFlag != 5 && playerInfo != null && !playerInfo.dataError)
|
|
|
+ ? Container(
|
|
|
+ margin: EdgeInsets.fromLTRB(15, 10, 15, 0),
|
|
|
+ padding: EdgeInsets.all(15),
|
|
|
+ height: 80,
|
|
|
+ decoration: BoxDecoration(color: Color(0xFF3A3E61), borderRadius: BorderRadius.all(Radius.circular(4))),
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: <Widget>[
|
|
|
+ Text('和平精英游戏结果', style: TextStyle(color: Colors.white54, fontSize: 13)),
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: <Widget>[
|
|
|
+ Text.rich(TextSpan(children: [
|
|
|
+ TextSpan(text: "名次 ", style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
+ TextSpan(text: '${playerInfo.ranking}', style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14)),
|
|
|
+ ])),
|
|
|
+ Text.rich(TextSpan(children: [
|
|
|
+ TextSpan(text: "时长 ", style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
+ TextSpan(text: playerInfo.liveTime != null ? '${playerInfo.liveTime}' : '0', style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14)),
|
|
|
+ ])),
|
|
|
+ Text.rich(TextSpan(children: [
|
|
|
+ TextSpan(text: "评分 ", style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
+ TextSpan(text: '${playerInfo.score}', style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14)),
|
|
|
+ ])),
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ : Container(),
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.symmetric(vertical: 5, horizontal: 15),
|
|
|
+ padding: EdgeInsets.all(15),
|
|
|
+ height: 140,
|
|
|
+ decoration: BoxDecoration(color: Color(0xFF3A3E61), borderRadius: BorderRadius.all(Radius.circular(4))),
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: <Widget>[
|
|
|
+ Text('比赛结果', style: TextStyle(color: Colors.white54, fontSize: 13)),
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: <Widget>[Text("参数成员 ", style: TextStyle(color: Colors.white, fontSize: 14)), Text("${houseInfo.playerNumber}人 ", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))],
|
|
|
+ ),
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: <Widget>[Text("是否吃鸡 ", style: TextStyle(color: Colors.white, fontSize: 14)), Text(playerInfo.ranking == 1 ? '是' : '否', style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))],
|
|
|
+ ),
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: <Widget>[
|
|
|
+ Text("获得奖牌 ", style: TextStyle(color: Colors.white, fontSize: 14)),
|
|
|
+ img != ''
|
|
|
+ ? Row(
|
|
|
+ children: <Widget>[
|
|
|
+ Image.asset(
|
|
|
+ img,
|
|
|
+ width: 20,
|
|
|
+ ),
|
|
|
+ Text("+1", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ : Text("无", style: TextStyle(color: Color(0xFFFFB726), fontWeight: FontWeight.w500, fontSize: 14))
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ]);
|
|
|
}
|
|
|
}
|
|
|
|