Browse Source

排版黑名单列表,排版设置页面,排版更新弹窗,排版帮助中心,排版帮助详情,对接用户数据修改部分展示的字段

ios
王子贤 4 months ago
parent
commit
956aefd88f
19 changed files with 26220 additions and 38 deletions
  1. BIN
      assets/images/cert_avatar.png
  2. BIN
      assets/images/cert_phone.png
  3. BIN
      assets/images/cert_realname.png
  4. BIN
      assets/images/help_bg.png
  5. BIN
      assets/images/phone_help.png
  6. BIN
      assets/images/realname_help.png
  7. BIN
      assets/images/updata_bg.png
  8. BIN
      assets/images/updata_font.png
  9. BIN
      assets/images/updata_icon.png
  10. 18
      lib/controller/mine/edit_info_controller.dart
  11. 8
      lib/controller/mine/mine_controller.dart
  12. 9
      lib/generated/assets.dart
  13. 25035
      lib/model/mine/address_data.dart
  14. 111
      lib/pages/mine/blacklist_page.dart
  15. 46
      lib/pages/mine/edit_info_page.dart
  16. 99
      lib/pages/mine/help_info_page.dart
  17. 72
      lib/pages/mine/mine_page.dart
  18. 410
      lib/pages/mine/setting_page.dart
  19. 450
      lib/pages/mine/user_help_center_page.dart

BIN
assets/images/cert_avatar.png

Before After
Width: 145  |  Height: 146  |  Size: 1.6 KiB

BIN
assets/images/cert_phone.png

Before After
Width: 110  |  Height: 156  |  Size: 3.9 KiB

BIN
assets/images/cert_realname.png

Before After
Width: 143  |  Height: 160  |  Size: 2.0 KiB

BIN
assets/images/help_bg.png

Before After
Width: 3887  |  Height: 3125  |  Size: 2.1 MiB

BIN
assets/images/phone_help.png

Before After
Width: 167  |  Height: 193  |  Size: 20 KiB

BIN
assets/images/realname_help.png

Before After
Width: 211  |  Height: 181  |  Size: 25 KiB

BIN
assets/images/updata_bg.png

Before After
Width: 1196  |  Height: 782  |  Size: 268 KiB

BIN
assets/images/updata_font.png

Before After
Width: 317  |  Height: 220  |  Size: 39 KiB

BIN
assets/images/updata_icon.png

Before After
Width: 146  |  Height: 146  |  Size: 21 KiB

18
lib/controller/mine/edit_info_controller.dart

@ -1,5 +1,6 @@
import 'package:dating_touchme_app/controller/global.dart'; import 'package:dating_touchme_app/controller/global.dart';
import 'package:dating_touchme_app/generated/assets.dart'; import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/model/mine/address_data.dart';
import 'package:dating_touchme_app/model/mine/education_data.dart'; import 'package:dating_touchme_app/model/mine/education_data.dart';
import 'package:dating_touchme_app/model/mine/occupation_data.dart'; import 'package:dating_touchme_app/model/mine/occupation_data.dart';
import 'package:dating_touchme_app/model/mine/user_data.dart'; import 'package:dating_touchme_app/model/mine/user_data.dart';
@ -10,6 +11,7 @@ import 'package:dating_touchme_app/pages/mine/rose_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get_storage/get_storage.dart';
class EditInfoController extends GetxController { class EditInfoController extends GetxController {
@ -48,6 +50,9 @@ class EditInfoController extends GetxController {
final occupationShowData = {}.obs; final occupationShowData = {}.obs;
final areaShowData = {}.obs;
@override @override
void onInit() { void onInit() {
super.onInit(); super.onInit();
@ -59,6 +64,7 @@ class EditInfoController extends GetxController {
getMaritalList(); getMaritalList();
getPropertyList(); getPropertyList();
getOccupationList(); getOccupationList();
getAreaShow();
} }
getEducationList() async { getEducationList() async {
@ -157,6 +163,16 @@ class EditInfoController extends GetxController {
} }
} }
getAreaShow() async {
for(int i = 0; i < address.length; i++){
areaShowData[address[i]["label"]] = {};
for(int j = 0; j < address[i]["children"].length; j++){
areaShowData[address[i]["label"]][address[i]["children"][j]["label"]] = address[i]["children"][j]["children"].map((e){
return e["label"];
}).toList();
}
}
print(areaShowData);
}
} }

8
lib/controller/mine/mine_controller.dart

@ -4,6 +4,8 @@ import 'package:dating_touchme_app/model/mine/user_data.dart';
import 'package:dating_touchme_app/pages/mine/auth_center_page.dart'; import 'package:dating_touchme_app/pages/mine/auth_center_page.dart';
import 'package:dating_touchme_app/pages/mine/my_wallet_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/rose_page.dart';
import 'package:dating_touchme_app/pages/mine/setting_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 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@ -25,9 +27,9 @@ class MineController extends GetxController {
].obs; ].obs;
List<Map> settingList = [ List<Map> settingList = [
{"icon": Assets.imagesSetting, "title": "设置"},
{"icon": Assets.imagesCustomer, "title": "联系客服"},
{"icon": Assets.imagesMail, "title": "意见反馈"},
{"icon": Assets.imagesSetting, "title": "设置", "path": () => SettingPage()},
{"icon": Assets.imagesCustomer, "title": "联系客服", "path": () => Null},
{"icon": Assets.imagesMail, "title": "意见反馈", "path": () => UserHelpCenterPage()},
].obs; ].obs;
final userData = GlobalData().userData.obs; final userData = GlobalData().userData.obs;

