|
|
@ -7,87 +7,26 @@ import 'package:akuCommunity/routers/page_routers.dart';
|
|
|
|
import 'package:akuCommunity/widget/activity_card.dart';
|
|
|
|
import 'package:akuCommunity/widget/activity_card.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class ActivitiesPage extends StatefulWidget {
|
|
|
|
class ActivitiesPage extends StatefulWidget {
|
|
|
|
final Bundle bundle;
|
|
|
|
ActivitiesPage({Key key}) : super(key: key);
|
|
|
|
ActivitiesPage({Key key, this.bundle}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
_ActivitiesPageState createState() => _ActivitiesPageState();
|
|
|
|
_ActivitiesPageState createState() => _ActivitiesPageState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _ActivitiesPageState extends State<ActivitiesPage> {
|
|
|
|
class _ActivitiesPageState extends State<ActivitiesPage> {
|
|
|
|
List<String> images = [
|
|
|
|
List<String> images = [];
|
|
|
|
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1151143562,4115642159&fm=26&gp=0.jpg",
|
|
|
|
|
|
|
|
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2551412680,857245643&fm=26&gp=0.jpg",
|
|
|
|
|
|
|
|
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3604827221,1047385274&fm=26&gp=0.jpg",
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
List<Map<String, dynamic>> _listView = [];
|
|
|
|
List<Map<String, dynamic>> _listView = [];
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, dynamic>> _listVote = [
|
|
|
|
List<Map<String, dynamic>> _listVote = [];
|
|
|
|
{
|
|
|
|
|
|
|
|
'imagePath':
|
|
|
|
|
|
|
|
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600058454436&di=76f6d526c4108b582c540d24bad316d8&imgtype=0&src=http%3A%2F%2Fimg003.hc360.cn%2Fm2%2FM00%2FFD%2FB9%2FwKhQclRLWoqEAosNAAAAABnzxUo896.jpg',
|
|
|
|
|
|
|
|
'title': '为优秀点赞!2020第一届最美服务之星评选',
|
|
|
|
|
|
|
|
'subtitleFirst': '快来为你支持的保洁员投票吧!~',
|
|
|
|
|
|
|
|
'subtitleSecond': '06月17日 12:00至06月27日18:30',
|
|
|
|
|
|
|
|
'isOver': false,
|
|
|
|
|
|
|
|
'isVoteOver': true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'imagePath':
|
|
|
|
|
|
|
|
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600058583164&di=04000bc0e0394edb0c74f7c8fa0efcb2&imgtype=0&src=http%3A%2F%2Fn.sinaimg.cn%2Ftranslate%2F161%2Fw1080h681%2F20180814%2FzWKK-hhtfwqr0303774.jpg',
|
|
|
|
|
|
|
|
'title': '投票!选出你心中“乘风破浪的绿化保卫员”',
|
|
|
|
|
|
|
|
'subtitleFirst': '建设美丽的边疆,爱护我们的家园',
|
|
|
|
|
|
|
|
'subtitleSecond': '04月17日 13:00至04月23日18:30',
|
|
|
|
|
|
|
|
'isOver': false,
|
|
|
|
|
|
|
|
'isVoteOver': true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'imagePath':
|
|
|
|
|
|
|
|
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600058626924&di=568c1c35b47e6c8bb762f71a883c9e09&imgtype=0&src=http%3A%2F%2Fimg.soufunimg.com%2Fnews%2F2015_11%2F26%2F1448505277039.jpg',
|
|
|
|
|
|
|
|
'title': '特别忠诚,在生死抉择的时刻,他把人民利益举过他把人民利益举过……',
|
|
|
|
|
|
|
|
'subtitleFirst': '平凡服务者,最美保安员',
|
|
|
|
|
|
|
|
'subtitleSecond': '04月12日 12:00至04月15日18:30',
|
|
|
|
|
|
|
|
'isOver': true,
|
|
|
|
|
|
|
|
'isVoteOver': false,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, dynamic>> _listEnter = [
|
|
|
|
List<Map<String, dynamic>> _listEnter = [];
|
|
|
|
{
|
|
|
|
|
|
|
|
'imagePath':
|
|
|
|
|
|
|
|
'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3786472598,2225627644&fm=26&gp=0.jpg',
|
|
|
|
|
|
|
|
'title': '宁化社区第一届煎蛋比赛报名开始',
|
|
|
|
|
|
|
|
'subtitleFirst': '活动室二楼',
|
|
|
|
|
|
|
|
'subtitleSecond': '06月17日 12:00至06月27日18:30',
|
|
|
|
|
|
|
|
'isOver': false,
|
|
|
|
|
|
|
|
'isVoteOver': true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'imagePath':
|
|
|
|
|
|
|
|
'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600339523640&di=be179b5e314f9e198c000e7726affef6&imgtype=0&src=http%3A%2F%2Fa.hiphotos.baidu.com%2Fbaike%2Fpic%2Fitem%2F7e3e6709c93d70cf7371f1f3f1dcd100bba12b40.jpg',
|
|
|
|
|
|
|
|
'title': '美嘉社区第三届六一亲子活动开始啦',
|
|
|
|
|
|
|
|
'subtitleFirst': '中央活动区',
|
|
|
|
|
|
|
|
'subtitleSecond': '04月17日 13:00至04月23日18:30',
|
|
|
|
|
|
|
|
'isOver': false,
|
|
|
|
|
|
|
|
'isVoteOver': true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
'imagePath':
|
|
|
|
|
|
|
|
'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=347834970,829932821&fm=26&gp=0.jpg',
|
|
|
|
|
|
|
|
'title': '生命在与运动,华侨小区拔河比赛开始',
|
|
|
|
|
|
|
|
'subtitleFirst': '小区外围体育馆',
|
|
|
|
|
|
|
|
'subtitleSecond': '04月12日 12:00至04月15日18:30',
|
|
|
|
|
|
|
|
'isOver': true,
|
|
|
|
|
|
|
|
'isVoteOver': false,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
RefreshController _refreshController =
|
|
|
|
RefreshController _refreshController =
|
|
|
|
RefreshController(initialRefresh: false);
|
|
|
|
RefreshController(initialRefresh: false);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
super.initState();
|
|
|
|
_listView = widget.bundle.getBool('isVote') ? _listVote : _listEnter;
|
|
|
|
_listView = _listVote;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void _onRefresh() async {
|
|
|
|
void _onRefresh() async {
|
|
|
@ -105,17 +44,7 @@ class _ActivitiesPageState extends State<ActivitiesPage> {
|
|
|
|
|
|
|
|
|
|
|
|
void detailsRouter(String imagePath, title, bool isOver, isVote, isVoteOver,
|
|
|
|
void detailsRouter(String imagePath, title, bool isOver, isVote, isVoteOver,
|
|
|
|
List<String> memberList) {
|
|
|
|
List<String> memberList) {
|
|
|
|
Get.to(ActivitiesPage(
|
|
|
|
Get.to(ActivitiesPage());
|
|
|
|
bundle: Bundle()
|
|
|
|
|
|
|
|
..putMap('details', {
|
|
|
|
|
|
|
|
'title': title,
|
|
|
|
|
|
|
|
'imagePath': imagePath,
|
|
|
|
|
|
|
|
'isOver': isOver,
|
|
|
|
|
|
|
|
'isVote': isVote,
|
|
|
|
|
|
|
|
'isVoteOver': isVoteOver,
|
|
|
|
|
|
|
|
'memberList': memberList
|
|
|
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
@ -148,7 +77,7 @@ class _ActivitiesPageState extends State<ActivitiesPage> {
|
|
|
|
subtitleSecond: _listView[index]['subtitleSecond'],
|
|
|
|
subtitleSecond: _listView[index]['subtitleSecond'],
|
|
|
|
memberList: images,
|
|
|
|
memberList: images,
|
|
|
|
isOver: _listView[index]['isOver'],
|
|
|
|
isOver: _listView[index]['isOver'],
|
|
|
|
isVote: widget.bundle.getBool('isVote'),
|
|
|
|
isVote: false,
|
|
|
|
isVoteOver: _listView[index]['isVoteOver'],
|
|
|
|
isVoteOver: _listView[index]['isVoteOver'],
|
|
|
|
fun: detailsRouter,
|
|
|
|
fun: detailsRouter,
|
|
|
|
),
|
|
|
|
),
|
|
|
|