Browse Source

no message

ios
ZHR007 4 months ago
parent
commit
d6fbb5a811
6 changed files with 127 additions and 140 deletions
  1. BIN
      assets/images/rtc_empty.png
  2. 51
      lib/controller/setting/spread_controller.dart
  3. 1
      lib/generated/assets.dart
  4. 6
      lib/model/mine/rose_data.dart
  5. 16
      lib/pages/discover/dating_page.dart
  6. 193
      lib/pages/setting/match_spread_page.dart

BIN
assets/images/rtc_empty.png

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

51
lib/controller/setting/spread_controller.dart

@ -7,6 +7,8 @@ import 'package:fluwx/fluwx.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import '../../generated/assets.dart';
class SpreadController extends GetxController with WidgetsBindingObserver {
// UserApi实例
@ -23,6 +25,13 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
final matchmakerFlag = false.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){
if(index < enableIndex.value && enableIndex.value >= 0){
return;
@ -39,19 +48,37 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
} else {
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;

1
lib/generated/assets.dart

@ -166,6 +166,7 @@ class Assets {
static const String imagesRoseBanner = 'assets/images/rose_banner.png';
static const String imagesRoseGift = 'assets/images/rose_gift.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 imagesSeat = 'assets/images/seat.png';
static const String imagesSendCall = 'assets/images/send_call.png';

6
lib/model/mine/rose_data.dart

@ -10,6 +10,7 @@ class RoseData {
num? unitSellingPrice;
String? purchaseTimeValue;
String? validityPeriodDays;
String? liveDurationHours;
RoseData(
{this.productId,
@ -22,7 +23,8 @@ class RoseData {
this.unitOriginalPrice,
this.unitSellingPrice,
this.purchaseTimeValue,
this.validityPeriodDays
this.validityPeriodDays,
this.liveDurationHours
});
RoseData.fromJson(Map<String, dynamic> json) {
@ -37,6 +39,7 @@ class RoseData {
unitSellingPrice = json['unitSellingPrice'];
purchaseTimeValue = json['purchaseTimeValue'];
validityPeriodDays = json['validityPeriodDays'];
liveDurationHours = json['liveDurationHours'];
}
Map<String, dynamic> toJson() {
@ -52,6 +55,7 @@ class RoseData {
data['unitSellingPrice'] = this.unitSellingPrice;
data['purchaseTimeValue'] = this.purchaseTimeValue;
data['validityPeriodDays'] = this.validityPeriodDays;
data['liveDurationHours'] = this.liveDurationHours;
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 '../../controller/discover/room_controller.dart';
import '../../generated/assets.dart';
///
class DatingPage extends StatefulWidget {
@ -113,12 +114,15 @@ class _DatingPageState extends State<DatingPage>
}
if (discoverController.rtcChannelList.isEmpty) {
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((){
discoverController.loadRtcChannelPage();

193
lib/pages/setting/match_spread_page.dart

@ -70,132 +70,27 @@ class MatchSpreadPage extends StatelessWidget {
SizedBox(height: 24.w),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
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,),
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),
fontWeight: FontWeight.bold
),
) : Text('+10小时视频相亲',
) : Text('+${widget.item.liveDurationHours ?? '10'}小时视频相亲',
style: TextStyle(
fontSize: 12.w,
color: Color(0xFF999999),
@ -331,4 +226,60 @@ class _PayItemState extends State<PayItem> {
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位置
}
}
Loading…
Cancel
Save