From 78ea9ef2e33f6db42c69ef8850a3ec726c6947c8 Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Tue, 27 Jan 2026 16:11:15 +0800 Subject: [PATCH] no message --- lib/controller/setting/spread_controller.dart | 17 ++++++++- lib/pages/setting/match_spread_page.dart | 37 +++++++++++++------ lib/pages/setting/match_task_page.dart | 2 +- 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/lib/controller/setting/spread_controller.dart b/lib/controller/setting/spread_controller.dart index 1493438..0912f8b 100644 --- a/lib/controller/setting/spread_controller.dart +++ b/lib/controller/setting/spread_controller.dart @@ -105,6 +105,9 @@ class SpreadController extends GetxController { } activePay.value = index; canApply.value = false; + if(enableIndex.value == roseList.length){ + return; + } int hours = roseList[activePay.value].liveDurationHours!; int rose = roseList[activePay.value].liveConsumptionAmount!; if(hours > 0 && consumption.value.liveDurationMins! >= 60 * hours){ @@ -139,7 +142,19 @@ class SpreadController extends GetxController { {'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'}, ]; } + } + String getNameByType(int type) { + if(type == 1){ + return '实习红娘'; + } + if(type == 2){ + return '线上红娘'; + } + if(type == 3){ + return '签约红娘'; + } + return ''; // 直播显示直播间按钮(放在HI位置) } // @override @@ -213,7 +228,7 @@ class SpreadController extends GetxController { } if(matchmakerFlag.value){ final index = roseList.indexWhere((item) => item.type == GlobalData().userData!.matchmakerType!); - enableIndex.value = index >= 0 ? index : 0; + enableIndex.value = index >= 0 ? index + 1 : 0; changePayActive(enableIndex.value); } else { changePayActive(0); diff --git a/lib/pages/setting/match_spread_page.dart b/lib/pages/setting/match_spread_page.dart index d3b1022..8d6440a 100644 --- a/lib/pages/setting/match_spread_page.dart +++ b/lib/pages/setting/match_spread_page.dart @@ -76,18 +76,31 @@ class MatchSpreadPage extends StatelessWidget { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - ConstrainedBox( - constraints: BoxConstraints( maxWidth: 120.w), - child: Text( - "${controller.userData.value?.nickName ?? ""}", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 24.w, - color: Colors.white, - fontWeight: FontWeight.w700 + Row( + children: [ + ConstrainedBox( + constraints: BoxConstraints( maxWidth: 120.w), + child: Text( + controller.userData.value?.nickName ?? "", + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 22.w, + color: Colors.white, + fontWeight: FontWeight.w700 + ), + ), ), - ), + if(controller.userData.value!.matchmakerFlag!)SizedBox(width: 4.w,), + if(controller.userData.value!.matchmakerFlag!)Text( + "[${controller.getNameByType(controller.userData.value!.matchmakerType!)}]", + style: TextStyle( + fontSize: 16.w, + color: Colors.white, + fontWeight: FontWeight.w500 + ), + ), + ], ), Text( "ID:${controller.userId.value ?? ""}", @@ -201,7 +214,7 @@ class MatchSpreadPage extends StatelessWidget { ], ) ), - bottomNavigationBar: controller.roseList.isNotEmpty ? SafeArea( + bottomNavigationBar: (controller.roseList.isNotEmpty && controller.enableIndex.value < controller.roseList.length) ? SafeArea( child: Container( height: 60, padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 20.w), diff --git a/lib/pages/setting/match_task_page.dart b/lib/pages/setting/match_task_page.dart index dee886f..d353d4e 100644 --- a/lib/pages/setting/match_task_page.dart +++ b/lib/pages/setting/match_task_page.dart @@ -20,7 +20,7 @@ class MatchTaskPage extends StatelessWidget { child: TDLoading( size: TDLoadingSize.medium, icon: TDLoadingIcon.activity, - text: '加载中…', + text: '加载中...', axis: Axis.vertical, duration: 500, )