19 changed files with 26220 additions and 38 deletions
Unified View
Diff Options
-
BINassets/images/cert_avatar.png
-
BINassets/images/cert_phone.png
-
BINassets/images/cert_realname.png
-
BINassets/images/help_bg.png
-
BINassets/images/phone_help.png
-
BINassets/images/realname_help.png
-
BINassets/images/updata_bg.png
-
BINassets/images/updata_font.png
-
BINassets/images/updata_icon.png
-
18lib/controller/mine/edit_info_controller.dart
-
8lib/controller/mine/mine_controller.dart
-
9lib/generated/assets.dart
-
25035lib/model/mine/address_data.dart
-
111lib/pages/mine/blacklist_page.dart
-
46lib/pages/mine/edit_info_page.dart
-
99lib/pages/mine/help_info_page.dart
-
72lib/pages/mine/mine_page.dart
-
410lib/pages/mine/setting_page.dart
-
450lib/pages/mine/user_help_center_page.dart
25035
lib/model/mine/address_data.dart
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -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 |
||||
|
), |
||||
|
), |
||||
|
), |
||||
|
) |
||||
|
], |
||||
|
), |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
@ -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 |
||||
|
), |
||||
|
) |
||||
|
], |
||||
|
), |
||||
|
), |
||||
|
], |
||||
|
) |
||||
|
], |
||||
|
), |
||||
|
), |
||||
|
), |
||||
|
); |
||||
|
} |
||||
|
} |
||||
@ -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), |
||||
|
); |
||||
|
} |
||||
|
} |
||||
@ -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), |
||||
|
) |
||||
|
], |
||||
|
), |
||||
|
); |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save