王子贤 4 months ago
parent
commit
443fe09479
19 changed files with 300 additions and 201 deletions
  1. BIN
      assets/images/login_logo.png
  2. BIN
      assets/images/rtc_empty.png
  3. 10
      lib/controller/discover/room_controller.dart
  4. 3
      lib/controller/mine/mine_controller.dart
  5. 51
      lib/controller/setting/spread_controller.dart
  6. 1
      lib/generated/assets.dart
  7. 7
      lib/im/im_manager.dart
  8. 6
      lib/model/mine/rose_data.dart
  9. 16
      lib/pages/discover/dating_page.dart
  10. 4
      lib/pages/discover/live_room_page.dart
  11. 2
      lib/pages/home/user_information_page.dart
  12. 196
      lib/pages/message/friend_tab.dart
  13. 2
      lib/pages/mine/edit_info_page.dart
  14. 2
      lib/pages/mine/login_page.dart
  15. 2
      lib/pages/mine/rose_page.dart
  16. 2
      lib/pages/mine/vip_page.dart
  17. 193
      lib/pages/setting/match_spread_page.dart
  18. 2
      lib/service/live_chat_message_service.dart
  19. 2
      lib/widget/live/live_recharge_popup.dart

BIN
assets/images/login_logo.png

Before After
Width: 572  |  Height: 256  |  Size: 30 KiB Width: 303  |  Height: 117  |  Size: 17 KiB

BIN
assets/images/rtc_empty.png

Before After
Width: 331  |  Height: 222  |  Size: 24 KiB

10
lib/controller/discover/room_controller.dart

