master
张萌 3 years ago
parent 9a118e2aa0
commit 1b62948817

@ -9,6 +9,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import '../task_func.dart';
class HallCard extends StatelessWidget {
final HallListModel model;
final VoidCallback refresh;
@ -109,7 +111,14 @@ class HallCard extends StatelessWidget {
Row(
children: [
Spacer(),
CardBottomButton.yellow(text: '领取任务', onPressed: () {}),
CardBottomButton.yellow(
text: '领取任务',
onPressed: () async {
var re = await TaskFunc.take(taskId: model.id);
if (re) {
refresh();
}
}),
],
),
],
@ -128,8 +137,22 @@ class HallCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
40.w.heightBox,
CardBottomButton.white(text: '取消订单', onPressed: () {}),
CardBottomButton.yellow(text: '确认完成', onPressed: () {}),
CardBottomButton.white(
text: '取消订单',
onPressed: () async {
var re = await TaskFunc.cancel(taskId: model.id);
if (re) {
refresh();
}
}),
CardBottomButton.yellow(
text: '确认完成',
onPressed: () async {
var re = await TaskFunc.finish(taskId: model.id);
if (re) {
refresh();
}
}),
],
);
case 4:

@ -69,22 +69,28 @@ class _HallDetailPageState extends State<HallDetailPage> {
),
),
Spacer(),
Padding(
padding: EdgeInsets.only(right: 32.w),
child: MaterialButton(
color: Colors.white,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w),
),
onPressed: () {},
child: '取消订单'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
),
)
// Padding(
// padding: EdgeInsets.only(right: 32.w),
// child: MaterialButton(
// color: Colors.white,
// elevation: 0,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(8.w),
// ),
// onPressed: () async {
// var re = await TaskFunc.cancel(
// taskId: widget.model.id);
// if (re) {
// Get.back();
// }
// },
// child: '取消订单'
// .text
// .size(24.sp)
// .color(Colors.black.withOpacity(0.65))
// .make(),
// ),
// )
],
),
],

@ -1,15 +1,20 @@
import 'package:aku_new_community/extensions/widget_list_ext.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/task/hall_list_model.dart';
import 'package:aku_new_community/models/task/my_take_task_list_model.dart';
import 'package:aku_new_community/ui/service/my_take_task/my_take_task_detail_page.dart';
import 'package:aku_new_community/ui/service/task_map.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/buttons/card_bottom_button.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import '../task_func.dart';
class MyTakeTaskCard extends StatelessWidget {
final HallListModel model;
final MyTakeTaskListModel model;
final VoidCallback refresh;
const MyTakeTaskCard({Key? key, required this.model, required this.refresh})
@ -17,116 +22,121 @@ class MyTakeTaskCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: Color(0xFFFFF7E6),
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
children: [
Row(
children: [
'接单时间 ${DateUtil.formatDateStr(model.createDate)}'
.text
.size(26.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
'${TaskMap.statusToString[model.status]}'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.bold
.make()
],
),
20.w.heightBox,
BeeDivider.horizontal(),
34.w.heightBox,
Row(
children: [
Assets.icons.clockCircle.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${DateUtil.formatDateStr(model.appointmentDate)}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
20.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${model.appointmentAddress}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
34.w.heightBox,
Container(
width: 638.w,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.03),
borderRadius: BorderRadius.circular(8.w)),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
return GestureDetector(
onTap: () {
Get.to(() => MyTakeTaskDetailPage(model: model));
},
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
children: [
Row(
children: [
'#${TaskMap.typeToString[model.type]}'
'接单时间 ${DateUtil.formatDateStr(model.createDate)}'
.text
.size(26.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
'${TaskMap.statusToString[model.status]}'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.bold
.make()
],
),
20.w.heightBox,
BeeDivider.horizontal(),
34.w.heightBox,
Row(
children: [
Assets.icons.clockCircle.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${DateUtil.formatDateStr(model.appointmentDate)}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
16.w.heightBox,
model.content.text
.size(28.sp)
],
),
20.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${model.appointmentAddress}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
),
40.w.heightBox,
Row(
children: [
Spacer(),
RichText(
text: TextSpan(
text: '实付 ',
children: model.rewardType == 2
? [
WidgetSpan(
child: Assets.icons.intergral
.image(width: 24.w, height: 24.w),
),
model.reward
.toString()
.textSpan
.size(32.sp)
.color(Colors.red)
.make(),
]
: [
'¥ ${model.reward}'
.toString()
.textSpan
.size(32.sp)
.color(Colors.red)
.make(),
],
style: TextStyle(
color: Colors.black.withOpacity(0.65), fontSize: 24.sp),
),
)
],
),
_cardBottom(model.status),
],
34.w.heightBox,
Container(
width: 638.w,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.03),
borderRadius: BorderRadius.circular(8.w)),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'#${TaskMap.typeToString[model.type]}'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.make(),
16.w.heightBox,
model.content.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
),
40.w.heightBox,
Row(
children: [
Spacer(),
RichText(
text: TextSpan(
text: '实付 ',
children: model.rewardType == 2
? [
WidgetSpan(
child: Assets.icons.intergral
.image(width: 24.w, height: 24.w),
),
model.reward
.toString()
.textSpan
.size(32.sp)
.color(Colors.red)
.make(),
]
: [
'¥ ${model.reward}'
.toString()
.textSpan
.size(32.sp)
.color(Colors.red)
.make(),
],
style: TextStyle(
color: Colors.black.withOpacity(0.65), fontSize: 24.sp),
),
)
],
),
_cardBottom(model.status),
],
),
),
);
}
@ -139,10 +149,25 @@ class MyTakeTaskCard extends StatelessWidget {
children: [
40.w.heightBox,
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
CardBottomButton.white(text: '取消订单', onPressed: () {}),
CardBottomButton.yellow(text: '确认完成', onPressed: () {}),
],
// CardBottomButton.white(
// text: '取消订单',
// onPressed: () async {
// var re = await TaskFunc.cancel(taskId: model.id);
// if (re) {
// refresh();
// }
// }),
CardBottomButton.yellow(
text: '确认完成',
onPressed: () async {
var re = await TaskFunc.finish(taskId: model.id);
if (re) {
refresh();
}
}),
].sepWidget(separate: 10.w.widthBox),
)
],
);

