Merge branch 'zhang'

hmxc
张萌 4 years ago
commit c3a50534b6

@ -6,6 +6,8 @@ import 'package:akuCommunity/pages/manager_func.dart';
import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_siglecheck.dart';
import 'package:akuCommunity/ui/manager/questionnaire/questionnaire_truefalse.dart';
import 'package:akuCommunity/ui/manager/questionnaire/questionnarie_raido_check.dart';
import 'package:akuCommunity/ui/manager/questionnaire/submit_complish_page.dart';
import 'package:akuCommunity/utils/network/base_model.dart';
import 'package:akuCommunity/widget/bee_divider.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:akuCommunity/widget/buttons/bottom_button.dart';
@ -248,7 +250,12 @@ class _QuestionnaireDetailPageState extends State<QuestionnaireDetailPage> {
bottomNavi: BottomButton(
child: '确认提交'.text.black.size(32.sp).bold.make(),
onPressed: () async {
await ManagerFunc.questionnaireSubmit(widget.id, _submitModels);
BaseModel baseModel =
await ManagerFunc.questionnaireSubmit(widget.id, _submitModels);
SubmitComplishPage(
status: baseModel.status,
message: baseModel.message,
).to();
},
),
);

@ -0,0 +1,66 @@
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
class SubmitComplishPage extends StatelessWidget {
final bool status;
final String message;
const SubmitComplishPage({Key key, this.status, this.message})
: super(key: key);
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '提交结果',
body: Center(
child: Column(
children: [
76.w.heightBox,
Container(
alignment: Alignment.center,
width: 110.w,
height: 110.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(55.w),
color: this.status ? kPrimaryColor : kDangerColor,
),
child: Icon(
this.status ? CupertinoIcons.checkmark : CupertinoIcons.multiply,
size: 100.w,
),
),
48.w.heightBox,
(this.status ? '提交成功' : '提交失败').text.size(36.sp).black.bold.make(),
16.w.heightBox,
(this.status ? '您的建议我们已经收到,感谢填写' : this.message)
.text
.color(ktextSubColor)
.size(26.sp)
.make(),
96.w.heightBox,
MaterialButton(
elevation: 0,
minWidth: 702.w,
height: 98.w,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w)),
onPressed: () {
Get.back();
},
child: (this.status ? '返回' : '重新提交')
.text
.color(ktextPrimary)
.size(36.sp)
.make(),
),
],
),
),
);
}
}
Loading…
Cancel
Save