9
lib/generated/assets.dart

@ -82,6 +82,9 @@ class Assets {
static const String imagesBtnBgIcon = 'assets/images/btn_bg_icon.png'; static const String imagesBtnBgIcon = 'assets/images/btn_bg_icon.png';
static const String imagesCamera = 'assets/images/camera.png'; static const String imagesCamera = 'assets/images/camera.png';
static const String imagesCert = 'assets/images/cert.png'; static const String imagesCert = 'assets/images/cert.png';
static const String imagesCertAvatar = 'assets/images/cert_avatar.png';
static const String imagesCertPhone = 'assets/images/cert_phone.png';
static const String imagesCertRealname = 'assets/images/cert_realname.png';
static const String imagesChatBtn = 'assets/images/chat_btn.png'; static const String imagesChatBtn = 'assets/images/chat_btn.png';
static const String imagesCheck = 'assets/images/check.png'; static const String imagesCheck = 'assets/images/check.png';
static const String imagesCloseArrow = 'assets/images/close_arrow.png'; static const String imagesCloseArrow = 'assets/images/close_arrow.png';
@ -104,6 +107,7 @@ class Assets {
static const String imagesGift4 = 'assets/images/gift4.png'; static const String imagesGift4 = 'assets/images/gift4.png';
static const String imagesGift5 = 'assets/images/gift5.png'; static const String imagesGift5 = 'assets/images/gift5.png';
static const String imagesGiftIcon = 'assets/images/gift_icon.png'; static const String imagesGiftIcon = 'assets/images/gift_icon.png';
static const String imagesHelpBg = 'assets/images/help_bg.png';
static const String imagesHiIcon = 'assets/images/hi_icon.png'; static const String imagesHiIcon = 'assets/images/hi_icon.png';
static const String imagesHomeNol = 'assets/images/home_nol.png'; static const String imagesHomeNol = 'assets/images/home_nol.png';
static const String imagesHomePre = 'assets/images/home_pre.png'; static const String imagesHomePre = 'assets/images/home_pre.png';
@ -126,6 +130,7 @@ class Assets {
static const String imagesMoreIcon = 'assets/images/more_icon.png'; static const String imagesMoreIcon = 'assets/images/more_icon.png';
static const String imagesOnlineIcon = 'assets/images/online_icon.png'; static const String imagesOnlineIcon = 'assets/images/online_icon.png';
static const String imagesPhoneChecked = 'assets/images/phone_checked.png'; static const String imagesPhoneChecked = 'assets/images/phone_checked.png';
static const String imagesPhoneHelp = 'assets/images/phone_help.png';
static const String imagesPhoto = 'assets/images/photo.png'; static const String imagesPhoto = 'assets/images/photo.png';
static const String imagesPhotoChecked = 'assets/images/photo_checked.png'; static const String imagesPhotoChecked = 'assets/images/photo_checked.png';
static const String imagesPhotoUncheck = 'assets/images/photo_uncheck.png'; static const String imagesPhotoUncheck = 'assets/images/photo_uncheck.png';
@ -134,6 +139,7 @@ class Assets {
static const String imagesRealChecked = 'assets/images/real_checked.png'; static const String imagesRealChecked = 'assets/images/real_checked.png';
static const String imagesRealName = 'assets/images/real_name.png'; static const String imagesRealName = 'assets/images/real_name.png';
static const String imagesRealUncheck = 'assets/images/real_uncheck.png'; static const String imagesRealUncheck = 'assets/images/real_uncheck.png';
static const String imagesRealnameHelp = 'assets/images/realname_help.png';
static const String imagesRose = 'assets/images/rose.png'; static const String imagesRose = 'assets/images/rose.png';
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';
@ -147,6 +153,9 @@ class Assets {
static const String imagesSubscript = 'assets/images/subscript.png'; static const String imagesSubscript = 'assets/images/subscript.png';
static const String imagesTabChangeIcon = 'assets/images/tab_change_icon.png'; static const String imagesTabChangeIcon = 'assets/images/tab_change_icon.png';
static const String imagesTalkIcon = 'assets/images/talk_icon.png'; static const String imagesTalkIcon = 'assets/images/talk_icon.png';
static const String imagesUpdataBg = 'assets/images/updata_bg.png';
static const String imagesUpdataFont = 'assets/images/updata_font.png';
static const String imagesUpdataIcon = 'assets/images/updata_icon.png';
static const String imagesUserAvatar = 'assets/images/user_avatar.png'; static const String imagesUserAvatar = 'assets/images/user_avatar.png';
static const String imagesVerifiedIcon = 'assets/images/verified_icon.png'; static const String imagesVerifiedIcon = 'assets/images/verified_icon.png';
static const String imagesVideo = 'assets/images/video.png'; static const String imagesVideo = 'assets/images/video.png';

25035
lib/model/mine/address_data.dart
File diff suppressed because it is too large
View File

111
lib/pages/mine/blacklist_page.dart

@ -0,0 +1,111 @@
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 BlacklistPage extends StatefulWidget {
const BlacklistPage({super.key});
@override
State<BlacklistPage> createState() => _BlacklistPageState();
}
class _BlacklistPageState extends State<BlacklistPage> {
@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(
children: [
BlackItem(),
BlackItem(),
BlackItem(),
BlackItem(),
BlackItem(),
BlackItem(),
],
),
),
),
);
}
}
class BlackItem extends StatefulWidget {
const BlackItem({super.key});
@override
State<BlackItem> createState() => _BlackItemState();
}
class _BlackItemState extends State<BlackItem> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
bottom: 20.w
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(40.w)),
child: Image.asset(
Assets.imagesUserAvatar,
width: 40.w,
height: 40.w,
),
),
SizedBox(width: 12.w,),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"法大师傅",
style: TextStyle(
fontSize: 13.w,
fontWeight: FontWeight.w500
),
),
Text(
"拉黑时间:11月7日",
style: TextStyle(
fontSize: 11.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
)
],
)
],
),
Container(
width: 70.w,
height: 25.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(25.w)),
border: Border.all(width: 1, color: const Color.fromRGBO(51, 51, 51, 1))
),
child: Center(
child: Text(
"拆除",
style: TextStyle(
fontSize: 13.w,
fontWeight: FontWeight.w500
),
),
),
)
],
),
);
}
}