@ -0,0 +1,268 @@
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/task/my_take_task_list_model.dart';
import 'package:aku_new_community/ui/service/task_map.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class MyTakeTaskDetailPage extends StatefulWidget {
final MyTakeTaskListModel model;
const MyTakeTaskDetailPage({Key? key, required this.model}) : super(key: key);
@override
_MyTakeTaskDetailPageState createState() => _MyTakeTaskDetailPageState();
}
class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
extendBody: true,
title: '',
body: Stack(
children: [
Column(
children: [
Container(
width: double.infinity,
height: 380.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: widget.model.status == 4
? [
Colors.white,
Color(0xFFADACAC),
]
: [
Color(0xFFFFB737),
Color(0xFFFFD361),
]),
),
child: Column(
children: [
150.w.heightBox,
Row(
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'${TaskMap.detailStatusToString[widget.model.status]}'
.text
.size(40.sp)
.color(Colors.black)
.bold
.make(),
'${TaskMap.subStatus[widget.model.status]}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
),
Spacer(),
// Padding(
// padding: EdgeInsets.only(right: 32.w),
// child: MaterialButton(
// color: Colors.white,
// elevation: 0,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(8.w),
// ),
// onPressed: () async {
// var re = await TaskFunc.cancel(
// taskId: widget.model.id);
// if (re) {
// Get.back();
// }
// },
// child: '取消订单'
// .text
// .size(24.sp)
// .color(Colors.black.withOpacity(0.65))
// .make(),
// ),
// )
],
),
],
),
),
Flexible(
child: Container(
width: double.infinity,
color: Color(0xFFE5E5E5),
),
),
],
),
Positioned(
top: 280.w,
left: 32.w,
right: 32.w,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_content(),
24.w.heightBox,
_taskInfo(),
],
)),
],
),
);
}
Widget _taskInfo() {
return Container(
width: 686.w,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
children: [
Row(
children: [
'任务信息'.text.size(28.sp).color(Colors.black).bold.make(),
Spacer(),
],
),
24.w.heightBox,
BeeDivider.horizontal(),
24.w.heightBox,
Row(
children: [
'创建时间'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
'${DateUtil.formatDateStr(widget.model.createDate)}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make()
],
),
],
),
);
}
Widget _content() {
var head = Row(
children: [
Container(
width: 100.w,
height: 50.w,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFFFFF7E6),
borderRadius: BorderRadius.circular(8.w),
),
child: '#${TaskMap.typeToString[widget.model.type]}'
.text
.size(28.sp)
.color(Color(0xFFFA8C16))
.make(),
),
Spacer(),
Assets.icons.intergral.image(width: 24.w, height: 24.w),
8.w.widthBox,
'${widget.model.reward}'.text.size(32.sp).color(Colors.red).make()
],
);
return Container(
width: 686.w,
height: 500.w,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
children: [
head,
34.w.heightBox,
Row(
children: [
Assets.icons.clockCircle.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${DateUtil.formatDateStr(widget.model.appointmentDate)}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
20.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${widget.model.appointmentAddress}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
34.w.heightBox,
Container(
width: 638.w,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.03),
borderRadius: BorderRadius.circular(8.w)),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'#${TaskMap.typeToString[widget.model.type]}'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.make(),
16.w.heightBox,
widget.model.content.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
),
32.w.heightBox,
BeeDivider.horizontal(),
32.w.heightBox,
Row(
children: [
Assets.icons.reward.image(width: 36.w, height: 36.w),
24.w.widthBox,
'报酬'
.text
.size(26.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
'¥${widget.model.reward}'
.text
.size(32.sp)
.color(Colors.red)
.make(),
],
),
],
),
);
}
}

