|
|
|
@ -17,85 +17,213 @@ class MatchSpreadPage extends StatelessWidget { |
|
|
|
return GetX<SpreadController>( |
|
|
|
init: SpreadController(), |
|
|
|
builder: (controller){ |
|
|
|
return Scaffold( |
|
|
|
appBar: PageAppbar(title: "入驻加盟"), |
|
|
|
body: SingleChildScrollView( |
|
|
|
child: Container( |
|
|
|
padding: EdgeInsets.symmetric(vertical: 10.w, horizontal: 12.w), |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
SingleChildScrollView( |
|
|
|
scrollDirection: Axis.horizontal, |
|
|
|
child: Row( |
|
|
|
return Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
gradient: LinearGradient( |
|
|
|
begin: Alignment.topLeft, // 0%:左边开始 |
|
|
|
end: Alignment.bottomCenter, // 100%:右边结束 |
|
|
|
colors: [ |
|
|
|
Color.fromRGBO(172, 89, 255, 1), // 紫色 |
|
|
|
Color.fromRGBO(117, 98, 249, 1), // 中间淡蓝 |
|
|
|
Color.fromRGBO(255, 255, 255, 1), |
|
|
|
Color.fromRGBO(255, 255, 255, 1),// 右侧深蓝 |
|
|
|
], |
|
|
|
stops: [0.0, 0.32, 0.66, 1.0], // 对应 CSS 百分比:0%、77.53%、100% |
|
|
|
), |
|
|
|
), |
|
|
|
child: controller.roseList.isNotEmpty ? Scaffold( |
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
appBar: PageAppbar(title: "入驻加盟", backgroundColor: Colors.transparent, color: Colors.white), |
|
|
|
body: SingleChildScrollView( |
|
|
|
child: Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(18.w)), |
|
|
|
color: Colors.white |
|
|
|
), |
|
|
|
padding: EdgeInsets.symmetric(vertical: 10.w, horizontal: 12.w), |
|
|
|
margin: EdgeInsets.symmetric(vertical: 10.w, horizontal: 12.w), |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
SizedBox(height: 6.w,), |
|
|
|
Row( |
|
|
|
children: [ |
|
|
|
...controller.roseList.asMap().entries.map((entry){ |
|
|
|
return PayItem(item: entry.value, active: controller.activePay.value, index: entry.key, changeActive: controller.changePayActive); |
|
|
|
}), |
|
|
|
Text( |
|
|
|
"趣恋恋,让婚恋服务更高效", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(height: 32.w), |
|
|
|
if(controller.roseList.isNotEmpty)Row( |
|
|
|
children: [ |
|
|
|
Text('红娘权益', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold)), |
|
|
|
], |
|
|
|
), |
|
|
|
SizedBox(height: 24.w,), |
|
|
|
if(controller.roseList.isNotEmpty)Wrap( |
|
|
|
spacing: 10.w, |
|
|
|
runSpacing: 18.w, |
|
|
|
children: [ |
|
|
|
...controller.list2.map((e){ |
|
|
|
return SizedBox( |
|
|
|
width: 80.w, |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
Icon(TDIcons.help_circle, color: Colors.orange, size: 36), |
|
|
|
SizedBox(height: 8.w,), |
|
|
|
Text(e['title'], style: TextStyle(fontSize: 14, color: Color(0xFF999999))), |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
if(e['unit'] != null)Text(e['unit'], style: TextStyle(fontSize: 14)), |
|
|
|
Text(e['desc'], style: TextStyle(fontSize: 14, color: Color(0xFF999999))), |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
SizedBox(height: 15.w,), |
|
|
|
SingleChildScrollView( |
|
|
|
scrollDirection: Axis.horizontal, |
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
...controller.roseList.asMap().entries.map((entry){ |
|
|
|
return PayItem(item: entry.value, active: controller.activePay.value, index: entry.key, changeActive: controller.changePayActive); |
|
|
|
}), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
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% |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
}), |
|
|
|
], |
|
|
|
), |
|
|
|
], |
|
|
|
child: Text('限时', style: TextStyle(fontSize: 12, color: Color(0xFF894A0D))), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
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)), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
bottomNavigationBar: controller.roseList.isNotEmpty ? SafeArea( |
|
|
|
child: Container( |
|
|
|
height: 60, |
|
|
|
padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 16.w), |
|
|
|
child: TDButton( |
|
|
|
text: '立即加入', |
|
|
|
width: MediaQuery.of(context).size.width - 40, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
style: TDButtonStyle( |
|
|
|
textColor: Colors.white, |
|
|
|
backgroundColor: Color(0xFFEE811B), |
|
|
|
), |
|
|
|
activeStyle: TDButtonStyle( |
|
|
|
textColor: Colors.white, |
|
|
|
backgroundColor: Color(0xC3EE811B), |
|
|
|
bottomNavigationBar: SafeArea( |
|
|
|
child: Container( |
|
|
|
height: 60, |
|
|
|
padding: EdgeInsets.symmetric(vertical: 5.w, horizontal: 20.w), |
|
|
|
child: TDButton( |
|
|
|
text: controller.button.value, |
|
|
|
width: MediaQuery.of(context).size.width - 40, |
|
|
|
size: TDButtonSize.large, |
|
|
|
type: TDButtonType.fill, |
|
|
|
shape: TDButtonShape.round, |
|
|
|
style: TDButtonStyle( |
|
|
|
textColor: Colors.white, |
|
|
|
backgroundColor: Color(0xFF7562F9), |
|
|
|
), |
|
|
|
activeStyle: TDButtonStyle( |
|
|
|
textColor: Colors.white, |
|
|
|
backgroundColor: Color(0xC37562F9), |
|
|
|
), |
|
|
|
onTap: (){ |
|
|
|
controller.submitOrder(); |
|
|
|
}, |
|
|
|
), |
|
|
|
onTap: (){ |
|
|
|
controller.submitOrder(); |
|
|
|
}, |
|
|
|
), |
|
|
|
) |
|
|
|
) |
|
|
|
), |
|
|
|
) : null, |
|
|
|
); |
|
|
|
}, |
|
|
|
@ -125,9 +253,9 @@ class _PayItemState extends State<PayItem> { |
|
|
|
height: 160.h, |
|
|
|
margin: const EdgeInsets.only(right: 10), |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6.w)), |
|
|
|
color: widget.active == widget.index ? const Color.fromRGBO(239, 19, 46, .05) : Colors.white, |
|
|
|
border: widget.active == widget.index ? Border.all(width: 1, color: const Color(0xFFEE811B)) : Border.all(width: 1, color: const Color(0xFFEEEEEE)) |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(18.w)), |
|
|
|
color: Colors.white, |
|
|
|
border: widget.active == widget.index ? Border.all(width: 1, color: const Color(0xFF7562F9)) : Border.all(width: 1, color: const Color(0xFFEEEEEE)) |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
@ -143,7 +271,7 @@ class _PayItemState extends State<PayItem> { |
|
|
|
"¥", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.w, |
|
|
|
color: Color(0xFFEE811B), |
|
|
|
color: Color(0xFF7562F9), |
|
|
|
fontWeight: FontWeight.bold |
|
|
|
), |
|
|
|
), |
|
|
|
@ -153,7 +281,7 @@ class _PayItemState extends State<PayItem> { |
|
|
|
"${widget.item.unitSellingPrice}", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 26.w, |
|
|
|
color: Color(0xFFEE811B), |
|
|
|
color: Color(0xFF7562F9), |
|
|
|
fontWeight: FontWeight.bold |
|
|
|
), |
|
|
|
), |
|
|
|
@ -161,12 +289,21 @@ class _PayItemState extends State<PayItem> { |
|
|
|
), |
|
|
|
TDText("¥${widget.item.unitOriginalPrice}", isTextThrough: true, style: TextStyle(color: Color(0xFFCCCCCC)),), |
|
|
|
const SizedBox(height: 18), |
|
|
|
Text( |
|
|
|
"有效期:${widget.item.validityPeriodDays}天", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.w, |
|
|
|
color: Color(0xFF333333), |
|
|
|
fontWeight: FontWeight.bold |
|
|
|
SizedBox( |
|
|
|
height: 24, |
|
|
|
child: widget.item.validityPeriodDays != null ? Text( |
|
|
|
"有效期:${widget.item.validityPeriodDays}天", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.w, |
|
|
|
color: Color(0xFF333333), |
|
|
|
fontWeight: FontWeight.bold |
|
|
|
), |
|
|
|
) : Text('+10小时视频相亲', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.w, |
|
|
|
color: Color(0xFF999999), |
|
|
|
fontWeight: FontWeight.bold |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
@ -176,13 +313,13 @@ class _PayItemState extends State<PayItem> { |
|
|
|
left: 0, |
|
|
|
top: 0, |
|
|
|
child: Container( |
|
|
|
padding: EdgeInsets.symmetric(vertical: 2.w, horizontal: 6.w), |
|
|
|
padding: EdgeInsets.symmetric(vertical: 4.w, horizontal: 12.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
topLeft: Radius.circular(6.w), |
|
|
|
bottomRight: Radius.circular(6.w), |
|
|
|
topLeft: Radius.circular(18.w), |
|
|
|
bottomRight: Radius.circular(18.w), |
|
|
|
), |
|
|
|
color: widget.active == widget.index ? const Color(0xFFEE811B) : Color(0xFFCCCCCC) |
|
|
|
color: widget.active == widget.index ? const Color(0xFF7562F9) : Color(0xFFCCCCCC) |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Text(widget.item.productTitle!.replaceAll('加盟费', ''), style: TextStyle(fontSize: 12, color: Colors.white)), |
|
|
|
|