46
lib/pages/mine/edit_info_page.dart

@ -356,8 +356,50 @@ class _EditInfoPageState extends State<EditInfoPage> {
}, },
), ),
),), ),),
SetItem(label: "所在地", child: SizedBox(),),
SetItem(label: "家乡", child: SizedBox(),),
SetItem(label: "所在地", child: InkWell(
onTap: () {
TDPicker.showMultiLinkedPicker(context, title: '',
onConfirm: (selected) {
print(selected);
setState(() {
});
Navigator.of(context).pop();
},
data: controller.areaShowData,
columnNum: 3,
initialData:[]);
},
child: Text(
"请选择",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(191, 191, 191, 1)
),
),
),),
SetItem(label: "家乡", child: InkWell(
onTap: () {
TDPicker.showMultiLinkedPicker(context, title: '',
onConfirm: (selected) {
print(selected);
setState(() {
});
Navigator.of(context).pop();
},
data: controller.areaShowData,
columnNum: 3,
initialData:[]);
},
child: Text(
"请选择",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(191, 191, 191, 1)
),
),
),),
SetItem(label: "学历", child: InkWell( SetItem(label: "学历", child: InkWell(
onTap: () { onTap: () {
TDPicker.showMultiPicker(context, title: '', TDPicker.showMultiPicker(context, title: '',

99
lib/pages/mine/help_info_page.dart

@ -0,0 +1,99 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class HelpInfoPage extends StatefulWidget {
const HelpInfoPage({super.key});
@override
State<HelpInfoPage> createState() => _HelpInfoPageState();
}
class _HelpInfoPageState extends State<HelpInfoPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PageAppbar(title: "充值了会员为什么无法畅聊"),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(
vertical: 22.w,
horizontal: 15.w
),
child: Column(
children: [
Text(
""
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
width: 130.w,
height: 37.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
border: Border.all(
width: 1,
color: const Color.fromRGBO(144, 144, 144, 1)
)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.thumb_up_off_alt,
size: 22.w,
color: const Color.fromRGBO(144, 144, 144, 1),
),
SizedBox(width: 14.w,),
Text(
"有用",
style: TextStyle(
fontSize: 16.w,
color: const Color.fromRGBO(144, 144, 144, 1),
fontWeight: FontWeight.w500
),
)
],
),
),
Container(
width: 130.w,
height: 37.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
border: Border.all(
width: 1,
color: const Color.fromRGBO(144, 144, 144, 1)
)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.thumb_down_off_alt,
size: 22.w,
color: const Color.fromRGBO(144, 144, 144, 1),
),
SizedBox(width: 14.w,),
Text(
"没用",
style: TextStyle(
fontSize: 16.w,
color: const Color.fromRGBO(144, 144, 144, 1),
fontWeight: FontWeight.w500
),
)
],
),
),
],
)
],
),
),
),
);
}
}

