parent
d30613391b
commit
898721faa4
@ -1,208 +1,259 @@
|
|||||||
import 'package:aku_new_community/const/resource.dart';
|
import 'package:aku_new_community/gen/assets.gen.dart';
|
||||||
import 'package:aku_new_community/constants/api.dart';
|
|
||||||
import 'package:aku_new_community/constants/app_theme.dart';
|
|
||||||
import 'package:aku_new_community/model/community/activity_detail_model.dart';
|
|
||||||
import 'package:aku_new_community/ui/community/activity/activity_people_list_page.dart';
|
|
||||||
import 'package:aku_new_community/utils/headers.dart';
|
import 'package:aku_new_community/utils/headers.dart';
|
||||||
import 'package:aku_new_community/utils/network/base_model.dart';
|
import 'package:aku_new_community/widget/bee_divider.dart';
|
||||||
import 'package:aku_new_community/utils/network/net_util.dart';
|
|
||||||
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||||
import 'package:aku_new_community/widget/buttons/bottom_button.dart';
|
import 'package:aku_new_community/widget/buttons/bottom_button.dart';
|
||||||
import 'package:aku_new_community/widget/others/stack_avatar.dart';
|
import 'package:aku_new_community/widget/others/stack_avatar.dart';
|
||||||
import 'package:aku_new_community/widget/picker/bee_image_preview.dart';
|
|
||||||
import 'package:bot_toast/bot_toast.dart';
|
|
||||||
import 'package:flustars/flustars.dart';
|
import 'package:flustars/flustars.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:shimmer/shimmer.dart';
|
import 'package:velocity_x/velocity_x.dart';
|
||||||
|
|
||||||
class ActivityDetailPage extends StatefulWidget {
|
class ActivityDetailPage extends StatefulWidget {
|
||||||
final int? id;
|
const ActivityDetailPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
ActivityDetailPage({Key? key, required this.id}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ActivityDetailPageState createState() => _ActivityDetailPageState();
|
_ActivityDetailPageState createState() => _ActivityDetailPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ActivityDetailPageState extends State<ActivityDetailPage> {
|
class _ActivityDetailPageState extends State<ActivityDetailPage> {
|
||||||
ActivityDetailModel? model;
|
@override
|
||||||
EasyRefreshController _refreshController = EasyRefreshController();
|
Widget build(BuildContext context) {
|
||||||
|
var content = Container(
|
||||||
bool get outdate =>
|
width: double.infinity,
|
||||||
(model?.registEndDate ?? DateTime(0)).compareTo(DateTime.now()) == -1;
|
padding: EdgeInsets.all(32.w),
|
||||||
|
|
||||||
Widget get emptyWidget => Shimmer.fromColors(
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
VxBox().white.height(45.w).width(544.w).make(),
|
'活动详情'.text.size(32.sp).color(Colors.black).bold.make(),
|
||||||
48.hb,
|
32.w.heightBox,
|
||||||
VxBox()
|
''.text.size(28.sp).color(Colors.black.withOpacity(0.45)).make(),
|
||||||
.white
|
32.w.heightBox,
|
||||||
.height(228.w)
|
|
||||||
.width(double.infinity)
|
|
||||||
.withRounded(value: 8.w)
|
|
||||||
.make(),
|
|
||||||
44.hb,
|
|
||||||
...List.generate(
|
...List.generate(
|
||||||
3,
|
0,
|
||||||
(index) => VxBox()
|
(index) => Container(
|
||||||
.white
|
width: 686.w,
|
||||||
.height(45.w)
|
height: 432.w,
|
||||||
.width(544.w)
|
decoration: BoxDecoration(
|
||||||
.margin(EdgeInsets.symmetric(vertical: 5.w))
|
borderRadius: BorderRadius.circular(8.w),
|
||||||
.make(),
|
),
|
||||||
|
child: Image.network(
|
||||||
|
'',
|
||||||
|
fit: BoxFit.fill,
|
||||||
),
|
),
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
).pSymmetric(h: 32.w, v: 24.w),
|
),
|
||||||
baseColor: Colors.black12,
|
|
||||||
highlightColor: Colors.white,
|
|
||||||
);
|
);
|
||||||
|
return BeeScaffold(
|
||||||
@override
|
title: '活动详情',
|
||||||
void dispose() {
|
body: ListView(
|
||||||
_refreshController.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
_buildTile(String title, String subTitle) {
|
|
||||||
return Row(
|
|
||||||
children: [
|
children: [
|
||||||
title.text.size(28.sp).make().box.width(136.w).make(),
|
_headWidget(),
|
||||||
subTitle.text.size(28.sp).make().expand(),
|
24.w.heightBox,
|
||||||
|
content,
|
||||||
|
24.w.heightBox,
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 16.w),
|
||||||
|
height: 132.w,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
CircleAvatar(
|
||||||
|
child: FadeInImage.assetNetwork(
|
||||||
|
placeholder: Assets.images.placeholder.path,
|
||||||
|
image: '',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
20.w.widthBox,
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
'印象物业'.text.size(28.sp).color(Colors.black).make(),
|
||||||
|
8.w.heightBox,
|
||||||
|
'${S.of(context)!.tempPlotName}'
|
||||||
|
.text
|
||||||
|
.size(24.sp)
|
||||||
|
.color(Colors.black.withOpacity(0.25))
|
||||||
|
.make()
|
||||||
],
|
],
|
||||||
).pSymmetric(h: 32.w);
|
),
|
||||||
|
Spacer(),
|
||||||
|
MaterialButton(
|
||||||
|
minWidth: 120.w,
|
||||||
|
height: 60.w,
|
||||||
|
onPressed: () {},
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
side: BorderSide(
|
||||||
|
color: Colors.blueAccent,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(30.w)),
|
||||||
|
child:
|
||||||
|
'联系物业'.text.size(24.sp).color(Colors.blueAccent).make(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
bottomNavi: BottomButton(
|
||||||
|
child: '立即报名'.text.size(32.sp).color(Colors.black).bold.make(),
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
Container _headWidget() {
|
||||||
Widget build(BuildContext context) {
|
return Container(
|
||||||
return BeeScaffold(
|
color: Colors.white,
|
||||||
title: '活动详情',
|
child: Column(
|
||||||
systemStyle: SystemStyle.yellowBottomBar,
|
children: [
|
||||||
body: EasyRefresh(
|
Image.asset(
|
||||||
header: MaterialHeader(),
|
Assets.images.logo.path,
|
||||||
onRefresh: () async {
|
width: double.infinity,
|
||||||
BaseModel baseModel = await NetUtil().get(
|
height: 280.w,
|
||||||
API.community.activityDetail,
|
),
|
||||||
params: {'activityId': widget.id},
|
Padding(
|
||||||
);
|
padding: EdgeInsets.all(32.w),
|
||||||
model = ActivityDetailModel.fromJson(baseModel.data);
|
child: Column(
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
controller: _refreshController,
|
|
||||||
firstRefresh: true,
|
|
||||||
emptyWidget: model == null ? emptyWidget : null,
|
|
||||||
child: model == null
|
|
||||||
? SizedBox()
|
|
||||||
: ListView(
|
|
||||||
children: [
|
children: [
|
||||||
model!.title!.text
|
'人才公寓党政建设讲座系列活动——庆祝中国共产党建党71周年活动'
|
||||||
|
.text
|
||||||
.size(32.sp)
|
.size(32.sp)
|
||||||
|
.color(Colors.black.withOpacity(0.85))
|
||||||
|
.maxLines(3)
|
||||||
.bold
|
.bold
|
||||||
.make()
|
.make(),
|
||||||
.pSymmetric(h: 32.w, v: 24.w),
|
32.w.heightBox,
|
||||||
48.hb,
|
Container(
|
||||||
...model!.imgUrls!
|
width: 104.w,
|
||||||
.map((e) => GestureDetector(
|
height: 42.w,
|
||||||
onTap: () {
|
|
||||||
BeeImagePreview.toPath(path: e.url);
|
|
||||||
},
|
|
||||||
child: Hero(
|
|
||||||
tag: e.url!,
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.black12,
|
color: Color(0xFFFEC076).withOpacity(0.5),
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
borderRadius: BorderRadius.circular(10.w)),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child:
|
||||||
|
'报名中'.text.size(24.sp).color(Color(0xFFF481170)).make(),
|
||||||
),
|
),
|
||||||
clipBehavior: Clip.antiAlias,
|
32.w.heightBox,
|
||||||
child: FadeInImage.assetNetwork(
|
_buildTile(
|
||||||
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
'报名时间',
|
||||||
image: API.image(e.url),
|
'${DateUtil.formatDate(
|
||||||
fit: BoxFit.cover,
|
DateTime.now(),
|
||||||
|
format: 'yyyy.MM.dd HH:mm',
|
||||||
|
)}-${DateUtil.formatDate(
|
||||||
|
DateTime.now(),
|
||||||
|
format: 'yyyy.MM.dd HH:mm',
|
||||||
|
)}',
|
||||||
),
|
),
|
||||||
|
_buildTile(
|
||||||
|
'活动时间',
|
||||||
|
'${DateUtil.formatDate(
|
||||||
|
DateTime.now(),
|
||||||
|
format: 'yyyy.MM.dd HH:mm',
|
||||||
|
)}-${DateUtil.formatDate(
|
||||||
|
DateTime.now(),
|
||||||
|
format: 'yyyy.MM.dd HH:mm',
|
||||||
|
)}',
|
||||||
),
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
'活动方式'.text.size(28.sp).make().box.width(136.w).make(),
|
||||||
|
'本次活动介绍'
|
||||||
|
.richText
|
||||||
|
.tap(() {
|
||||||
|
var bottomSheet = Container(
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.all(32.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(16.w)),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
'活动介绍'.text.size(32.sp).black.bold.make(),
|
||||||
|
32.w.heightBox,
|
||||||
|
],
|
||||||
),
|
),
|
||||||
).pSymmetric(h: 32.w))
|
);
|
||||||
.toList(),
|
Get.bottomSheet(
|
||||||
44.hb,
|
bottomSheet,
|
||||||
model!.content!.text.size(28.sp).make().pSymmetric(h: 32.w),
|
);
|
||||||
44.hb,
|
})
|
||||||
_buildTile(
|
.size(28.sp)
|
||||||
'开始时间',
|
.make(),
|
||||||
DateUtil.formatDate(
|
Spacer(),
|
||||||
model!.startDate,
|
],
|
||||||
format: 'yyyy年MM月dd日 HH:mm',
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_buildTile(
|
Padding(
|
||||||
'结束时间',
|
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||||
DateUtil.formatDate(
|
child: Row(
|
||||||
model!.endDate,
|
children: [
|
||||||
format: 'yyyy年MM月dd日 HH:mm',
|
'活动费用'.text.size(28.sp).make().box.width(136.w).make(),
|
||||||
|
'免费'.richText.size(28.sp).make(),
|
||||||
|
Spacer(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
_buildTile('地 点', model!.location!),
|
32.w.heightBox,
|
||||||
_buildTile('参与人数', '不限'),
|
Padding(
|
||||||
_buildTile(
|
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||||
'报名截止',
|
child: Row(
|
||||||
DateUtil.formatDate(
|
children: [
|
||||||
model!.registEndDate,
|
'活动地点'.text.size(28.sp).make().box.width(136.w).make(),
|
||||||
format: 'yyyy年MM月dd日 HH:mm',
|
'永恒智慧大厦'.richText.tap(() {}).size(28.sp).make(),
|
||||||
|
Spacer(),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
115.hb,
|
32.w.heightBox,
|
||||||
Container(
|
BeeDivider.horizontal(
|
||||||
height: 24.w,
|
indent: 32.w,
|
||||||
color: Color(0xFFF9F9F9),
|
endIndent: 32.w,
|
||||||
),
|
),
|
||||||
MaterialButton(
|
InkWell(
|
||||||
height: 92.w,
|
onTap: () {},
|
||||||
onPressed: () =>
|
child: Container(
|
||||||
Get.to(() => ActivityPeopleListPage(id: widget.id)),
|
padding: EdgeInsets.only(
|
||||||
|
left: 32.w, right: 32.w, top: 16.w, bottom: 24.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
StackAvatar(
|
StackAvatar(
|
||||||
avatars:
|
avatars: [],
|
||||||
model!.headImgURls!.map((e) => e.url).toList(),
|
|
||||||
),
|
),
|
||||||
Spacer(),
|
16.w.heightBox,
|
||||||
'已有${model!.countRegistration}人参加'
|
'200'
|
||||||
.text
|
.richText
|
||||||
.size(28.sp)
|
.withTextSpanChildren(
|
||||||
|
['/1000人参与'.textSpan.size(24.sp).black.make()])
|
||||||
|
.color(Colors.blueAccent)
|
||||||
|
.size(24.sp)
|
||||||
.make(),
|
.make(),
|
||||||
16.wb,
|
Spacer(),
|
||||||
Icon(
|
Icon(
|
||||||
CupertinoIcons.chevron_forward,
|
CupertinoIcons.chevron_right,
|
||||||
size: 30.w,
|
size: 40.w,
|
||||||
color: Color(0xFFD8D8D8),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(height: 1.w, indent: 32.w, endIndent: 32.w),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
).material(color: Colors.white),
|
),
|
||||||
bottomNavi: outdate
|
],
|
||||||
? BottomButton(
|
|
||||||
onPressed: null,
|
|
||||||
child: '该活动已结束'.text.make(),
|
|
||||||
)
|
|
||||||
: BottomButton(
|
|
||||||
onPressed: () async {
|
|
||||||
VoidCallback cancel = BotToast.showLoading();
|
|
||||||
NetUtil().get(
|
|
||||||
API.community.signUpActivity,
|
|
||||||
params: {'activityId': widget.id},
|
|
||||||
showMessage: true,
|
|
||||||
);
|
|
||||||
cancel();
|
|
||||||
},
|
|
||||||
child: '我要报名'.text.make(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_buildTile(String title, String subTitle) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
title.text.size(28.sp).make().box.width(136.w).make(),
|
||||||
|
subTitle.text.size(28.sp).make().expand(),
|
||||||
|
],
|
||||||
|
).pSymmetric(h: 32.w);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,220 @@
|
|||||||
|
import 'package:aku_new_community/const/resource.dart';
|
||||||
|
import 'package:aku_new_community/constants/api.dart';
|
||||||
|
import 'package:aku_new_community/constants/app_theme.dart';
|
||||||
|
import 'package:aku_new_community/model/common/img_model.dart';
|
||||||
|
import 'package:aku_new_community/model/community/activity_detail_model.dart';
|
||||||
|
import 'package:aku_new_community/ui/community/activity/activity_people_list_page.dart';
|
||||||
|
import 'package:aku_new_community/utils/headers.dart';
|
||||||
|
import 'package:aku_new_community/utils/network/net_util.dart';
|
||||||
|
import 'package:aku_new_community/widget/bee_scaffold.dart';
|
||||||
|
import 'package:aku_new_community/widget/buttons/bottom_button.dart';
|
||||||
|
import 'package:aku_new_community/widget/others/stack_avatar.dart';
|
||||||
|
import 'package:aku_new_community/widget/picker/bee_image_preview.dart';
|
||||||
|
import 'package:bot_toast/bot_toast.dart';
|
||||||
|
import 'package:flustars/flustars.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:shimmer/shimmer.dart';
|
||||||
|
|
||||||
|
@Deprecated('旧页面 酌情删除')
|
||||||
|
class ActivityDetailPage extends StatefulWidget {
|
||||||
|
final int? id;
|
||||||
|
|
||||||
|
ActivityDetailPage({Key? key, required this.id}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ActivityDetailPageState createState() => _ActivityDetailPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ActivityDetailPageState extends State<ActivityDetailPage> {
|
||||||
|
ActivityDetailModel? model;
|
||||||
|
EasyRefreshController _refreshController = EasyRefreshController();
|
||||||
|
|
||||||
|
bool get outdate =>
|
||||||
|
(model?.registEndDate ?? DateTime(0)).compareTo(DateTime.now()) == -1;
|
||||||
|
|
||||||
|
Widget get emptyWidget => Shimmer.fromColors(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
VxBox().white.height(45.w).width(544.w).make(),
|
||||||
|
48.hb,
|
||||||
|
VxBox()
|
||||||
|
.white
|
||||||
|
.height(228.w)
|
||||||
|
.width(double.infinity)
|
||||||
|
.withRounded(value: 8.w)
|
||||||
|
.make(),
|
||||||
|
44.hb,
|
||||||
|
...List.generate(
|
||||||
|
3,
|
||||||
|
(index) => VxBox()
|
||||||
|
.white
|
||||||
|
.height(45.w)
|
||||||
|
.width(544.w)
|
||||||
|
.margin(EdgeInsets.symmetric(vertical: 5.w))
|
||||||
|
.make(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).pSymmetric(h: 32.w, v: 24.w),
|
||||||
|
baseColor: Colors.black12,
|
||||||
|
highlightColor: Colors.white,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_refreshController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
_buildTile(String title, String subTitle) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
title.text.size(28.sp).make().box.width(136.w).make(),
|
||||||
|
subTitle.text.size(28.sp).make().expand(),
|
||||||
|
],
|
||||||
|
).pSymmetric(h: 32.w);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BeeScaffold(
|
||||||
|
title: '活动详情',
|
||||||
|
systemStyle: SystemStyle.yellowBottomBar,
|
||||||
|
body: EasyRefresh(
|
||||||
|
header: MaterialHeader(),
|
||||||
|
onRefresh: () async {
|
||||||
|
// BaseModel baseModel = await NetUtil().get(
|
||||||
|
// API.community.activityDetail,
|
||||||
|
// params: {'activityId': widget.id},
|
||||||
|
// );
|
||||||
|
// model = ActivityDetailModel.fromJson(baseModel.data);
|
||||||
|
model = ActivityDetailModel(
|
||||||
|
id: 0,
|
||||||
|
title: '111',
|
||||||
|
content: '2222',
|
||||||
|
location: '',
|
||||||
|
activityStartTime: '',
|
||||||
|
activityEndTime: '',
|
||||||
|
registrationEndTime: '',
|
||||||
|
countRegistration: 0,
|
||||||
|
imgUrls: [ImgModel(url: '')],
|
||||||
|
headImgURls: [ImgModel(url: '')]);
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
controller: _refreshController,
|
||||||
|
firstRefresh: true,
|
||||||
|
emptyWidget: model == null ? emptyWidget : null,
|
||||||
|
child: model == null
|
||||||
|
? SizedBox()
|
||||||
|
: ListView(
|
||||||
|
children: [
|
||||||
|
model!.title!.text
|
||||||
|
.size(32.sp)
|
||||||
|
.bold
|
||||||
|
.make()
|
||||||
|
.pSymmetric(h: 32.w, v: 24.w),
|
||||||
|
48.hb,
|
||||||
|
...model!.imgUrls!
|
||||||
|
.map((e) => GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
BeeImagePreview.toPath(path: e.url);
|
||||||
|
},
|
||||||
|
child: Hero(
|
||||||
|
tag: e.url!,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black12,
|
||||||
|
borderRadius: BorderRadius.circular(8.w),
|
||||||
|
),
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
|
child: FadeInImage.assetNetwork(
|
||||||
|
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
||||||
|
image: API.image(e.url),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
).pSymmetric(h: 32.w))
|
||||||
|
.toList(),
|
||||||
|
44.hb,
|
||||||
|
model!.content!.text.size(28.sp).make().pSymmetric(h: 32.w),
|
||||||
|
44.hb,
|
||||||
|
_buildTile(
|
||||||
|
'开始时间',
|
||||||
|
DateUtil.formatDate(
|
||||||
|
model!.startDate,
|
||||||
|
format: 'yyyy年MM月dd日 HH:mm',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_buildTile(
|
||||||
|
'结束时间',
|
||||||
|
DateUtil.formatDate(
|
||||||
|
model!.endDate,
|
||||||
|
format: 'yyyy年MM月dd日 HH:mm',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_buildTile('地 点', model!.location!),
|
||||||
|
_buildTile('参与人数', '不限'),
|
||||||
|
_buildTile(
|
||||||
|
'报名截止',
|
||||||
|
DateUtil.formatDate(
|
||||||
|
model!.registEndDate,
|
||||||
|
format: 'yyyy年MM月dd日 HH:mm',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
115.hb,
|
||||||
|
Container(
|
||||||
|
height: 24.w,
|
||||||
|
color: Color(0xFFF9F9F9),
|
||||||
|
),
|
||||||
|
MaterialButton(
|
||||||
|
height: 92.w,
|
||||||
|
onPressed: () =>
|
||||||
|
Get.to(() => ActivityPeopleListPage(id: widget.id)),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
StackAvatar(
|
||||||
|
avatars:
|
||||||
|
model!.headImgURls!.map((e) => e.url).toList(),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
'已有${model!.countRegistration}人参加'
|
||||||
|
.text
|
||||||
|
.size(28.sp)
|
||||||
|
.make(),
|
||||||
|
16.wb,
|
||||||
|
Icon(
|
||||||
|
CupertinoIcons.chevron_forward,
|
||||||
|
size: 30.w,
|
||||||
|
color: Color(0xFFD8D8D8),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Divider(height: 1.w, indent: 32.w, endIndent: 32.w),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
).material(color: Colors.white),
|
||||||
|
bottomNavi: outdate
|
||||||
|
? BottomButton(
|
||||||
|
onPressed: null,
|
||||||
|
child: '该活动已结束'.text.make(),
|
||||||
|
)
|
||||||
|
: BottomButton(
|
||||||
|
onPressed: () async {
|
||||||
|
VoidCallback cancel = BotToast.showLoading();
|
||||||
|
NetUtil().get(
|
||||||
|
API.community.signUpActivity,
|
||||||
|
params: {'activityId': widget.id},
|
||||||
|
showMessage: true,
|
||||||
|
);
|
||||||
|
cancel();
|
||||||
|
},
|
||||||
|
child: '我要报名'.text.make(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue