|
|
@ -4,14 +4,20 @@ import 'package:dating_touchme_app/controller/mine/mine_controller.dart'; |
|
|
import 'package:dating_touchme_app/extension/ex_widget.dart'; |
|
|
import 'package:dating_touchme_app/extension/ex_widget.dart'; |
|
|
import 'package:dating_touchme_app/model/mine/user_count_data.dart'; |
|
|
import 'package:dating_touchme_app/model/mine/user_count_data.dart'; |
|
|
import 'package:dating_touchme_app/network/user_api.dart'; |
|
|
import 'package:dating_touchme_app/network/user_api.dart'; |
|
|
|
|
|
import 'package:dating_touchme_app/pages/mine/auth_center_page.dart'; |
|
|
import 'package:dating_touchme_app/pages/mine/edit_info_page.dart'; |
|
|
import 'package:dating_touchme_app/pages/mine/edit_info_page.dart'; |
|
|
import 'package:dating_touchme_app/pages/mine/my_friend_page.dart'; |
|
|
import 'package:dating_touchme_app/pages/mine/my_friend_page.dart'; |
|
|
|
|
|
import 'package:dating_touchme_app/pages/mine/my_wallet_page.dart'; |
|
|
|
|
|
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/vip_page.dart'; |
|
|
import 'package:dating_touchme_app/pages/mine/vip_page.dart'; |
|
|
|
|
|
import 'package:dating_touchme_app/pages/setting/setting_page.dart'; |
|
|
import 'package:flutter/material.dart'; |
|
|
import 'package:flutter/material.dart'; |
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
import 'package:dating_touchme_app/generated/assets.dart'; |
|
|
import 'package:dating_touchme_app/generated/assets.dart'; |
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
import 'package:get/get.dart'; |
|
|
|
|
|
import 'package:tdesign_flutter/tdesign_flutter.dart'; |
|
|
|
|
|
|
|
|
import '../discover/visitor_list_page.dart'; |
|
|
import '../discover/visitor_list_page.dart'; |
|
|
|
|
|
|
|
|
@ -80,9 +86,13 @@ class _MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin{ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
@override |
|
|
Widget build(BuildContext context) { |
|
|
Widget build(BuildContext context) { |
|
|
super.build(context); |
|
|
super.build(context); |
|
|
|
|
|
var cellStyle = TDCellStyle.cellStyle(context); |
|
|
|
|
|
cellStyle.cardPadding = EdgeInsets.symmetric(horizontal: 0); |
|
|
|
|
|
cellStyle.padding = EdgeInsets.only(left: 16, top: 12, bottom: 12, right: 12); |
|
|
return GetX<MineController>( |
|
|
return GetX<MineController>( |
|
|
init: MineController(), |
|
|
init: MineController(), |
|
|
builder: (controller) { |
|
|
builder: (controller) { |
|
|
@ -223,7 +233,7 @@ class _MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin{ |
|
|
), |
|
|
), |
|
|
SizedBox(height: 16.w,), |
|
|
SizedBox(height: 16.w,), |
|
|
Container( |
|
|
Container( |
|
|
height: 57.w, |
|
|
|
|
|
|
|
|
// height: 57.w, |
|
|
padding: EdgeInsets.only( |
|
|
padding: EdgeInsets.only( |
|
|
top: 11.w, |
|
|
top: 11.w, |
|
|
right: 42.w, |
|
|
right: 42.w, |
|
|
@ -266,27 +276,132 @@ class _MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin{ |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
SizedBox(height: 12.w,), |
|
|
SizedBox(height: 12.w,), |
|
|
ClipRRect( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|
|
|
|
|
child: Column( |
|
|
|
|
|
children: [ |
|
|
|
|
|
...controller.blockList.map((e){ |
|
|
|
|
|
return BlockItem(item: e, showWaring: e["title"] == "认证中心" && (GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null), path: e["path"],); |
|
|
|
|
|
}), |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
// ClipRRect( |
|
|
|
|
|
// borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|
|
|
|
|
// child: Column( |
|
|
|
|
|
// children: [ |
|
|
|
|
|
// ...controller.blockList.map((e){ |
|
|
|
|
|
// return BlockItem(item: e, showWaring: e["title"] == "认证中心" && (GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null), path: e["path"],); |
|
|
|
|
|
// }), |
|
|
|
|
|
// ], |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
|
|
|
|
|
|
|
|
|
TDCellGroup( |
|
|
|
|
|
theme: TDCellGroupTheme.cardTheme, |
|
|
|
|
|
style: cellStyle, |
|
|
|
|
|
cells: [ |
|
|
|
|
|
TDCell(arrow: true, |
|
|
|
|
|
leftIconWidget: Image.asset(Assets.imagesRose, height: 22.w, width: 22.w), |
|
|
|
|
|
titleWidget: Text( |
|
|
|
|
|
"我的玫瑰", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 14.w |
|
|
|
|
|
), |
|
|
|
|
|
), onClick: (cell) { |
|
|
|
|
|
Get.to(() => RosePage()); |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
TDCell(arrow: true, |
|
|
|
|
|
leftIconWidget: Image.asset(Assets.imagesWallet, height: 22.w, width: 22.w), |
|
|
|
|
|
titleWidget: Text( |
|
|
|
|
|
"我的钱包", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 14.w |
|
|
|
|
|
), |
|
|
|
|
|
), onClick: (cell) { |
|
|
|
|
|
Get.to(() => MyWalletPage()); |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
TDCell(arrow: true, |
|
|
|
|
|
leftIconWidget: Image.asset(Assets.imagesCert, height: 22.w, width: 22.w), |
|
|
|
|
|
titleWidget: Text( |
|
|
|
|
|
"认证中心", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 14.w |
|
|
|
|
|
), |
|
|
|
|
|
), |
|
|
|
|
|
noteWidget: Row( |
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
children: [ |
|
|
|
|
|
if(GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null) TDBadge(TDBadgeType.redPoint), |
|
|
|
|
|
SizedBox(width: 5.w, height: 9.w), |
|
|
|
|
|
Text( |
|
|
|
|
|
GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null ? "未认证" : "已认证", |
|
|
|
|
|
style: TextStyle(fontSize: 12.w, color: const Color.fromRGBO(166, 166, 166, 1)), |
|
|
|
|
|
) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
onClick: (cell) { |
|
|
|
|
|
Get.to(() => AuthCenterPage()); |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
TDCell(arrow: true, |
|
|
|
|
|
leftIconWidget: Image.asset(Assets.imagesMatchmaker, height: 22.w, width: 22.w), |
|
|
|
|
|
titleWidget: Text( |
|
|
|
|
|
"红娘等级", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 14.w |
|
|
|
|
|
), |
|
|
|
|
|
), onClick: (cell) { |
|
|
|
|
|
controller.registerMatch(); |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
|
|
|
|
|
|
SizedBox(height: 12.w,), |
|
|
SizedBox(height: 12.w,), |
|
|
ClipRRect( |
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|
|
|
|
|
child: Column( |
|
|
|
|
|
children: [ |
|
|
|
|
|
...controller.settingList.map((e){ |
|
|
|
|
|
return SettingItem(item: e, path: e["path"],); |
|
|
|
|
|
}) |
|
|
|
|
|
], |
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TDCellGroup( |
|
|
|
|
|
theme: TDCellGroupTheme.cardTheme, |
|
|
|
|
|
style: cellStyle, |
|
|
|
|
|
cells: [ |
|
|
|
|
|
TDCell(arrow: true, |
|
|
|
|
|
leftIconWidget: Image.asset(Assets.imagesSetting, height: 22.w, width: 22.w), |
|
|
|
|
|
titleWidget: Text( |
|
|
|
|
|
"设置", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 14.w |
|
|
|
|
|
), |
|
|
|
|
|
), onClick: (cell) { |
|
|
|
|
|
Get.to(() => SettingPage()); |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
TDCell(arrow: true, |
|
|
|
|
|
leftIconWidget: Image.asset(Assets.imagesCustomer, height: 22.w, width: 22.w), |
|
|
|
|
|
titleWidget: Text( |
|
|
|
|
|
"联系客服", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 14.w |
|
|
|
|
|
), |
|
|
|
|
|
), onClick: (cell) { |
|
|
|
|
|
SmartDialog.showToast('功能暂未开放'); |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
TDCell(arrow: true, |
|
|
|
|
|
leftIconWidget: Image.asset(Assets.imagesMail, height: 22.w, width: 22.w), |
|
|
|
|
|
titleWidget: Text( |
|
|
|
|
|
"意见反馈", |
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
fontSize: 14.w |
|
|
|
|
|
), |
|
|
|
|
|
), onClick: (cell) { |
|
|
|
|
|
Get.to(() => UserHelpCenterPage()); |
|
|
|
|
|
} |
|
|
|
|
|
), |
|
|
|
|
|
], |
|
|
), |
|
|
), |
|
|
|
|
|
// ClipRRect( |
|
|
|
|
|
// borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|
|
|
|
|
// child: Column( |
|
|
|
|
|
// children: [ |
|
|
|
|
|
// ...controller.settingList.map((e){ |
|
|
|
|
|
// return SettingItem(item: e, path: e["path"],); |
|
|
|
|
|
// }) |
|
|
|
|
|
// ], |
|
|
|
|
|
// ), |
|
|
|
|
|
// ), |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
); |
|
|
); |
|
|
@ -329,7 +444,7 @@ class _InfoItemState extends State<InfoItem> { |
|
|
Text( |
|
|
Text( |
|
|
"${widget.item["num"]}", |
|
|
"${widget.item["num"]}", |
|
|
style: TextStyle( |
|
|
style: TextStyle( |
|
|
fontSize: 15.w, |
|
|
|
|
|
|
|
|
fontSize: 18.w, |
|
|
color: Colors.black, |
|
|
color: Colors.black, |
|
|
fontWeight: FontWeight.w700 |
|
|
fontWeight: FontWeight.w700 |
|
|
), |
|
|
), |
|
|
@ -394,7 +509,9 @@ class _BlockItemState extends State<BlockItem> { |
|
|
return InkWell( |
|
|
return InkWell( |
|
|
onTap: (){ |
|
|
onTap: (){ |
|
|
// context.pushNamed(widget.path); |
|
|
// context.pushNamed(widget.path); |
|
|
if(widget.path() != null){ |
|
|
|
|
|
|
|
|
if(widget.path() == 'MatchSpreadPage'){ |
|
|
|
|
|
|
|
|
|
|
|
} else if(widget.path() != null){ |
|
|
Get.to(widget.path)?.then((e){ |
|
|
Get.to(widget.path)?.then((e){ |
|
|
setState(() { |
|
|
setState(() { |
|
|
|
|
|
|
|
|
@ -402,7 +519,7 @@ class _BlockItemState extends State<BlockItem> { |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
SmartDialog.showToast('功能暂未开放'); |
|
|
|
|
|
|
|
|
SmartDialog.showToast('功能暂未开放'); |
|
|
} |
|
|
} |
|
|
// RouteGuardService.to.toWithAuth(widget.path, null); |
|
|
// RouteGuardService.to.toWithAuth(widget.path, null); |
|
|
}, |
|
|
}, |
|
|
|