72
lib/pages/mine/mine_page.dart

@ -198,7 +198,7 @@ class _MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin{
), ),
SizedBox(height: 12.w,), SizedBox(height: 12.w,),
...controller.settingList.map((e){ ...controller.settingList.map((e){
return SettingItem(item: e);
return SettingItem(item: e, path: e["path"],);
}), }),
], ],
), ),
@ -332,7 +332,8 @@ class _BlockItemState extends State<BlockItem> {
class SettingItem extends StatefulWidget { class SettingItem extends StatefulWidget {
final Map item; final Map item;
const SettingItem({super.key, required this.item});
final Function path;
const SettingItem({super.key, required this.item, required this.path});
@override @override
State<SettingItem> createState() => _SettingItemState(); State<SettingItem> createState() => _SettingItemState();
@ -341,37 +342,44 @@ class SettingItem extends StatefulWidget {
class _SettingItemState extends State<SettingItem> { class _SettingItemState extends State<SettingItem> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container(
height: 48.w,
padding: EdgeInsets.symmetric(horizontal: 16.w),
color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Image.asset(
widget.item["icon"],
width: 24.w,
height: 24.w,
),
SizedBox(width: 4.w,),
Text(
widget.item["title"],
style: TextStyle(
fontSize: 14.w,
fontWeight: FontWeight.w500,
color: Colors.black
return InkWell(
onTap: (){
// context.pushNamed(widget.path);
Get.to(widget.path);
// RouteGuardService.to.toWithAuth(widget.path, null);
},
child: Container(
height: 48.w,
padding: EdgeInsets.symmetric(horizontal: 16.w),
color: Colors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Image.asset(
widget.item["icon"],
width: 24.w,
height: 24.w,
), ),
)
],
),
Image.asset(
Assets.imagesArrow,
width: 4.w,
height: 8.w,
)
],
SizedBox(width: 4.w,),
Text(
widget.item["title"],
style: TextStyle(
fontSize: 14.w,
fontWeight: FontWeight.w500,
color: Colors.black
),
)
],
),
Image.asset(
Assets.imagesArrow,
width: 4.w,
height: 8.w,
)
],
),
), ),
); );
} }

410
lib/pages/mine/setting_page.dart