@ -429,24 +429,20 @@ class RoomController extends GetxController with WidgetsBindingObserver {
// //
final senderNickName = GlobalData().userData?.nickName ?? '用户'; final senderNickName = GlobalData().userData?.nickName ?? '用户';
String targetNickName = '用户'; String targetNickName = '用户';
final targetUserIdStr = targetUserId.toString();
// //
final channelDetail = rtcChannelDetail.value; final channelDetail = rtcChannelDetail.value;
if (channelDetail != null) { if (channelDetail != null) {
// //
if (channelDetail.anchorInfo?.userId == targetUserIdStr ||
channelDetail.anchorInfo?.miId == targetUserIdStr) {
if (channelDetail.anchorInfo?.uid == targetUserId) {
targetNickName = channelDetail.anchorInfo?.nickName ?? '用户'; targetNickName = channelDetail.anchorInfo?.nickName ?? '用户';
} }
// //
else if (channelDetail.maleInfo?.userId == targetUserIdStr ||
channelDetail.maleInfo?.miId == targetUserIdStr) {
else if (channelDetail.maleInfo?.uid == targetUserId) {
targetNickName = channelDetail.maleInfo?.nickName ?? '用户'; targetNickName = channelDetail.maleInfo?.nickName ?? '用户';
} }
// //
else if (channelDetail.femaleInfo?.userId == targetUserIdStr ||
channelDetail.femaleInfo?.miId == targetUserIdStr) {
else if (channelDetail.femaleInfo?.uid == targetUserId) {
targetNickName = channelDetail.femaleInfo?.nickName ?? '用户'; targetNickName = channelDetail.femaleInfo?.nickName ?? '用户';
} }
} }

3
lib/controller/mine/mine_controller.dart

@ -7,6 +7,7 @@ import 'package:dating_touchme_app/pages/mine/rose_page.dart';
import 'package:dating_touchme_app/pages/mine/user_help_center_page.dart'; import 'package:dating_touchme_app/pages/mine/user_help_center_page.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../pages/setting/match_spread_page.dart';
import '../../pages/setting/setting_page.dart'; import '../../pages/setting/setting_page.dart';
class MineController extends GetxController { class MineController extends GetxController {
@ -24,7 +25,7 @@ class MineController extends GetxController {
{"icon": Assets.imagesWallet, "title": "我的钱包", "subTitle": "提现无门槛", "path": () => MyWalletPage()}, {"icon": Assets.imagesWallet, "title": "我的钱包", "subTitle": "提现无门槛", "path": () => MyWalletPage()},
{"icon": Assets.imagesShop, "title": "商城中心", "subTitle": "不定期更新商品", "path": () => Null}, {"icon": Assets.imagesShop, "title": "商城中心", "subTitle": "不定期更新商品", "path": () => Null},
{"icon": Assets.imagesCert, "title": "认证中心", "subTitle": GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null ? "未认证" : "已认证", "path": () => AuthCenterPage()}, {"icon": Assets.imagesCert, "title": "认证中心", "subTitle": GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null ? "未认证" : "已认证", "path": () => AuthCenterPage()},
{"icon": Assets.imagesMatchmaker, "title": "红娘等级", "subTitle": "实习红娘", "path": () => MatchmakerUpdatePage()},
{"icon": Assets.imagesMatchmaker, "title": "红娘等级", "subTitle": "实习红娘", "path": () => MatchSpreadPage()},
].obs; ].obs;
List<Map> settingList = [ List<Map> settingList = [

51
lib/controller/setting/spread_controller.dart

@ -7,6 +7,8 @@ import 'package:fluwx/fluwx.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart'; import 'package:get_storage/get_storage.dart';
import '../../generated/assets.dart';
class SpreadController extends GetxController with WidgetsBindingObserver { class SpreadController extends GetxController with WidgetsBindingObserver {
// UserApi实例 // UserApi实例
@ -23,6 +25,13 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
final matchmakerFlag = false.obs; final matchmakerFlag = false.obs;
final button = '去相亲'.obs; final button = '去相亲'.obs;
final revenue = [
{'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'},
{'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'},
{'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'},
{'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'},
].obs;
changePayActive(int index){ changePayActive(int index){
if(index < enableIndex.value && enableIndex.value >= 0){ if(index < enableIndex.value && enableIndex.value >= 0){
return; return;
@ -39,19 +48,37 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
} else { } else {
button.value = '立即加入'; button.value = '立即加入';
} }
}
List<Map> list2 = [
{'title': '邀请注册', 'unit': '10%', 'desc': '分佣', 'enable': 1, 'value': 111, 'icon': 'icon-right1'},
{'title': '发布悬赏', 'unit': '10%', 'desc': '分佣', 'enable': 1, 'value': 112, 'icon': 'icon-right2'},
{'title': '匹配悬赏', 'unit': '10%', 'desc': '分佣', 'enable': 0, 'value': 113, 'icon': 'icon-right41'},
{'title': '推荐红娘', 'unit': '10%', 'desc': '分佣', 'enable': 1, 'value': 114, 'icon': 'icon-right3'},
{'title': '免费升级', 'desc': '门店合伙人', 'enable': 0, 'value': 0, 'icon': 'icon-right51'},
{'title': '资源共享', 'desc': '所有资料', 'enable': 1, 'value': 0, 'icon': 'icon-right6'},
{'title': '业绩奖励', 'unit': '5%', 'desc': '奖励', 'enable': 1, 'value': 0, 'icon': 'icon-right71'},
{'title': '次年续签', 'unit': '90%', 'desc': '减免', 'enable': 1, 'value': 0, 'icon': 'icon-right8'}
].obs;
//
if(roseList[activePay.value].subCategory == 88804){
revenue.value = [
{'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'},
{'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'},
{'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'},
{'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'},
];
} else if(roseList[activePay.value].subCategory == 88803){
revenue.value = [
{'icon': '1', 'desc': '礼物收益范围30%-40%,嘉宾消费的分成6%;'},
{'icon': '2', 'desc': '每天前5人连麦的礼物收益30%,第6-10人连麦的礼物收益35%,第11人以上连麦的礼物收益40%;'},
{'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'},
{'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'},
];
} else if(roseList[activePay.value].subCategory == 88802){
revenue.value = [
{'icon': '1', 'desc': '礼物收益固定40%,邀请嘉宾,嘉宾消费的分成10%'},
{'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'},
{'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'},
];
} else if(roseList[activePay.value].subCategory == 88801){
revenue.value = [
{'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'},
{'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'},
{'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'},
{'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'},
];
}
}
// //
final countdownSeconds = 0.obs; final countdownSeconds = 0.obs;

1
lib/generated/assets.dart

@ -166,6 +166,7 @@ class Assets {
static const String imagesRoseBanner = 'assets/images/rose_banner.png'; static const String imagesRoseBanner = 'assets/images/rose_banner.png';
static const String imagesRoseGift = 'assets/images/rose_gift.png'; static const String imagesRoseGift = 'assets/images/rose_gift.png';
static const String imagesRoseWhite = 'assets/images/rose_white.png'; static const String imagesRoseWhite = 'assets/images/rose_white.png';
static const String imagesRtcEmpty = 'assets/images/rtc_empty.png';
static const String imagesSearch = 'assets/images/search.png'; static const String imagesSearch = 'assets/images/search.png';
static const String imagesSeat = 'assets/images/seat.png'; static const String imagesSeat = 'assets/images/seat.png';
static const String imagesSendCall = 'assets/images/send_call.png'; static const String imagesSendCall = 'assets/images/send_call.png';

7
lib/im/im_manager.dart

@ -442,9 +442,14 @@ class IMManager {
return await EMClient.getInstance.chatManager.sendMessage(customMsg); return await EMClient.getInstance.chatManager.sendMessage(customMsg);
} }
///
Future<List<EMContact>> getAllContacts() async {
return await EMClient.getInstance.contactManager.fetchAllContacts();
}
/// ///
Future<List<EMConversation>> getConversations() async { Future<List<EMConversation>> getConversations() async {
return EMClient.getInstance.chatManager.loadAllConversations();
return await EMClient.getInstance.chatManager.loadAllConversations();
} }
/// ///

6
lib/model/mine/rose_data.dart

@ -10,6 +10,7 @@ class RoseData {
num? unitSellingPrice; num? unitSellingPrice;
String? purchaseTimeValue; String? purchaseTimeValue;
String? validityPeriodDays; String? validityPeriodDays;
String? liveDurationHours;
RoseData( RoseData(
{this.productId, {this.productId,
@ -22,7 +23,8 @@ class RoseData {
this.unitOriginalPrice, this.unitOriginalPrice,
this.unitSellingPrice, this.unitSellingPrice,
this.purchaseTimeValue, this.purchaseTimeValue,
this.validityPeriodDays
this.validityPeriodDays,
this.liveDurationHours
}); });
RoseData.fromJson(Map<String, dynamic> json) { RoseData.fromJson(Map<String, dynamic> json) {
@ -37,6 +39,7 @@ class RoseData {
unitSellingPrice = json['unitSellingPrice']; unitSellingPrice = json['unitSellingPrice'];
purchaseTimeValue = json['purchaseTimeValue']; purchaseTimeValue = json['purchaseTimeValue'];
validityPeriodDays = json['validityPeriodDays']; validityPeriodDays = json['validityPeriodDays'];
liveDurationHours = json['liveDurationHours'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -52,6 +55,7 @@ class RoseData {
data['unitSellingPrice'] = this.unitSellingPrice; data['unitSellingPrice'] = this.unitSellingPrice;
data['purchaseTimeValue'] = this.purchaseTimeValue; data['purchaseTimeValue'] = this.purchaseTimeValue;
data['validityPeriodDays'] = this.validityPeriodDays; data['validityPeriodDays'] = this.validityPeriodDays;
data['liveDurationHours'] = this.liveDurationHours;
return data; return data;
} }
} }

16
lib/pages/discover/dating_page.dart

@ -8,6 +8,7 @@ import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart'; import 'package:tdesign_flutter/tdesign_flutter.dart';
import '../../controller/discover/room_controller.dart'; import '../../controller/discover/room_controller.dart';
import '../../generated/assets.dart';
/// ///
class DatingPage extends StatefulWidget { class DatingPage extends StatefulWidget {
@ -113,12 +114,15 @@ class _DatingPageState extends State<DatingPage>
} }
if (discoverController.rtcChannelList.isEmpty) { if (discoverController.rtcChannelList.isEmpty) {
return Center( return Center(
child: Text(
'暂无直播频道,点击刷新',
style: TextStyle(
fontSize: 14.w,
color: Colors.black38,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(Assets.imagesRtcEmpty, width: 332.w, height: 222.w),
const SizedBox(height: 24),
Text('暂无直播频道,点击刷新', style: TextStyle(fontSize: 14.w, color: Colors.black38)),
const SizedBox(height: 64),
],
), ),
).onTap((){ ).onTap((){
discoverController.loadRtcChannelPage(); discoverController.loadRtcChannelPage();

4
lib/pages/discover/live_room_page.dart

@ -73,6 +73,8 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
} }
void _showGiftPopup() { void _showGiftPopup() {
//
FocusScope.of(context).unfocus();
SmartDialog.show( SmartDialog.show(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
maskColor: TDTheme.of(context).fontGyColor2, maskColor: TDTheme.of(context).fontGyColor2,
@ -92,6 +94,8 @@ class _LiveRoomPageState extends State<LiveRoomPage> {
} }
void _showRechargePopup() { void _showRechargePopup() {
//
FocusScope.of(context).unfocus();
SmartDialog.show( SmartDialog.show(
alignment: Alignment.bottomCenter, alignment: Alignment.bottomCenter,
maskColor: TDTheme.of(context).fontGyColor2, maskColor: TDTheme.of(context).fontGyColor2,

2
lib/pages/home/user_information_page.dart

@ -233,7 +233,7 @@ class UserInformationPage extends StatelessWidget {
), ),
), ),
Text( Text(
"动我ID:${userId}",
"趣恋恋ID:${userId}",
style: TextStyle( style: TextStyle(
fontSize: 12.w, fontSize: 12.w,
color: const Color.fromRGBO(144, 144, 144, 1) color: const Color.fromRGBO(144, 144, 144, 1)

196
lib/pages/message/friend_tab.dart

@ -1,5 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:dating_touchme_app/generated/assets.dart'; import 'package:dating_touchme_app/generated/assets.dart';
import 'package:get/get.dart';
import 'package:dating_touchme_app/controller/message/friend_controller.dart';
import 'package:im_flutter_sdk/im_flutter_sdk.dart';
class FriendTab extends StatefulWidget { class FriendTab extends StatefulWidget {
const FriendTab({super.key}); const FriendTab({super.key});
@ -45,45 +48,45 @@ class _FriendTabState extends State<FriendTab> with TickerProviderStateMixin {
}, },
]; ];
// -
final List<Map<String, dynamic>> _friendList = [
{
"id": 1,
"name": "林园园",
"avatar": Assets.imagesAvatarsExample,
"isOnline": true,
},
{
"id": 2,
"name": "李晖",
"avatar": Assets.imagesAvatarsExample,
"isOnline": false,
},
{
"id": 3,
"name": "李哲",
"avatar": Assets.imagesAvatarsExample,
"isOnline": false,
},
{
"id": 4,
"name": "李夏",
"avatar": Assets.imagesAvatarsExample,
"isOnline": true,
},
{
"id": 5,
"name": "张雪",
"avatar": Assets.imagesAvatarsExample,
"isOnline": false,
},
{
"id": 6,
"name": "王强",
"avatar": Assets.imagesAvatarsExample,
"isOnline": true,
},
];
// - 使 FriendController IM
// final List<Map<String, dynamic>> _friendList = [
// {
// "id": 1,
// "name": "林园园",
// "avatar": Assets.imagesAvatarsExample,
// "isOnline": true,
// },
// {
// "id": 2,
// "name": "李晖",
// "avatar": Assets.imagesAvatarsExample,
// "isOnline": false,
// },
// {
// "id": 3,
// "name": "李哲",
// "avatar": Assets.imagesAvatarsExample,
// "isOnline": false,
// },
// {
// "id": 4,
// "name": "李夏",
// "avatar": Assets.imagesAvatarsExample,
// "isOnline": true,
// },
// {
// "id": 5,
// "name": "张雪",
// "avatar": Assets.imagesAvatarsExample,
// "isOnline": false,
// },
// {
// "id": 6,
// "name": "王强",
// "avatar": Assets.imagesAvatarsExample,
// "isOnline": true,
// },
// ];
// - // -
final List<Map<String, dynamic>> _fansList = [ final List<Map<String, dynamic>> _fansList = [
@ -301,17 +304,56 @@ class _FriendTabState extends State<FriendTab> with TickerProviderStateMixin {
// //
Widget _buildFriendList() { Widget _buildFriendList() {
return ListView.builder(
padding: const EdgeInsets.only(top: 8),
itemCount: _friendList.length,
itemBuilder: (context, index) {
final friend = _friendList[index];
return _buildFriendItem(friend);
return GetX<FriendController>(
init: FriendController(),
builder: (controller) {
if (controller.isLoading.value) {
return const Center(
child: CircularProgressIndicator(),
);
}
if (controller.errorMessage.value.isNotEmpty) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
controller.errorMessage.value,
style: const TextStyle(color: Colors.grey),
),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () => controller.refreshFriends(),
child: const Text('重试'),
),
],
),
);
}
if (controller.friendList.isEmpty) {
return const Center(
child: Text(
'暂无好友',
style: TextStyle(color: Colors.grey),
),
);
}
return ListView.builder(
padding: const EdgeInsets.only(top: 8),
itemCount: controller.friendList.length,
itemBuilder: (context, index) {
final contact = controller.friendList[index];
return _buildFriendItemFromContact(contact);
},
);
}, },
); );
} }
//
// Map
Widget _buildFriendItem(Map<String, dynamic> friend) { Widget _buildFriendItem(Map<String, dynamic> friend) {
return Container( return Container(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 4), margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
@ -387,6 +429,68 @@ class _FriendTabState extends State<FriendTab> with TickerProviderStateMixin {
); );
} }
// EMContact
Widget _buildFriendItemFromContact(EMContact contact) {
// EMContact userId
// userId getUserInfo
final userId = contact.userId;
return Container(
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 4),
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
//
Container(
width: 50,
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
),
child: ClipRRect(
borderRadius: BorderRadius.circular(25),
child: const Icon(Icons.person, size: 30),
),
),
//
Expanded(
child: Container(
margin: const EdgeInsets.only(left: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
userId,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 4),
Text(
"ID: $userId",
style: const TextStyle(
color: Colors.grey,
fontSize: 12,
),
),
],
),
),
),
//
const Icon(Icons.arrow_forward_ios, size: 16, color: Colors.grey),
],
),
);
}
// //
Widget _buildFansList() { Widget _buildFansList() {
return ListView.builder( return ListView.builder(

2
lib/pages/mine/edit_info_page.dart

@ -1061,7 +1061,7 @@ class _EditInfoPageState extends State<EditInfoPage> {
), ),
), ),
Text( Text(
"动我ID:${controller.userData.value?.id}",
"趣恋恋ID:${controller.userData.value?.id}",
style: TextStyle( style: TextStyle(
fontSize: 9.w, fontSize: 9.w,
color: const Color.fromRGBO(144, 144, 144, 1) color: const Color.fromRGBO(144, 144, 144, 1)

2
lib/pages/mine/login_page.dart

@ -184,7 +184,7 @@ class LoginPage extends StatelessWidget {
// //
}, },
child: const Text( child: const Text(
'动我用户协议》',
'趣恋恋用户协议》',
style: TextStyle( style: TextStyle(
fontSize: 11, fontSize: 11,
color: Color.fromRGBO(74, 99, 235, 1), color: Color.fromRGBO(74, 99, 235, 1),

2
lib/pages/mine/rose_page.dart

@ -178,7 +178,7 @@ class RosePage extends StatelessWidget {
) )
), ),
TextSpan( TextSpan(
text: "动我充值协议》",
text: "趣恋恋充值协议》",
style: TextStyle( style: TextStyle(
color: Color.fromRGBO(71, 123, 255, 1) color: Color.fromRGBO(71, 123, 255, 1)
) )

2
lib/pages/mine/vip_page.dart

@ -145,7 +145,7 @@ class _VipPageState extends State<VipPage> {
), ),
SizedBox(height: 29.w,), SizedBox(height: 29.w,),
Text( Text(
"开通 动我vip 畅享尊贵特权~",
"开通 趣恋恋vip 畅享尊贵特权~",
style: TextStyle( style: TextStyle(
fontSize: 11.w, fontSize: 11.w,
color: const Color.fromRGBO(144, 144, 144, 1 ) color: const Color.fromRGBO(144, 144, 144, 1 )

193
lib/pages/setting/match_spread_page.dart

@ -70,132 +70,27 @@ class MatchSpreadPage extends StatelessWidget {
SizedBox(height: 24.w), SizedBox(height: 24.w),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text('新红娘入驻权益', style: TextStyle(fontSize: 22, color: Color(0xFF333333))),
SizedBox(width: 4.w),
Container(
padding: EdgeInsets.symmetric(vertical: 2.w, horizontal: 4.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4.w)),
gradient: LinearGradient(
begin: Alignment.topLeft, // 0%
end: Alignment.bottomRight, // 100%
colors: [
Color(0xFFF8C18E), //
Color(0xFFF9DFC3),//
],
stops: [0.0, 1.0], // CSS 0%77.53%100%
),
Text(
"新红娘入驻权益",
style: TextStyle(
fontSize: 22.w,
color: const Color.fromRGBO(48, 48, 48, 1),
fontWeight: FontWeight.w500
), ),
child: Text('限时', style: TextStyle(fontSize: 12, color: Color(0xFF894A0D))),
),
SizedBox(width: 4.w,),
Image.asset(
Assets.imagesLimitTime,
width: 30.w,
height: 16.w,
) )
], ],
), ),
SizedBox(height: 16.w,), SizedBox(height: 16.w,),
Container(
padding: EdgeInsets.symmetric(
vertical: 12.w,
horizontal: 18.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(117, 98, 249, .1)
),
child: Row(
children: [
Image.asset(
Assets.imagesVipGift,
width: 34.w,
),
SizedBox(width: 16.w,),
Expanded(
child: Text(
'礼物收益范围15%-30%,嘉宾消费的分成3%;',
style: TextStyle(color: Color(0xFF333333)),
),
)
],
),
),
SizedBox(height: 12.w,),
Container(
padding: EdgeInsets.symmetric(
vertical: 12.w,
horizontal: 18.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(117, 98, 249, .1)
),
child: Row(
children: [
Image.asset(
Assets.imagesMatchmakerIcon2,
width: 34.w,
),
SizedBox(width: 16.w,),
Expanded(
child: Text(
'每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;',
style: TextStyle(color: Color(0xFF333333)),
),
)
],
),
),
SizedBox(height: 12.w,),
Container(
padding: EdgeInsets.symmetric(
vertical: 12.w,
horizontal: 18.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(117, 98, 249, .1)
),
child: Row(
children: [
Image.asset(
Assets.imagesMatchmakerIcon3,
width: 34.w,
),
SizedBox(width: 16.w,),
Expanded(
child: Text(
'红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;',
style: TextStyle(color: Color(0xFF333333)),
),
)
],
),
),
SizedBox(height: 12.w,),
Container(
padding: EdgeInsets.symmetric(
vertical: 18.w,
horizontal: 18.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(117, 98, 249, .1)
),
child: Row(
children: [
Image.asset(
Assets.imagesMatchmakerIcon4,
width: 34.w,
),
SizedBox(width: 16.w,),
Expanded(
child: Text(
'新徒弟首月收益的10%(平台奖励)',
style: TextStyle(color: Color(0xFF333333)),
),
)
],
),
),
...controller.revenue.map((entry){
return RevenueItem(item: entry);
}),
], ],
), ),
), ),
@ -298,7 +193,7 @@ class _PayItemState extends State<PayItem> {
color: Color(0xFF333333), color: Color(0xFF333333),
fontWeight: FontWeight.bold fontWeight: FontWeight.bold
), ),
) : Text('+10小时视频相亲',
) : Text('+${widget.item.liveDurationHours ?? '10'}小时视频相亲',
style: TextStyle( style: TextStyle(
fontSize: 12.w, fontSize: 12.w,
color: Color(0xFF999999), color: Color(0xFF999999),
@ -331,4 +226,60 @@ class _PayItemState extends State<PayItem> {
widget.changeActive(widget.index); widget.changeActive(widget.index);
}); });
} }
}
class RevenueItem extends StatefulWidget {
final dynamic item;
const RevenueItem({super.key, required this.item});
@override
State<RevenueItem> createState() => _RevenueItemState();
}
class _RevenueItemState extends State<RevenueItem> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(17.w),
margin: EdgeInsets.only(bottom: 8.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(16.w)),
color: const Color.fromRGBO(117, 98, 249, .1)
),
child: Row(
children: [
Image.asset(
_getButtonImage(widget.item['icon']),
width: 26.w,
height: 26.w,
),
SizedBox(width: 14.w,),
Expanded(
child: Text(
widget.item['desc'],
style: TextStyle(
fontSize: 12.w,
color: Color(0xFF999999)
),
),
)
],
),
);
}
String _getButtonImage(String icon) {
if(icon == '1'){
return Assets.imagesMatchmakerIcon1;
}
if(icon == '2'){
return Assets.imagesMatchmakerIcon2;
}
if(icon == '3'){
return Assets.imagesMatchmakerIcon3;
}
return Assets.imagesMatchmakerIcon4; // HI位置
}
} }

2
lib/service/live_chat_message_service.dart

@ -69,6 +69,8 @@ class LiveChatMessageService {
// //
if (messageData['type'] == 'end_live') { if (messageData['type'] == 'end_live') {
RoomController controller = Get.find<RoomController>();
await controller.leaveChannel();
_handleEndLiveMessage(); _handleEndLiveMessage();
return; return;
} }

2
lib/widget/live/live_recharge_popup.dart

@ -277,7 +277,7 @@ class LiveRechargePopup extends StatelessWidget {
print('打开充值协议'); print('打开充值协议');
}, },
child: Text( child: Text(
"动我充值协议》",
"趣恋恋充值协议》",
style: TextStyle( style: TextStyle(
fontSize: 11.w, fontSize: 11.w,
color: const Color.fromRGBO(71, 123, 255, 1), color: const Color.fromRGBO(71, 123, 255, 1),

Loading…
Cancel
Save