@ -1,12 +1,16 @@
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/task/my_task_list_model.dart';
import 'package:aku_new_community/ui/service/my_task/my_task_detail_page.dart';
import 'package:aku_new_community/ui/service/task_map.dart';
import 'package:aku_new_community/widget/buttons/card_bottom_button.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import '../task_func.dart';
class MyTaskCard extends StatelessWidget {
final MyTaskListModel model;
final VoidCallback refresh;
@ -41,110 +45,122 @@ class MyTaskCard extends StatelessWidget {
.make()
],
);
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
children: [
head,
34.w.heightBox,
Row(
children: [
Assets.icons.clockCircle.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${DateUtil.formatDateStr(model.appointmentDate)}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
20.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${model.appointmentAddress}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
34.w.heightBox,
Container(
width: 638.w,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.03),
borderRadius: BorderRadius.circular(8.w)),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
return GestureDetector(
onTap: () {
Get.to(() => MyTaskDetailPage(model: model));
},
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
children: [
head,
34.w.heightBox,
Row(
children: [
'#${TaskMap.typeToString[model.type]}'
Assets.icons.clockCircle.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${DateUtil.formatDateStr(model.appointmentDate)}'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
16.w.heightBox,
model.content.text
.size(28.sp)
],
),
20.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${model.appointmentAddress}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
),
40.w.heightBox,
Row(
children: [
Spacer(),
RichText(
text: TextSpan(
text: '实付 ',
children: model.rewardType == 2
? [
WidgetSpan(
child: Assets.icons.intergral
.image(width: 24.w, height: 24.w),
),
model.reward
.toString()
.textSpan
.size(32.sp)
.color(Colors.red)
.make(),
]
: [
'¥ ${model.reward}'
.toString()
.textSpan
.size(32.sp)
.color(Colors.red)
.make(),
],
style: TextStyle(
color: Colors.black.withOpacity(0.65), fontSize: 24.sp),
),
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
40.w.heightBox,
Row(
34.w.heightBox,
Container(
width: 638.w,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.03),
borderRadius: BorderRadius.circular(8.w)),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Spacer(),
CardBottomButton.yellow(text: '取消订单', onPressed: () {}),
'#${TaskMap.typeToString[model.type]}'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.make(),
16.w.heightBox,
model.content.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
],
),
],
),
40.w.heightBox,
Row(
children: [
Spacer(),
RichText(
text: TextSpan(
text: '实付 ',
children: model.rewardType == 2
? [
WidgetSpan(
child: Assets.icons.intergral
.image(width: 24.w, height: 24.w),
),
model.reward
.toString()
.textSpan
.size(32.sp)
.color(Colors.red)
.make(),
]
: [
'¥ ${model.reward}'
.toString()
.textSpan
.size(32.sp)
.color(Colors.red)
.make(),
],
style: TextStyle(
color: Colors.black.withOpacity(0.65), fontSize: 24.sp),
),
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
40.w.heightBox,
Row(
children: [
Spacer(),
CardBottomButton.yellow(
text: '取消订单',
onPressed: () async {
var re = await TaskFunc.cancel(taskId: model.id);
if (re) {
refresh();
}
}),
],
),
],
),
],
),
),
);
}