@ -0,0 +1,410 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:dating_touchme_app/extension/ex_widget.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/pages/mine/blacklist_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';
class SettingPage extends StatefulWidget {
const SettingPage({super.key});
@override
State<SettingPage> createState() => _SettingPageState();
}
class _SettingPageState extends State<SettingPage> {
bool blockUser = false;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color.fromRGBO(250, 250, 250, 1),
appBar: PageAppbar(title: "设置"),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(
vertical: 15.w,
horizontal: 10.w
),
child: Column(
children: [
BlockItem(
children: [
Item(
label: "后台播放",
child: TDSwitch(
isOn: blockUser,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
print(e);
blockUser = e;
setState(() {
});
return e;
},
),
),
LineItem(),
Item(
label: "语音/视频通话提示音",
child: TDSwitch(
isOn: blockUser,
trackOnColor: const Color.fromRGBO(117, 98, 249, 1),
onChanged: (bool e){
print(e);
blockUser = e;
setState(() {
});
return e;
},
),
),
],
),
BlockItem(
children: [
Item(
label: "安全中心",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
LineItem(),
Item(
label: "黑名单",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
).onTap((){
Get.to(() => BlacklistPage());
}),
],
),
BlockItem(
children: [
Item(
label: "隐私设置",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
LineItem(),
Item(
label: "青少年模式",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
],
),
BlockItem(
children: [
Item(
label: "系统权限管理",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
LineItem(),
Item(
label: "消息通知",
child: Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
),
),
LineItem(),
Item(
label: "检查更新",
child: Row(
children: [
Text(
"版本号 1.0.000",
style: TextStyle(
fontSize: 13.w,
color: const Color.fromRGBO(117, 98, 249, 1)
),
),
SizedBox(width: 10.w,),
Icon(
Icons.keyboard_arrow_right,
size: 10.w,
color: const Color.fromRGBO(191, 191, 191, 1),
)
],
),
).onTap((){
Navigator.of(context).push(TDSlidePopupRoute(
modalBarrierColor: TDTheme.of(context).fontGyColor2,
slideTransitionFrom: SlideTransitionFrom.center,
builder: (context) {
return Material(
color: Colors.transparent,
child: Container(
color: Colors.transparent,
width: 299.w,
padding: EdgeInsets.only(
top: 56.w
),
child: Stack(
clipBehavior: Clip.none,
children: [
Container(
width: 299.w,
padding: EdgeInsets.only(
top: 147.w,
left: 30.w,
right: 30.w,
bottom: 25.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(18.w)),
color: Colors.white
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
"体验全新升级v1.2.0",
style: TextStyle(
fontSize: 16.w,
fontWeight: FontWeight.w500
),
),
SizedBox(height: 14.w,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 2.w,
height: 5.w,
margin: EdgeInsets.only(
right: 10.w,
top: 6.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(2.w)),
color: const Color.fromRGBO(51, 51, 51, 1)
),
),
SizedBox(
width: 204.w,
child: Text(
"首页风格改版,更全面的内容,恍然一新的视觉用户体验。",
style: TextStyle(
fontSize: 12.w,
),
),
)
],
),
SizedBox(height: 8.w,),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 2.w,
height: 5.w,
margin: EdgeInsets.only(
right: 10.w,
top: 6.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(2.w)),
color: const Color.fromRGBO(51, 51, 51, 1)
),
),
SizedBox(
width: 204.w,
child: Text(
"优化了动画细节,让产品更流畅。",
style: TextStyle(
fontSize: 12.w,
),
),
)
],
),
SizedBox(height: 32.w,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 113.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(245, 245, 245, 1)
),
child: Center(
child: Text(
"暂不更新",
style: TextStyle(
fontSize: 15.w,
color: const Color.fromRGBO(144, 144, 144, 1)
),
),
),
),
Container(
width: 113.w,
height: 40.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(245, 245, 245, 1),
gradient: const LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight, // CSS 90deg
colors: [
Color.fromRGBO(131, 89, 255, 1), // rgba(131, 89, 255, 1)
Color.fromRGBO(61, 138, 224, 1), // rgba(61, 138, 224, 1)
],
),
),
child: Center(
child: Text(
"立即升级",
style: TextStyle(
fontSize: 15.w,
fontWeight: FontWeight.w500,
color: Colors.white
),
),
),
),
],
)
],
),
),
Positioned(
left: 0,
top: -56.w,
child: Image.asset(
Assets.imagesUpdataBg,
width: 299.w,
),
),
Positioned(
left: 11.w,
top: -14.w,
child: Image.asset(
Assets.imagesUpdataIcon,
width: 36.w,
),
),
Positioned(
left: 43.w,
top: 29.w,
child: Image.asset(
Assets.imagesUpdataFont,
width: 76.w,
),
)
],
),
),
);
}));
}),
],
),
],
),
),
),
);
}
}
class BlockItem extends StatefulWidget {
final List<Widget> children;
const BlockItem({super.key, required this.children});
@override
State<BlockItem> createState() => _BlockItemState();
}
class _BlockItemState extends State<BlockItem> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: 14.w
),
margin: EdgeInsets.only(
bottom: 10.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: Colors.white
),
child: Column(
children: widget.children,
),
);
}
}
class Item extends StatefulWidget {
final String label;
final Widget child;
const Item({super.key, required this.label, required this.child});
@override
State<Item> createState() => _ItemState();
}
class _ItemState extends State<Item> {
@override
Widget build(BuildContext context) {
return SizedBox(
height: 54.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
widget.label,
style: TextStyle(
fontSize: 13.w,
fontWeight: FontWeight.w500
),
),
widget.child
],
),
);
}
}
class LineItem extends StatelessWidget {
const LineItem({super.key});
@override
Widget build(BuildContext context) {
return Container(
width: 320.w,
height: 2.w,
color: const Color.fromRGBO(245, 245, 245, 1),
);
}
}

