diff --git a/assets/images/answer_icon.png b/assets/images/answer_icon.png new file mode 100644 index 0000000..db2c147 Binary files /dev/null and b/assets/images/answer_icon.png differ diff --git a/assets/images/daily_tasks.png b/assets/images/daily_tasks.png new file mode 100644 index 0000000..a3c700f Binary files /dev/null and b/assets/images/daily_tasks.png differ diff --git a/assets/images/get_out_icon.png b/assets/images/get_out_icon.png new file mode 100644 index 0000000..f06dd48 Binary files /dev/null and b/assets/images/get_out_icon.png differ diff --git a/assets/images/hang_up_icon.png b/assets/images/hang_up_icon.png new file mode 100644 index 0000000..07ac1c1 Binary files /dev/null and b/assets/images/hang_up_icon.png differ diff --git a/assets/images/settlement_month.png b/assets/images/settlement_month.png new file mode 100644 index 0000000..ec7e8ee Binary files /dev/null and b/assets/images/settlement_month.png differ diff --git a/assets/images/settlement_today.png b/assets/images/settlement_today.png new file mode 100644 index 0000000..27c489d Binary files /dev/null and b/assets/images/settlement_today.png differ diff --git a/lib/controller/home/home_controller.dart b/lib/controller/home/home_controller.dart index 0f6da2f..8723c8e 100644 --- a/lib/controller/home/home_controller.dart +++ b/lib/controller/home/home_controller.dart @@ -1,3 +1,8 @@ +import 'dart:async'; + +import 'package:dating_touchme_app/generated/assets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import '../../network/home_api.dart'; @@ -35,6 +40,143 @@ class HomeController extends GetxController { _homeApi = Get.find(); // 初始化时加载数据 loadInitialData(); + + // Timer.periodic(const Duration(seconds: 10), (t) { + // SmartDialog.show( + // alignment: Alignment.center, + // maskColor: Colors.black.withOpacity(0.5), + // onDismiss: () { + // + // }, + // builder: (context) { + // // return LiveRoomGuestListDialog( + // // initialTab: isMaleSeat ? 1 : 0, // 0: 女嘉宾, 1: 男嘉宾 + // // ); + // return ClipRRect( + // borderRadius: BorderRadius.all(Radius.circular(16.w)), + // child: Material( + // child: Stack( + // + // children: [ + // Container( + // width: 311.w, + // height: 210.w, + // color: Colors.white, + // padding: EdgeInsets.only( + // top: 53.w, + // left: 23.w, + // right: 23.w, + // bottom: 20.w + // ), + // child: Column( + // children: [ + // Text( + // "主持人邀请您视频连麦", + // style: TextStyle( + // fontSize: 21.w, + // color: const Color.fromRGBO(117, 98, 249, 1), + // fontWeight: FontWeight.w500 + // ), + // ), + // SizedBox(height: 15.w,), + // Text( + // "有相亲卡的用户免费", + // style: TextStyle( + // fontSize: 12.w, + // color: const Color.fromRGBO(87, 87, 87, 1), + // fontWeight: FontWeight.w500 + // ), + // ), + // SizedBox(height: 28.w,), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Container( + // width: 128.w, + // height: 40.w, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.all(Radius.circular(12.w)), + // color: const Color.fromRGBO(237, 237, 237, 1) + // ), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Image.asset( + // Assets.imagesHangUpIcon, + // width: 26.w, + // height: 26.w, + // ), + // SizedBox(width: 5.w,), + // Text( + // "拒绝", + // style: TextStyle( + // fontSize: 15.w + // ), + // ) + // ], + // ), + // ), + // Container( + // width: 128.w, + // height: 40.w, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.all(Radius.circular(12.w)), + // color: const Color.fromRGBO(117, 98, 249, 1) + // ), + // child: Row( + // mainAxisAlignment: MainAxisAlignment.center, + // children: [ + // Image.asset( + // Assets.imagesAnswerIcon, + // width: 18.w, + // height: 13.w, + // ), + // SizedBox(width: 5.w,), + // Text( + // "拒绝", + // style: TextStyle( + // fontSize: 15.w, + // color: Colors.white + // ), + // ) + // ], + // ), + // ), + // ], + // ) + // ], + // ), + // ), + // Positioned( + // top: 0, + // left: 0, + // child: Container( + // padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 15.w), + // decoration: BoxDecoration( + // borderRadius: BorderRadius.only( + // topLeft: Radius.circular(16.w), + // bottomRight: Radius.circular(16.w), + // ), + // color: const Color.fromRGBO(117, 98, 249, 1) + // ), + // child: Text( + // "20玫瑰", + // style: TextStyle( + // fontSize: 14.w, + // color: Colors.white, + // fontWeight: FontWeight.w500 + // ), + // ), + // ), + // ) + // ], + // ), + // ), + // ); + // }, + // ); + // // 你的代码写这里 + // }); } /// 加载初始数据(同时加载两个标签页的数据) diff --git a/lib/generated/assets.dart b/lib/generated/assets.dart index 5fe7891..0ff30ee 100644 --- a/lib/generated/assets.dart +++ b/lib/generated/assets.dart @@ -71,6 +71,7 @@ class Assets { static const String imagesAd = 'assets/images/ad.png'; static const String imagesAdd = 'assets/images/add.png'; static const String imagesAliPay = 'assets/images/ali_pay.png'; + static const String imagesAnswerIcon = 'assets/images/answer_icon.png'; static const String imagesAppLogo = 'assets/images/app_logo.jpg'; static const String imagesArrow = 'assets/images/arrow.png'; static const String imagesArrowForwardRight = 'assets/images/arrow_forward_right.png'; @@ -96,6 +97,7 @@ class Assets { static const String imagesCheck = 'assets/images/check.png'; static const String imagesCloseArrow = 'assets/images/close_arrow.png'; static const String imagesCustomer = 'assets/images/customer.png'; + static const String imagesDailyTasks = 'assets/images/daily_tasks.png'; static const String imagesDiscoverNol = 'assets/images/discover_nol.png'; static const String imagesDiscoverPre = 'assets/images/discover_pre.png'; static const String imagesEdit = 'assets/images/edit.png'; @@ -113,6 +115,7 @@ class Assets { static const String imagesFilterIcon = 'assets/images/filter_icon.png'; static const String imagesFireIcon = 'assets/images/fire_icon.png'; static const String imagesFirstPay = 'assets/images/first_pay.png'; + static const String imagesGetOutIcon = 'assets/images/get_out_icon.png'; static const String imagesGift = 'assets/images/gift.png'; static const String imagesGift1 = 'assets/images/gift1.png'; static const String imagesGift2 = 'assets/images/gift2.png'; @@ -121,6 +124,7 @@ class Assets { static const String imagesGift5 = 'assets/images/gift5.png'; static const String imagesGiftIcon = 'assets/images/gift_icon.png'; static const String imagesGiftPic = 'assets/images/gift_pic.png'; + static const String imagesHangUpIcon = 'assets/images/hang_up_icon.png'; static const String imagesHelpBg = 'assets/images/help_bg.png'; static const String imagesHiIcon = 'assets/images/hi_icon.png'; static const String imagesHomeNol = 'assets/images/home_nol.png'; @@ -188,6 +192,8 @@ class Assets { static const String imagesSendVideoCall = 'assets/images/send_video_call.png'; static const String imagesSetting = 'assets/images/setting.png'; static const String imagesSettingIcon = 'assets/images/setting_icon.png'; + static const String imagesSettlementMonth = 'assets/images/settlement_month.png'; + static const String imagesSettlementToday = 'assets/images/settlement_today.png'; static const String imagesShop = 'assets/images/shop.png'; static const String imagesSplash = 'assets/images/splash.png'; static const String imagesSubscript = 'assets/images/subscript.png'; diff --git a/lib/pages/discover/settlement_page.dart b/lib/pages/discover/settlement_page.dart new file mode 100644 index 0000000..9e68b2b --- /dev/null +++ b/lib/pages/discover/settlement_page.dart @@ -0,0 +1,216 @@ +import 'package:dating_touchme_app/components/page_appbar.dart'; +import 'package:dating_touchme_app/generated/assets.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class SettlementPage extends StatefulWidget { + const SettlementPage({super.key}); + + @override + State createState() => _SettlementPageState(); +} + +class _SettlementPageState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: PageAppbar(title: "", backgroundColor: Colors.transparent, color: Colors.white,), + backgroundColor: const Color.fromRGBO(19, 16, 47, 1), + body: Container( + padding: EdgeInsets.only( + top: 100.w, + right: 25.w, + bottom: 25.w, + left: 25.w + ), + child: Column( + children: [ + Text( + "开心的橘子", + style: TextStyle( + fontSize: 14.w, + color: Colors.white + ), + ), + SizedBox(height: 62.w,), + Stack( + clipBehavior: Clip.none, + children: [ + Container( + width: 325.w, + height: 154.w, + padding: EdgeInsets.only( + top: 70.w, + right: 26.w, + bottom: 47.w, + left: 26.w, + ), + decoration: BoxDecoration( + border: Border.all(width: 1.w, color: const Color.fromRGBO(117, 98, 249, 1)), + color: const Color.fromRGBO(117, 98, 249, .2) + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: TextSpan( + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w500 + ), + children: [ + TextSpan( + text: "0.35", + style: TextStyle( + fontSize: 23.w, + ) + ), + TextSpan( + text: "小时", + style: TextStyle( + fontSize: 12.w, + ) + ) + ] + ), + ), + Text( + "今日总开播", + style: TextStyle( + fontSize: 12.w, + color: const Color.fromRGBO(117, 98, 249, 1) + ), + ) + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: TextSpan( + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w500 + ), + children: [ + TextSpan( + text: "0.35", + style: TextStyle( + fontSize: 23.w, + ) + ), + TextSpan( + text: "小时", + style: TextStyle( + fontSize: 12.w, + ) + ) + ] + ), + ), + Text( + "今日总开播", + style: TextStyle( + fontSize: 12.w, + color: const Color.fromRGBO(117, 98, 249, 1) + ), + ) + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: TextSpan( + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w500 + ), + children: [ + TextSpan( + text: "0.35", + style: TextStyle( + fontSize: 23.w, + ) + ), + TextSpan( + text: "小时", + style: TextStyle( + fontSize: 12.w, + ) + ) + ] + ), + ), + Text( + "今日总开播", + style: TextStyle( + fontSize: 12.w, + color: const Color.fromRGBO(117, 98, 249, 1) + ), + ) + ], + ), + ], + ), + ), + Positioned( + left: 117.w, + top: -52.w, + child: Container( + width: 90.w, + height: 90.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(90.w)), + border: Border.all(width: 2.w, color: Colors.white) + ), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(86.w)), + child: Image.asset( + Assets.imagesUserAvatar, + width: 86.w, + height: 86.w, + ), + ), + ), + ) + ], + ), + SizedBox(height: 18.w,), + Image.asset( + Assets.imagesSettlementToday, + width: 325.w, + ), + SizedBox(height: 7.w,), + Image.asset( + Assets.imagesSettlementMonth, + width: 325.w, + ), + Spacer(), + Container( + width: 325.w, + height: 45.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(42.w)), + color: const Color.fromRGBO(117, 98, 249, 1) + ), + child: Center( + child: Text( + "返回首页", + style: TextStyle( + fontSize: 14.w, + color: Colors.white, + fontWeight: FontWeight.w500 + ), + ), + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/discover/task_detail.dart b/lib/pages/discover/task_detail.dart new file mode 100644 index 0000000..e65d99a --- /dev/null +++ b/lib/pages/discover/task_detail.dart @@ -0,0 +1,160 @@ +import 'package:dating_touchme_app/components/page_appbar.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class TaskDetail extends StatefulWidget { + const TaskDetail({super.key}); + + @override + State createState() => _TaskDetailState(); +} + +class _TaskDetailState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: PageAppbar(title: "任务详情"), + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.symmetric( + vertical: 20.w, + horizontal: 15.w + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + height: 228.w, + margin: EdgeInsets.only(bottom: 21.w), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1)) + ) + ), + child: Row( + children: [ + Container( + width: 229.w, + decoration: BoxDecoration( + border: Border( + right: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1)) + ) + ), + child: Column( + children: [ + Container( + height: 37.w, + color: const Color.fromRGBO(247, 247, 247, 1), + child: Center( + child: Text( + "任务详情", + style: TextStyle( + fontSize: 14.w + ), + ), + ), + ), + Container( + height: 50.w, + padding: EdgeInsets.only(left: 14.w, right: 18.w), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1)) + ) + ), + alignment: Alignment.centerLeft, + child: Text( + "1.有效开播时长≥4小时;", + style: TextStyle( + fontSize: 14.w + ), + ), + ), + Container( + height: 70.w, + padding: EdgeInsets.only(left: 14.w, right: 18.w), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide(width: 1.w, color: const Color.fromRGBO(212, 212, 212, 1)) + ) + ), + alignment: Alignment.centerLeft, + child: Text( + "2.邀请1个女嘉宾上麦,每个女嘉宾≥3个男嘉宾打卡方可下麦;", + style: TextStyle( + fontSize: 14.w + ), + ), + ), + Container( + height: 70.w, + padding: EdgeInsets.only(left: 14.w, right: 18.w), + alignment: Alignment.centerLeft, + child: Text( + "3.直播间打卡人数≥5人,每个男嘉宾上麦时间≥3分钟算一次打卡", + style: TextStyle( + fontSize: 14.w + ), + ), + ) + ], + ), + ), + Expanded( + child: Column( + children: [ + Container( + height: 37.w, + color: const Color.fromRGBO(247, 247, 247, 1), + child: Center( + child: Text( + "任务奖励", + style: TextStyle( + fontSize: 14.w + ), + ), + ), + ), + Expanded( + child: Container( + padding: EdgeInsets.only(left: 14.w, right: 18.w), + alignment: Alignment.center, + child: Text( + "10元", + style: TextStyle( + fontSize: 18.w, + color: const Color.fromRGBO(239, 19, 46, 1) + ), + ), + ), + ) + ], + ), + ) + ], + ), + ), + Text( + "任务说明", + style: TextStyle( + fontSize: 14.w + ), + ), + SizedBox(height: 6.w,), + Text( + "1.奖励场景:三人相亲直播间\n" + "2.结算时间:次日9:00\n" + "3.付费上麦男嘉宾次数:20玫瑰+体验卡\n" + "4.奖励可叠加", + style: TextStyle( + fontSize: 14.w, + color: const Color.fromRGBO(144, 144, 144, 1) + ), + ) + ], + ), + ), + ), + ); + } +} diff --git a/lib/widget/live/live_room_invitation_list.dart b/lib/widget/live/live_room_invitation_list.dart index 1d95a09..e807b00 100644 --- a/lib/widget/live/live_room_invitation_list.dart +++ b/lib/widget/live/live_room_invitation_list.dart @@ -214,11 +214,125 @@ class _LiveRoomInvitationListState extends State with Ti // return LiveRoomGuestListDialog( // initialTab: isMaleSeat ? 1 : 0, // 0: 女嘉宾, 1: 男嘉宾 // ); - return Material( - child: Container( - width: 200.w, - height: 200.w, - color: Colors.white, + return ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(16.w)), + child: Material( + child: Stack( + + children: [ + Container( + width: 311.w, + height: 210.w, + color: Colors.white, + padding: EdgeInsets.only( + top: 53.w, + left: 23.w, + right: 23.w, + bottom: 20.w + ), + child: Column( + children: [ + Text( + "主持人邀请您视频连麦", + style: TextStyle( + fontSize: 21.w, + color: const Color.fromRGBO(117, 98, 249, 1), + fontWeight: FontWeight.w500 + ), + ), + SizedBox(height: 15.w,), + Text( + "有相亲卡的用户免费", + style: TextStyle( + fontSize: 12.w, + color: const Color.fromRGBO(87, 87, 87, 1), + fontWeight: FontWeight.w500 + ), + ), + SizedBox(height: 28.w,), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + width: 128.w, + height: 40.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(12.w)), + color: const Color.fromRGBO(237, 237, 237, 1) + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + Assets.imagesHangUpIcon, + width: 26.w, + height: 26.w, + ), + SizedBox(width: 5.w,), + Text( + "拒绝", + style: TextStyle( + fontSize: 15.w + ), + ) + ], + ), + ), + Container( + width: 128.w, + height: 40.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(12.w)), + color: const Color.fromRGBO(117, 98, 249, 1) + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + Assets.imagesAnswerIcon, + width: 18.w, + height: 13.w, + ), + SizedBox(width: 5.w,), + Text( + "拒绝", + style: TextStyle( + fontSize: 15.w, + color: Colors.white + ), + ) + ], + ), + ), + ], + ) + ], + ), + ), + Positioned( + top: 0, + left: 0, + child: Container( + padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 15.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(16.w), + bottomRight: Radius.circular(16.w), + ), + color: const Color.fromRGBO(117, 98, 249, 1) + ), + child: Text( + "20玫瑰", + style: TextStyle( + fontSize: 14.w, + color: Colors.white, + fontWeight: FontWeight.w500 + ), + ), + ), + ) + ], + ), ), ); }, diff --git a/lib/widget/live/live_room_notice_chat_panel.dart b/lib/widget/live/live_room_notice_chat_panel.dart index f5d7584..5bf1743 100644 --- a/lib/widget/live/live_room_notice_chat_panel.dart +++ b/lib/widget/live/live_room_notice_chat_panel.dart @@ -1,13 +1,16 @@ import 'package:dating_touchme_app/controller/discover/room_controller.dart'; import 'package:dating_touchme_app/controller/global.dart'; +import 'package:dating_touchme_app/controller/overlay_controller.dart'; import 'package:dating_touchme_app/extension/ex_widget.dart'; import 'package:dating_touchme_app/generated/assets.dart'; +import 'package:dating_touchme_app/pages/discover/task_detail.dart'; import 'package:dating_touchme_app/widget/live/live_room_chat_item.dart'; import 'package:dating_touchme_app/widget/live/live_recharge_popup.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; +import 'package:tdesign_flutter/tdesign_flutter.dart'; class LiveRoomNoticeChatPanel extends StatefulWidget { const LiveRoomNoticeChatPanel({super.key}); @@ -77,6 +80,10 @@ class _LiveRoomNoticeChatPanelState extends State { @override Widget build(BuildContext context) { + + final roomController = Get.find(); + final overlayController = Get.find(); + final isHost = roomController.currentRole == CurrentRole.broadcaster; return Container( padding: EdgeInsets.only(left: 13.w, right: 9.w), child: Row( @@ -126,83 +133,311 @@ class _LiveRoomNoticeChatPanelState extends State { }), ), SizedBox(width: 18.w), - Obx((){ - if(controller.rtcChannelDetail.value?.maleInfo == null && GlobalData().userData?.genderCode == 0 && controller.currentRole != CurrentRole.broadcaster || - controller.rtcChannelDetail.value?.femaleInfo == null && GlobalData().userData?.genderCode == 1 && controller.currentRole != CurrentRole.broadcaster || - controller.isLive.value && controller.currentRole != CurrentRole.broadcaster){ - return Container( - width: 120.w, - height: 55.w, - padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.w), - gradient: LinearGradient( - colors: controller.isLive.value ? [Colors.grey, Colors.grey] : [Color(0xFF7C63FF), Color(0xFF987CFF)], - begin: Alignment.topLeft, - end: Alignment.bottomRight, - ), - ), - child: Row( - children: [ - Image.asset( - Assets.imagesRoomVideo, - width: 26.w, + Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Obx((){ + if(controller.rtcChannelDetail.value?.maleInfo == null && GlobalData().userData?.genderCode == 0 && controller.currentRole != CurrentRole.broadcaster || + controller.rtcChannelDetail.value?.femaleInfo == null && GlobalData().userData?.genderCode == 1 && controller.currentRole != CurrentRole.broadcaster || + controller.isLive.value && controller.currentRole != CurrentRole.broadcaster){ + return Container( + width: 120.w, + height: 55.w, + padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 10.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.w), + gradient: LinearGradient( + colors: controller.isLive.value ? [Colors.grey, Colors.grey] : [Color(0xFF7C63FF), Color(0xFF987CFF)], + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), ), - SizedBox(width: 8.w), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, + child: Row( children: [ - Text( - controller.isLive.value - ? '下麦结束' - : (GlobalData().userData?.genderCode == 0 ? '视频相亲' : '免费相亲'), - style: TextStyle( - fontSize: 13.w, - color: Colors.white, - fontWeight: FontWeight.w600, - ), + Image.asset( + Assets.imagesRoomVideo, + width: 26.w, + ), + SizedBox(width: 8.w), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + controller.isLive.value + ? '下麦结束' + : (GlobalData().userData?.genderCode == 0 ? '视频相亲' : '免费相亲'), + style: TextStyle( + fontSize: 13.w, + color: Colors.white, + fontWeight: FontWeight.w600, + ), + ), + SizedBox(height: 2.w), + // 只有男性用户且在非直播状态下才显示剩余相亲卡 + _buildLinkMicCardText(), + ], ), - SizedBox(height: 2.w), - // 只有男性用户且在非直播状态下才显示剩余相亲卡 - _buildLinkMicCardText(), ], ), - ], - ), - ).onTap(() async{ - // 检查是否需要弹出充值弹框 - if (!controller.isLive.value) { - final userData = GlobalData().userData; - final isMale = userData?.genderCode == 0; - if (isMale) { - final linkMicCard = controller.linkMicCard.value; - final cardNum = linkMicCard?.num ?? 0; - // 如果显示"上麦20玫瑰"且玫瑰数量小于20,弹出充值弹框 - if (cardNum == 0 && controller.roseCount.value < 20) { - controller.setDialogDismiss(true); - SmartDialog.show( - alignment: Alignment.bottomCenter, - maskColor: Colors.black.withOpacity(0.5), - onDismiss: (){ - controller.setDialogDismiss(false); - }, - builder: (_) => const LiveRechargePopup(), - ); - return; + ).onTap(() async{ + // 检查是否需要弹出充值弹框 + if (!controller.isLive.value) { + final userData = GlobalData().userData; + final isMale = userData?.genderCode == 0; + if (isMale) { + final linkMicCard = controller.linkMicCard.value; + final cardNum = linkMicCard?.num ?? 0; + // 如果显示"上麦20玫瑰"且玫瑰数量小于20,弹出充值弹框 + if (cardNum == 0 && controller.roseCount.value < 20) { + controller.setDialogDismiss(true); + SmartDialog.show( + alignment: Alignment.bottomCenter, + maskColor: Colors.black.withOpacity(0.5), + onDismiss: (){ + controller.setDialogDismiss(false); + }, + builder: (_) => const LiveRechargePopup(), + ); + return; + } + } } - } - } - - if(controller.isLive.value){ - await controller.leaveChat(); - }else{ - await controller.joinChat(GlobalData().userData?.genderCode == 0 ? CurrentRole.maleAudience : CurrentRole.femaleAudience); + + if(controller.isLive.value){ + await controller.leaveChat(); + }else{ + await controller.joinChat(GlobalData().userData?.genderCode == 0 ? CurrentRole.maleAudience : CurrentRole.femaleAudience); + } + }); } - }); - } - return const SizedBox(); - }), + return const SizedBox(); + }), + if(isHost) Image.asset( + Assets.imagesDailyTasks, + width: 70.w, + ).onTap((){ + // 隐藏键盘 + FocusScope.of(context).unfocus(); + // 隐藏 overlay + SmartDialog.dismiss(); + roomController.setDialogDismiss(true); + + + SmartDialog.show( + alignment: Alignment.bottomCenter, + maskColor: TDTheme.of(context).fontGyColor2, + onDismiss: (){ + roomController.setDialogDismiss(false); + }, + + builder: (_) { + return ClipRRect( + borderRadius: BorderRadius.vertical(top: Radius.circular(9.w)), + child: Material( + color: Colors.white, + child: Container( + width: 375.w, + height: 336.w, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [ + Color.fromRGBO(236, 224, 255, 1), // 0% + Color.fromRGBO(247, 247, 247, 1), // 100% + ], + ), + ), + child: Column( + children: [ + SizedBox( + height: 77.w, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + width: 68.w, + padding: EdgeInsets.only(left: 15.w), + alignment: Alignment.centerLeft, + child: Icon( + Icons.keyboard_arrow_left, + size: 26.w, + color: const Color.fromRGBO(144, 144, 144, 1), + ), + ), + Text( + "今日任务", + style: TextStyle( + fontSize: 21.w, + fontWeight: FontWeight.w700 + ), + ), + Container( + width: 68.w, + height: 22.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.horizontal(left: Radius.circular(22.w)), + color: Colors.white + ), + child: Center( + child: Text( + "任务详情", + style: TextStyle( + fontSize: 12.w, + color: const Color.fromRGBO(144, 144, 144, 1) + ), + ), + ), + ).onTap(() async { + // 隐藏键盘 + FocusScope.of(context).unfocus(); + // 隐藏 overlay + await SmartDialog.dismiss(); + Get.to(() => TaskDetail()); + }) + ], + ), + ), + SingleChildScrollView( + child: Container( + padding: EdgeInsets.symmetric(horizontal: 12.w), + child: Column( + children: [ + Container( + width: 350.w, + margin: EdgeInsets.only(bottom: 10.w), + padding: EdgeInsets.only( + top: 15.w, + right: 10.w, + bottom: 21.w, + left: 12.w + ), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "开播4小时", + style: TextStyle( + fontSize: 14.w + ), + ), + Text( + "50/240分钟", + style: TextStyle( + fontSize: 12.w, + color: const Color.fromRGBO(144, 144, 144, 1) + ), + ) + ], + ), + SizedBox(height: 10.w,), + TDProgress( + type: TDProgressType.linear, + value: 0.5, + strokeWidth: 6, + progressLabelPosition: TDProgressLabelPosition.inside, + showLabel: false, + ) + ], + ), + ), + Container( + width: 350.w, + margin: EdgeInsets.only(bottom: 10.w), + padding: EdgeInsets.only( + top: 15.w, + right: 10.w, + bottom: 21.w, + left: 12.w + ), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "开播4小时", + style: TextStyle( + fontSize: 14.w + ), + ), + Text( + "50/240分钟", + style: TextStyle( + fontSize: 12.w, + color: const Color.fromRGBO(144, 144, 144, 1) + ), + ) + ], + ), + SizedBox(height: 10.w,), + TDProgress( + type: TDProgressType.linear, + value: 0.5, + strokeWidth: 6, + progressLabelPosition: TDProgressLabelPosition.inside, + showLabel: false, + ) + ], + ), + ), + Container( + width: 350.w, + margin: EdgeInsets.only(bottom: 10.w), + padding: EdgeInsets.only( + top: 15.w, + right: 10.w, + bottom: 21.w, + left: 12.w + ), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + "开播4小时", + style: TextStyle( + fontSize: 14.w + ), + ), + Text( + "50/240分钟", + style: TextStyle( + fontSize: 12.w, + color: const Color.fromRGBO(144, 144, 144, 1) + ), + ) + ], + ), + SizedBox(height: 10.w,), + TDProgress( + type: TDProgressType.linear, + value: 0.5, + strokeWidth: 6, + progressLabelPosition: TDProgressLabelPosition.inside, + showLabel: false, + ) + ], + ), + ), + ], + ), + ), + ) + ], + ), + ), + ), + ); + }, + ); + }) + ], + ), ], ), ); diff --git a/lib/widget/live/live_room_user_header.dart b/lib/widget/live/live_room_user_header.dart index 915d8e1..045efaf 100644 --- a/lib/widget/live/live_room_user_header.dart +++ b/lib/widget/live/live_room_user_header.dart @@ -296,7 +296,7 @@ class LiveRoomUserHeader extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, children: [ Image.asset( - Assets.imagesMicOff, + Assets.imagesGetOutIcon, width: 15.w, ), SizedBox(width: 5.w),