11 changed files with 493 additions and 5 deletions
Split View
Diff Options
-
BINassets/images/feedback_bg.png
-
BINassets/images/feedback_icon.png
-
4lib/controller/mine/rose_history_controller.dart
-
2lib/generated/assets.dart
-
60lib/model/mine/user_prop_consume_data.dart
-
2lib/network/api_urls.dart
-
7lib/network/user_api.dart
-
41lib/network/user_api.g.dart
-
373lib/pages/mine/feedback_page.dart
-
4lib/pages/mine/rose_history_page.dart
-
5lib/pages/mine/user_help_center_page.dart
@ -0,0 +1,60 @@ |
|||
class UserPropConsumeData { |
|||
List<Records>? records; |
|||
int? total; |
|||
int? size; |
|||
int? current; |
|||
int? pages; |
|||
|
|||
UserPropConsumeData( |
|||
{this.records, this.total, this.size, this.current, this.pages}); |
|||
|
|||
UserPropConsumeData.fromJson(Map<String, dynamic> json) { |
|||
if (json['records'] != null) { |
|||
records = <Records>[]; |
|||
json['records'].forEach((v) { |
|||
records!.add(new Records.fromJson(v)); |
|||
}); |
|||
} |
|||
total = json['total']; |
|||
size = json['size']; |
|||
current = json['current']; |
|||
pages = json['pages']; |
|||
} |
|||
|
|||
Map<String, dynamic> toJson() { |
|||
final Map<String, dynamic> data = new Map<String, dynamic>(); |
|||
if (this.records != null) { |
|||
data['records'] = this.records!.map((v) => v.toJson()).toList(); |
|||
} |
|||
data['total'] = this.total; |
|||
data['size'] = this.size; |
|||
data['current'] = this.current; |
|||
data['pages'] = this.pages; |
|||
return data; |
|||
} |
|||
} |
|||
|
|||
class Records { |
|||
int? type; |
|||
int? num; |
|||
String? remark; |
|||
String? createTime; |
|||
|
|||
Records({this.type, this.num, this.remark, this.createTime}); |
|||
|
|||
Records.fromJson(Map<String, dynamic> json) { |
|||
type = json['type']; |
|||
num = json['num']; |
|||
remark = json['remark']; |
|||
createTime = json['createTime']; |
|||
} |
|||
|
|||
Map<String, dynamic> toJson() { |
|||
final Map<String, dynamic> data = new Map<String, dynamic>(); |
|||
data['type'] = this.type; |
|||
data['num'] = this.num; |
|||
data['remark'] = this.remark; |
|||
data['createTime'] = this.createTime; |
|||
return data; |
|||
} |
|||
} |
|||
@ -0,0 +1,373 @@ |
|||
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 FeedbackPage extends StatefulWidget { |
|||
const FeedbackPage({super.key}); |
|||
|
|||
@override |
|||
State<FeedbackPage> createState() => _FeedbackPageState(); |
|||
} |
|||
|
|||
class _FeedbackPageState extends State<FeedbackPage> { |
|||
|
|||
String message = ''; |
|||
final TextEditingController _messageController = TextEditingController(); |
|||
String phone = ''; |
|||
final TextEditingController _phoneController = TextEditingController(); |
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Stack( |
|||
children: [ |
|||
Container( |
|||
width: 375.w, |
|||
height: 812.h, |
|||
color: Colors.white, |
|||
), |
|||
Positioned( |
|||
top: -320.w, |
|||
left: -270.w, |
|||
child: Image.asset( |
|||
Assets.imagesFeedbackBg, |
|||
width: 971.75.w, |
|||
height: 781.25.w, |
|||
fit: BoxFit.cover, |
|||
), |
|||
), |
|||
Positioned( |
|||
top: 53.w, |
|||
left: 207.w, |
|||
child: Image.asset( |
|||
Assets.imagesFeedbackIcon, |
|||
width: 140.w, |
|||
height: 140.w, |
|||
), |
|||
), |
|||
Scaffold( |
|||
appBar: PageAppbar(title: "", backgroundColor: Colors.transparent,), |
|||
backgroundColor: Colors.transparent, |
|||
body: Column( |
|||
crossAxisAlignment: CrossAxisAlignment.start, |
|||
children: [ |
|||
Container( |
|||
padding: EdgeInsets.symmetric( |
|||
vertical: 22.w, |
|||
horizontal: 14.w |
|||
), |
|||
child: Column( |
|||
crossAxisAlignment: CrossAxisAlignment.start, |
|||
children: [ |
|||
Text( |
|||
"意见反馈", |
|||
style: TextStyle( |
|||
fontSize: 21.w, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
SizedBox(height: 5.w,), |
|||
Text( |
|||
"Hi,给出你的小建议吧~", |
|||
style: TextStyle( |
|||
fontSize: 13.w, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
], |
|||
), |
|||
), |
|||
Expanded( |
|||
child: Container( |
|||
width: 375.w, |
|||
padding: EdgeInsets.symmetric( |
|||
vertical: 11.w, |
|||
horizontal: 14.w |
|||
), |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.vertical(top: Radius.circular(9.w)), |
|||
color: Colors.white |
|||
), |
|||
child: SingleChildScrollView( |
|||
child: Column( |
|||
crossAxisAlignment: CrossAxisAlignment.start, |
|||
children: [ |
|||
RichText( |
|||
text: TextSpan( |
|||
style: TextStyle( |
|||
fontSize: 16.w, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
children: [ |
|||
TextSpan( |
|||
text: "选择问题的类型", |
|||
style: TextStyle( |
|||
color: const Color.fromRGBO(51, 51, 51, 1) |
|||
) |
|||
), |
|||
TextSpan( |
|||
text: "*", |
|||
style: TextStyle( |
|||
color: const Color.fromRGBO(248, 85, 66, 1) |
|||
) |
|||
) |
|||
] |
|||
), |
|||
), |
|||
SizedBox(height: 11.w,), |
|||
Wrap( |
|||
alignment: WrapAlignment.spaceBetween, |
|||
spacing: 10.w, |
|||
runSpacing: 10.w, |
|||
children: [ |
|||
TagItem(title: "举报投诉"), |
|||
TagItem(title: "账号与个人信息"), |
|||
TagItem(title: "现有功能建议"), |
|||
TagItem(title: "新功能或玩法建议"), |
|||
], |
|||
), |
|||
SizedBox(height: 20.w,), |
|||
RichText( |
|||
text: TextSpan( |
|||
style: TextStyle( |
|||
fontSize: 16.w, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
children: [ |
|||
TextSpan( |
|||
text: "问题描述", |
|||
style: TextStyle( |
|||
color: const Color.fromRGBO(51, 51, 51, 1) |
|||
) |
|||
), |
|||
TextSpan( |
|||
text: "*", |
|||
style: TextStyle( |
|||
color: const Color.fromRGBO(248, 85, 66, 1) |
|||
) |
|||
) |
|||
] |
|||
), |
|||
), |
|||
SizedBox(height: 11.w,), |
|||
Container( |
|||
padding: EdgeInsets.all(14.w), |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|||
color: const Color.fromRGBO(245, 245, 245, 1) |
|||
), |
|||
child: TextField( |
|||
controller: _messageController, |
|||
maxLength: 500, // 上限 |
|||
minLines: 5, // 多行 |
|||
maxLines: 5, // 自适应高度 |
|||
style: TextStyle( |
|||
fontSize: ScreenUtil().setWidth(13), |
|||
height: 1 |
|||
), |
|||
decoration: InputDecoration( |
|||
contentPadding: EdgeInsets.symmetric( |
|||
vertical: 0, |
|||
horizontal: 0 |
|||
), |
|||
hintText: "请输入交友心声", |
|||
|
|||
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){ |
|||
message = value; |
|||
}, |
|||
), |
|||
), |
|||
SizedBox(height: 10.w,), |
|||
Wrap( |
|||
alignment: WrapAlignment.spaceBetween, |
|||
spacing: 10.w, |
|||
runSpacing: 10.w, |
|||
children: [ |
|||
Container( |
|||
width: 70.w, |
|||
height: 70.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|||
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1)) |
|||
), |
|||
), |
|||
Container( |
|||
width: 70.w, |
|||
height: 70.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|||
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1)) |
|||
), |
|||
), |
|||
Container( |
|||
width: 70.w, |
|||
height: 70.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|||
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1)) |
|||
), |
|||
), |
|||
Container( |
|||
width: 70.w, |
|||
height: 70.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(9.w)), |
|||
border: Border.all(width: 1, color: const Color.fromRGBO(224, 224, 224, 1)) |
|||
), |
|||
), |
|||
], |
|||
), |
|||
SizedBox(height: 10.w,), |
|||
Text( |
|||
"上传问题截图可以让问题快速解决!", |
|||
style: TextStyle( |
|||
fontSize: 11.w, |
|||
color: const Color.fromRGBO(189, 189, 189, 1) |
|||
), |
|||
), |
|||
SizedBox(height: 20.w,), |
|||
RichText( |
|||
text: TextSpan( |
|||
style: TextStyle( |
|||
fontSize: 16.w, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
children: [ |
|||
TextSpan( |
|||
text: "联系方式", |
|||
style: TextStyle( |
|||
color: const Color.fromRGBO(51, 51, 51, 1) |
|||
) |
|||
), |
|||
] |
|||
), |
|||
), |
|||
Container( |
|||
padding: EdgeInsets.symmetric(horizontal: 13.w), |
|||
margin: EdgeInsets.only(top: 7.w), |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|||
color: const Color.fromRGBO(245, 245, 245, 1) |
|||
), |
|||
child: TextField( |
|||
controller: _phoneController, |
|||
keyboardType: TextInputType.number, |
|||
style: TextStyle( |
|||
fontSize: ScreenUtil().setWidth(14), |
|||
height: 1 |
|||
), |
|||
decoration: InputDecoration( |
|||
hintText: "留下手机号、QQ、邮箱,以便我们回复您", |
|||
contentPadding: EdgeInsets.symmetric( |
|||
vertical: 0, |
|||
horizontal: 0 |
|||
), |
|||
|
|||
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){ |
|||
phone = value; |
|||
setState(() { |
|||
|
|||
}); |
|||
}, |
|||
), |
|||
), |
|||
Container( |
|||
margin: EdgeInsets.symmetric(vertical: 30.w), |
|||
child: Container( |
|||
width: 350.w, |
|||
height: 45.w, |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(45.w)), |
|||
gradient: LinearGradient( |
|||
begin: Alignment.centerLeft, // 90deg: 从左到右 |
|||
end: Alignment.centerRight, |
|||
colors: [ |
|||
Color.fromRGBO(131, 89, 255, 1), // 起点颜色 |
|||
Color.fromRGBO(77, 127, 231, 1), // 中间颜色 |
|||
Color.fromRGBO(61, 138, 224, 1), // 终点颜色 |
|||
], |
|||
stops: [0.0, 0.7753, 1.0], // 对应 0%、77.53%、100% |
|||
), |
|||
), |
|||
child: Center( |
|||
child: Text( |
|||
"确认", |
|||
style: TextStyle( |
|||
fontSize: 18.w, |
|||
color: Colors.white, |
|||
fontWeight: FontWeight.w500 |
|||
), |
|||
), |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
), |
|||
), |
|||
) |
|||
], |
|||
), |
|||
) |
|||
], |
|||
); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
class TagItem extends StatefulWidget { |
|||
final String title; |
|||
const TagItem({super.key, required this.title}); |
|||
|
|||
@override |
|||
State<TagItem> createState() => _TagItemState(); |
|||
} |
|||
|
|||
class _TagItemState extends State<TagItem> { |
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return Container( |
|||
padding: EdgeInsets.symmetric( |
|||
vertical: 9.w, |
|||
horizontal: 14.w |
|||
), |
|||
decoration: BoxDecoration( |
|||
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|||
border: Border.all(width: 1, color: const Color.fromRGBO(207, 207, 207, 1)) |
|||
), |
|||
child: Text( |
|||
widget.title, |
|||
style: TextStyle( |
|||
fontSize: 13.w |
|||
), |
|||
), |
|||
); |
|||
} |
|||
} |
|||
|
|||
Write
Preview
Loading…
Cancel
Save