450
lib/pages/mine/user_help_center_page.dart

@ -0,0 +1,450 @@
import 'package:dating_touchme_app/components/page_appbar.dart';
import 'package:dating_touchme_app/extension/ex_widget.dart';
import 'package:dating_touchme_app/generated/assets.dart';
import 'package:dating_touchme_app/pages/mine/help_info_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
class UserHelpCenterPage extends StatefulWidget {
const UserHelpCenterPage({super.key});
@override
State<UserHelpCenterPage> createState() => _UserHelpCenterPageState();
}
class _UserHelpCenterPageState extends State<UserHelpCenterPage> {
String search = '';
final TextEditingController searchController = TextEditingController();
List<String> navList = [
"推荐", "投诉举报", "账号问题", "充值提现", "产品功能"
];
int actionNav = 0;
List<Map> serviceList = [
{"icon": Assets.imagesRealnameHelp, "label": "实名认证"},
{"icon": Assets.imagesPhoneHelp, "label": "手机绑定"},
];
List<String> questionList = [
"充值了会员为什么无法畅聊",
"私聊/语音/视频聊天收费标准是什么",
"如何交换联系方式",
"如何取消VIP自动续费",
"账号注销问题"
];
changeNav(int i){
actionNav = i;
setState(() {
});
}
@override
Widget build(BuildContext context) {
return Stack(
children: [
Positioned(
child: Container(
width: 375.w,
height: 821.h,
color: Colors.white,
),
),
Positioned(
left: -175.w,
top: -200.w,
child: Image.asset(
Assets.imagesHelpBg,
width: 750.w,
fit: BoxFit.cover,
),
),
Scaffold(
backgroundColor: Colors.transparent,
appBar: PageAppbar(title: "用户帮助中心", backgroundColor: Colors.transparent,),
body: SingleChildScrollView(
child: Column(
children: [
Container(
padding: EdgeInsets.only(
left: 11.w,
right: 20.w
),
margin: EdgeInsets.only(
bottom: 10.w
),
child: Container(
height: 45.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: Colors.white
),
child: TextField(
controller: searchController,
keyboardType: TextInputType.number,
style: TextStyle(
fontSize: ScreenUtil().setWidth(13),
height: 1
),
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(
vertical: 0,
horizontal: 0.w
),
prefixIcon: Icon(
Icons.search,
size: 18.w,
color: const Color.fromRGBO(51, 51, 51, 1),
),
hintText: "请输入要查询的内容",
hintStyle: TextStyle(
color: const Color.fromRGBO(191, 191, 191, 1)
),
border: const OutlineInputBorder(
borderSide: BorderSide.none, // //
),
// focusedBorder enabledBorder
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(8.0)),
),
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(8.0)),
),
),
onChanged: (value){
search = value;
setState(() {
});
},
),
),
),
Container(
padding: EdgeInsets.only(
left: 11.w,
right: 17.w
),
margin: EdgeInsets.only(
bottom: 9.w
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
...navList.asMap().entries.map((entry){
return NavItem(index: entry.key, action: actionNav, label: entry.value, cb: changeNav);
}),
],
),
),
Container(
padding: EdgeInsets.symmetric(
vertical: 15.w,
horizontal: 10.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.vertical(
top: Radius.circular(9.w)
)
),
child: Column(
children: [
Row(
children: [
Text(
"自助服务",
style: TextStyle(
fontSize: 16.w,
fontWeight: FontWeight.w500
),
)
],
),
Container(
padding: EdgeInsets.symmetric(
horizontal: 15.w
),
margin: EdgeInsets.only(
top: 17.w,
bottom: 30.w
),
child: Row(
children: [
...serviceList.map((e){
return ServiceItem(icon: e["icon"], label: e["label"]);
})
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"常见问题",
style: TextStyle(
fontSize: 16.w,
fontWeight: FontWeight.w500
),
),
Row(
children: [
Text(
"查看更多",
style: TextStyle(
fontSize: 11.w,
color: const Color.fromRGBO(144, 144, 144, 1),
fontWeight: FontWeight.w500
),
),
SizedBox(width: 10.w,),
Icon(
Icons.keyboard_arrow_right,
size: 20.w,
color: const Color.fromRGBO(191, 191, 191, 1),
)
],
)
],
),
SizedBox(
height: 16.w,
),
Container(
padding: EdgeInsets.only(
top: 20.w,
right: 10.w,
left: 17.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(9.w)),
color: const Color.fromRGBO(250, 250, 250, 1)
),
child: Column(
children: [
...questionList.asMap().entries.map((entry){
return QuestionItem(index: entry.key, label: entry.value).onTap((){
Get.to(() => HelpInfoPage());
});
}),
],
),
),
],
),
),
Container(
height: 40.w,
padding: EdgeInsets.symmetric(
vertical: 10.w
),
child: Row(
children: [
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
Assets.imagesEdit,
width: 15.w,
),
SizedBox(width: 9.w,),
Text(
"意见反馈",
style: TextStyle(
fontSize: 16.w,
fontWeight: FontWeight.w500
),
)
],
),
),
Container(
width: 1,
height: 20.w,
color: const Color.fromRGBO(230, 230, 230, 1),
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
Assets.imagesCustomer,
width: 15.w,
),
SizedBox(width: 9.w,),
Text(
"联系客服",
style: TextStyle(
fontSize: 16.w,
fontWeight: FontWeight.w500
),
)
],
),
),
],
),
)
],
),
),
)
],
);
}
}
class NavItem extends StatefulWidget {
final int index;
final int action;
final String label;
final void Function(int) cb;
const NavItem({super.key,
required this.index,
required this.action,
required this.label,
required this.cb,
});
@override
State<NavItem> createState() => _NavItemState();
}
class _NavItemState extends State<NavItem> {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(
vertical: 2.w,
horizontal: 10.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4.w)),
color: widget.index == widget.action ? Colors.white : const Color.fromRGBO(245, 245, 245, 1)
),
child: Center(
child: Text(
widget.label,
style: TextStyle(
fontSize: 13.w,
color: widget.index == widget.action ? const Color.fromRGBO(51, 51, 51, 1) : const Color.fromRGBO(144, 144, 144, 1),
fontWeight: widget.index == widget.action ? FontWeight.w500 : FontWeight.w400
),
),
),
).onTap((){
widget.cb(widget.index);
});
}
}
class ServiceItem extends StatefulWidget {
final String icon;
final String label;
const ServiceItem({super.key, required this.icon, required this.label});
@override
State<ServiceItem> createState() => _ServiceItemState();
}
class _ServiceItemState extends State<ServiceItem> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
right: 22.w
),
child: Column(
children: [
Container(
width: 64.w,
height: 64.w,
margin: EdgeInsets.only(bottom: 5.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(64.w)),
color: const Color.fromRGBO(245, 245, 245, 1)
),
child: Center(
child: Image.asset(
widget.icon,
width: 44.w,
),
),
),
Text(
widget.label,
style: TextStyle(
fontSize: 13.w,
fontWeight: FontWeight.w500
),
)
],
),
);
}
}
class QuestionItem extends StatefulWidget {
final int index;
final String label;
const QuestionItem({super.key, required this.index, required this.label});
@override
State<QuestionItem> createState() => _QuestionItemState();
}
class _QuestionItemState extends State<QuestionItem> {
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
bottom: 20.w
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 13.w,
fontWeight: FontWeight.w500
),
children: [
TextSpan(
text: "${widget.index + 1}. ",
style: TextStyle(
color: const Color.fromRGBO(248, 85, 66, 1)
)
),
TextSpan(
text: "${widget.label}",
style: TextStyle(
color: const Color.fromRGBO(51, 51, 51, 1)
)
),
]
),
),
Icon(
Icons.play_arrow,
size: 15.w,
color: const Color.fromRGBO(204, 204, 204, 1),
)
],
),
);
}
}
Loading…
Cancel
Save