@ -0,0 +1,268 @@
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/task/my_task_list_model.dart';
import 'package:aku_new_community/ui/service/task_map.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class MyTaskDetailPage extends StatefulWidget {
final MyTaskListModel model;
const MyTaskDetailPage({Key? key, required this.model}) : super(key: key);
@override
_MyTaskDetailPageState createState() => _MyTaskDetailPageState();
}
class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
extendBody: true,
title: '',
body: Stack(
children: [
Column(
children: [
Container(
width: double.infinity,
height: 380.w,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: widget.model.status == 4
? [
Colors.white,
Color(0xFFADACAC),
]
: [
Color(0xFFFFB737),
Color(0xFFFFD361),
]),
),
child: Column(
children: [
150.w.heightBox,
Row(
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 32.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'${TaskMap.detailStatusToString[widget.model.status]}'
.text
.size(40.sp)
.color(Colors.black)
.bold
.make(),
'${TaskMap.subStatus[widget.model.status]}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
),
Spacer(),
// Padding(
// padding: EdgeInsets.only(right: 32.w),
// child: MaterialButton(
// color: Colors.white,
// elevation: 0,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(8.w),
// ),
// onPressed: () async {
// var re = await TaskFunc.cancel(
// taskId: widget.model.id);
// if (re) {
// Get.back();
// }
// },
// child: '取消订单'
// .text
// .size(24.sp)
// .color(Colors.black.withOpacity(0.65))
// .make(),
// ),
// )
],
),
],
),
),
Flexible(
child: Container(
width: double.infinity,
color: Color(0xFFE5E5E5),
),
),
],
),
Positioned(
top: 280.w,
left: 32.w,
right: 32.w,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_content(),
24.w.heightBox,
_taskInfo(),
],
)),
],
),
);
}
Widget _taskInfo() {
return Container(
width: 686.w,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
children: [
Row(
children: [
'任务信息'.text.size(28.sp).color(Colors.black).bold.make(),
Spacer(),
],
),
24.w.heightBox,
BeeDivider.horizontal(),
24.w.heightBox,
Row(
children: [
'创建时间'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
'${DateUtil.formatDateStr(widget.model.createDate)}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make()
],
),
],
),
);
}
Widget _content() {
var head = Row(
children: [
Container(
width: 100.w,
height: 50.w,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFFFFF7E6),
borderRadius: BorderRadius.circular(8.w),
),
child: '#${TaskMap.typeToString[widget.model.type]}'
.text
.size(28.sp)
.color(Color(0xFFFA8C16))
.make(),
),
Spacer(),
Assets.icons.intergral.image(width: 24.w, height: 24.w),
8.w.widthBox,
'${widget.model.reward}'.text.size(32.sp).color(Colors.red).make()
],
);
return Container(
width: 686.w,
height: 500.w,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.w),
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
children: [
head,
34.w.heightBox,
Row(
children: [
Assets.icons.clockCircle.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${DateUtil.formatDateStr(widget.model.appointmentDate)}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
20.w.heightBox,
Row(
children: [
Assets.icons.environment.image(width: 36.w, height: 36.w),
24.w.widthBox,
'${widget.model.appointmentAddress}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
34.w.heightBox,
Container(
width: 638.w,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.03),
borderRadius: BorderRadius.circular(8.w)),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'#${TaskMap.typeToString[widget.model.type]}'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.make(),
16.w.heightBox,
widget.model.content.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
],
),
),
32.w.heightBox,
BeeDivider.horizontal(),
32.w.heightBox,
Row(
children: [
Assets.icons.reward.image(width: 36.w, height: 36.w),
24.w.widthBox,
'报酬'
.text
.size(26.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
'¥${widget.model.reward}'
.text
.size(32.sp)
.color(Colors.red)
.make(),
],
),
],
),
);
}
}

@ -266,7 +266,7 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
Get.back();
setState(() {});
},
child: ''
child: ''
.text
.size(28.sp)
.isIntrinsic

@ -31,7 +31,7 @@ class TaskFunc {
static Future<bool> cancel({
required int taskId,
}) async {
var base = await NetUtil().post(API.manager.task.cancel, params: {
var base = await NetUtil().get(API.manager.task.cancel, params: {
'taskId': taskId,
});
return base.status ?? false;
@ -42,7 +42,7 @@ class TaskFunc {
static Future<bool> take({
required int taskId,
}) async {
var base = await NetUtil().post(API.manager.task.take, params: {
var base = await NetUtil().get(API.manager.task.take, params: {
'taskId': taskId,
});
return base.status ?? false;
@ -53,7 +53,7 @@ class TaskFunc {
static Future<bool> finish({
required int taskId,
}) async {
var base = await NetUtil().post(API.manager.task.finish, params: {
var base = await NetUtil().get(API.manager.task.finish, params: {
'taskId': taskId,
});
return base.status ?? false;

Loading…
Cancel
Save