You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
8.6 KiB

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
4 years ago
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
4 years ago
import 'package:flutter_screenutil/flutter_screenutil.dart';
class HelpFeedbackPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _HelpFeedbackPage();
}
}
4 years ago
class _HelpFeedbackPage extends State<HelpFeedbackPage> {
var _isExpanded = [false, false, false];
@override
Widget build(BuildContext context) {
return Scaffold(
4 years ago
appBar: MyAppBar(
title: S.of(context).bangzhuyufankui,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,
),
4 years ago
body: Container(
decoration: new BoxDecoration(
4 years ago
border: Border(
bottom: BorderSide(
color: Color(0xffF7F7F7),
),
),
color: Color(0xffF7F7F7),
),
4 years ago
child: Column(
children: [
4 years ago
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
4 years ago
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
SizedBox(
height: 24.h,
),
Container(
margin: EdgeInsets.only(left: 16.w),
child: Text(
S.of(context).fankui,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Color(0xFF353535),
fontSize: 16.sp,
4 years ago
),
4 years ago
),
),
_feedback(),
Container(
margin: EdgeInsets.only(left: 16.w),
child: Text(
S.of(context).lianxishoujihao,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Color(0xFF353535),
fontSize: 16.sp,
),
4 years ago
),
),
_contactPhoneNumber(),
Container(
margin: EdgeInsets.only(left: 16.w, bottom: 20.h),
child: Text(
S.of(context).changjianwenti,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Color(0xFF353535),
fontSize: 16.sp,
4 years ago
),
4 years ago
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 16.w),
padding: EdgeInsets.all(16.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Column(
children: [
_commonProblem('如何领取优惠券?',
"点击我的,进入我页面后,点击下方的领劵中心,进入后即可领取优惠券哦~", 0),
_commonProblem(
'如何兑换积分?',
"点击净弼,进入积分商城,点击你想兑换的领商品,进入商品详情后点击下方兑换,即可兑换哦~",
1),
_commonProblem(
'如何签到?',
"1.点击净弼,进入首页,点击上方的去签到。\n2.点击我的,进入我的页面,点击上方的积分详情,进入后即可签到。",
2),
],
),
),
4 years ago
SizedBox(
height: 20.h,
),
],
),
),
4 years ago
flex: 1,
),
4 years ago
Container(
4 years ago
height: 54.h,
4 years ago
alignment: Alignment.center,
color: Color(0xFF32A060),
child: RoundButton(
text: S.of(context).tijiao,
backgroup: Color(0xFF32A060),
textColor: Colors.white,
4 years ago
fontSize: 16.sp,
4 years ago
fontWeight: FontWeight.bold,
),
4 years ago
),
],
),
4 years ago
),
);
}
4 years ago
_feedback() {
return Container(
width: double.infinity,
4 years ago
height: 186.h,
4 years ago
margin: EdgeInsets.all(16.w),
decoration: new BoxDecoration(
4 years ago
color: Color(0xffffffff),
borderRadius: BorderRadius.circular(4.0),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Column(
children: [
Container(
4 years ago
margin: EdgeInsets.fromLTRB(20.w, 5.h, 20.w, 0),
alignment: Alignment.topLeft,
child: TextField(
maxLines: 5,
decoration: InputDecoration(
border: InputBorder.none,
4 years ago
hintText: "您可以在这里输入反馈内容,例如产品建议,功能异常等",
hintStyle: TextStyle(
fontSize: 14.sp,
color: Color(0xffA29E9E),
),
),
),
),
Container(
alignment: Alignment.bottomRight,
4 years ago
padding: EdgeInsets.only(right: 20.w),
4 years ago
child: Text(
"0/50",
style: TextStyle(
fontSize: 14.sp,
color: Color(0xffA29E9E),
),
),
),
],
),
);
}
4 years ago
_contactPhoneNumber() {
return Container(
width: double.infinity,
4 years ago
margin: EdgeInsets.all(16.w),
decoration: new BoxDecoration(
4 years ago
color: Color(0xffffffff),
borderRadius: BorderRadius.circular(4.0),
boxShadow: [
BoxShadow(
4 years ago
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
4 years ago
],
),
child: Column(
children: [
Container(
4 years ago
margin: EdgeInsets.fromLTRB(20.w, 0, 20.w, 0),
alignment: Alignment.topLeft,
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: "请输入您的有效手机号",
4 years ago
hintStyle: TextStyle(
4 years ago
fontSize: 14.sp,
4 years ago
color: Color(0xffA29E9E),
),
),
),
),
],
),
);
}
4 years ago
_commonProblem(var title, var cnt, var index) {
return Container(
alignment: Alignment.center,
child: Column(
children: <Widget>[
ExpansionPanelList(
4 years ago
elevation: 0,
children: <ExpansionPanel>[
ExpansionPanel(
4 years ago
headerBuilder: (context, isExpanded) {
return ListTile(
title: Text(title),
);
},
body: Padding(
4 years ago
padding: EdgeInsets.fromLTRB(15.w, 0, 8.w, 8.h),
child: Text(
cnt,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xff8B8B8B),
),
),
),
isExpanded: _isExpanded[index],
canTapOnHeader: true,
),
],
4 years ago
expansionCallback: (panelIndex, isExpanded) {
setState(() {
_isExpanded[index] = !isExpanded;
});
},
4 years ago
animationDuration: kThemeAnimationDuration,
),
],
),
);
}
4 years ago
}