功能分类

首页改版
pull/1/head
张萌 3 years ago
parent d04128cf2b
commit 5cc5022158

@ -100,7 +100,7 @@ List<AO> appObjects = [
AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()), AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()),
AO('智慧养老', Assets.home.icZhyl.path, () => OldAgeSupportPageSimple()), AO('智慧养老', Assets.home.icZhyl.path, () => OldAgeSupportPageSimple()),
AO('周边服务', Assets.home.icZbfw.path, null), AO('周边服务', Assets.home.icZbfw.path, null),
AO('小蜜蜂任务', Assets.home.icRwfb.path, () => TaskPage()), AO('任务发布', Assets.home.icRwfb.path, () => TaskPage()),
AO('自营商城', Assets.icons.shoppingMall.path, null), AO('自营商城', Assets.icons.shoppingMall.path, null),
AO('邻家宠物', Assets.home.icLjcw.path, null), AO('邻家宠物', Assets.home.icLjcw.path, null),
AO('共享停车', Assets.icons.sharePark.path, null), AO('共享停车', Assets.icons.sharePark.path, null),
@ -157,28 +157,9 @@ List<AO> userAppObjects = [
AO allApp = AO allApp =
AO('全部应用', R.ASSETS_APPLICATIONS_ALL_APP_PNG, () => AllApplicationPage()); AO('全部应用', R.ASSETS_APPLICATIONS_ALL_APP_PNG, () => AllApplicationPage());
/// original value ///线 original value
List<String> _recommendApp = [ List<String> _recommendApp = [
// if (false) '一键开门',
'访客邀请',
'报事报修',
'建议咨询',
'一键报警',
'共享投屏',
'二手市场',
'共享停车',
];
///
List<AO> get recommendApp => _recommendApp.map((e) => AO.fromRaw(e)).toList();
/// original value
List<String> _smartManagerApp = [
// if (false) '一键开门',
'开门码',
'访客邀请', '访客邀请',
'报事报修',
'生活缴费',
'业委会', '业委会',
'建议咨询', '建议咨询',
'便民电话', '便民电话',
@ -186,24 +167,34 @@ List<String> _smartManagerApp = [
'物品出门', '物品出门',
'投诉表扬', '投诉表扬',
'问卷调查', '问卷调查',
'装修管理',
'借还管理', '借还管理',
'一键报警',
'设施预约', '设施预约',
'快递包裹',
'电子商务', '电子商务',
'服务浏览', '服务浏览',
'社区介绍', '社区介绍',
'家政服务', '家政服务',
'地理信息', '地理信息',
'周边企业', '周边企业',
'住房说明' '住房说明',
'智慧养老',
'周边服务',
'自营商城',
'邻家宠物',
'共享停车',
'二手市场',
'共享投屏',
];
// '小区教育', ///
// '健康运动', List<AO> get recommendApp => _recommendApp.map((e) => AO.fromRaw(e)).toList();
// '家政服务',
// '居家养老', /// original value
// '物业租赁', List<String> _smartManagerApp = [
'开门码',
'报事报修',
'生活缴费',
'一键报警',
'任务发布',
]; ];
/// ///
@ -268,7 +259,7 @@ List<String> _aboutCommunityApp = [
List<AO> get aboutCommunityApp => List<AO> get aboutCommunityApp =>
_aboutCommunityApp.map((e) => AO.fromRaw(e)).toList(); _aboutCommunityApp.map((e) => AO.fromRaw(e)).toList();
List<String> _wisdomServiceApp = ['智慧养老', '周边服务', '小蜜蜂任务', '共享投屏']; List<String> _wisdomServiceApp = ['智慧养老', '周边服务', '任务发布', '共享投屏'];
List<AO> get wisdomServiceApp => List<AO> get wisdomServiceApp =>
_wisdomServiceApp.map((e) => AO.fromRaw(e)).toList(); _wisdomServiceApp.map((e) => AO.fromRaw(e)).toList();

@ -210,7 +210,7 @@ class _HomePageState extends State<HomePage>
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 32.w), margin: EdgeInsets.symmetric(horizontal: 32.w),
padding: padding:
EdgeInsets.only(top: 20.w, left: 36.w, right: 36.w), EdgeInsets.only(top: 20.w, left: 0.w, right: 0.w),
child: _applications(), //ApplicationView(), child: _applications(), //ApplicationView(),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
@ -230,7 +230,7 @@ class _HomePageState extends State<HomePage>
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
flex: 1, flex: 2,
child: GestureDetector( child: GestureDetector(
child: Container( child: Container(
padding: padding:
@ -250,7 +250,7 @@ class _HomePageState extends State<HomePage>
'访客邀请', '访客邀请',
style: TextStyle( style: TextStyle(
color: Color(0xD9000000), color: Color(0xD9000000),
fontSize: 26.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
10.hb, 10.hb,
@ -271,7 +271,7 @@ class _HomePageState extends State<HomePage>
), ),
BeeGradientDivider.vertical(), BeeGradientDivider.vertical(),
Expanded( Expanded(
flex: 2, flex: 3,
child: Column( child: Column(
children: [ children: [
Expanded( Expanded(
@ -297,7 +297,7 @@ class _HomePageState extends State<HomePage>
'一键报警', '一键报警',
style: TextStyle( style: TextStyle(
color: Color(0xD9000000), color: Color(0xD9000000),
fontSize: 26.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
10.hb, 10.hb,
@ -340,7 +340,7 @@ class _HomePageState extends State<HomePage>
'建议咨询', '建议咨询',
style: TextStyle( style: TextStyle(
color: Color(0xD9000000), color: Color(0xD9000000),
fontSize: 26.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
10.hb, 10.hb,
@ -368,45 +368,55 @@ class _HomePageState extends State<HomePage>
), ),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Column( child: Container(
children: [ padding: EdgeInsets.all(32.w),
HomeTitle( margin: EdgeInsets.symmetric(horizontal: 32.w),
title: '社区活动', decoration: BoxDecoration(
suffixTitle: '查看全部', color: Colors.white,
onTap: () => Get.to(() => ActivityListPage()), borderRadius: BorderRadius.circular(16.w)),
), child: Column(
_activityItemModels == [] children: [
? SizedBox() HomeTitle(
: Container( title: '社区活动',
height: 480.w, suffixTitle: '查看全部',
padding: EdgeInsets.only(left: 32.w), onTap: () => Get.to(() => ActivityListPage()),
child: ListView.separated( ),
padding: EdgeInsets.zero, 24.hb,
separatorBuilder: (context, index) { _activityItemModels == []
return SizedBox( ? SizedBox()
width: 16.w, : Container(
); height: 460.w,
}, child: ListView.separated(
scrollDirection: Axis.horizontal, padding: EdgeInsets.zero,
itemBuilder: (context, index) { separatorBuilder: (context, index) {
return Container( return SizedBox(
width: 500.w, width: 16.w,
child: Builder( );
builder: (context) { },
return ActivityCard( scrollDirection: Axis.horizontal,
model: itemBuilder: (context, index) {
_activityItemModels[index]); return Container(
}, width: 500.w,
), child: Builder(
); builder: (context) {
}, return ActivityCard(
itemCount: _activityItemModels.length, model:
_activityItemModels[index]);
},
),
);
},
itemCount: _activityItemModels.length,
),
), ),
), // : ActivityCard(model: _activityItemModel)
// : ActivityCard(model: _activityItemModel) // .pSymmetric(h: 24.w, v: 24.w),
// .pSymmetric(h: 24.w, v: 24.w), ],
], ),
)), )),
SliverToBoxAdapter(
child: 48.hb,
)
], ],
), ),
), ),
@ -529,7 +539,7 @@ class _HomePageState extends State<HomePage>
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
getFunctionBtn(AO.fromRaw('周边服务')), getFunctionBtn(AO.fromRaw('周边服务')),
getFunctionBtn(AO.fromRaw('小蜜蜂任务', replaceTitle: '任务发布')), getFunctionBtn(AO.fromRaw('任务发布', replaceTitle: '任务发布')),
getFunctionBtn(AO.fromRaw('邻家宠物')), getFunctionBtn(AO.fromRaw('邻家宠物')),
getFunctionBtn(AO.fromRaw('全部应用')), getFunctionBtn(AO.fromRaw('全部应用')),
], ],

@ -18,7 +18,7 @@ class ActivityCard extends StatelessWidget {
this.home = false, this.home = false,
}) : super(key: key); }) : super(key: key);
bool get outdate => ActivityFunc.dateCheck(model!.end) == ''; bool get outdate => model!.end?.isBefore(DateTime.now()) ?? true;
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ConstrainedBox( return ConstrainedBox(
@ -29,81 +29,72 @@ class ActivityCard extends StatelessWidget {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
onPressed: () => Get.to(() => ActivityDetailPage(id: model!.id)), onPressed: () => Get.to(() => ActivityDetailPage(id: model!.id)),
elevation: 0, elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24.w),
),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Hero( Stack(
tag: ImgModel.first(model!.imgList), clipBehavior: Clip.antiAliasWithSaveLayer,
child: Material( children: [
color: Colors.grey, Hero(
child: BeeImageNetwork( tag: ImgModel.first(model!.imgList),
imgs: model!.imgList ?? [], child: Material(
width: double.infinity, color: Colors.grey,
height: home! ? 240.w : 340.w, borderRadius: BorderRadius.circular(16.w),
), clipBehavior: Clip.antiAliasWithSaveLayer,
), child: BeeImageNetwork(
), imgs: model!.imgList ?? [],
Padding( width: double.infinity,
padding: EdgeInsets.only(left: 24.w, top: 24.w), height: home! ? 240.w : 340.w,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
constraints: BoxConstraints(maxWidth: 340.w),
child: Text(
model == null ? '' : model!.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xD9000000),
fontSize: 28.sp,
fontWeight: FontWeight.bold),
), ),
), ),
Spacer(), ),
GestureDetector( Positioned(
top: 0,
left: 0,
child: Container( child: Container(
//color: Color(0x80FEBF76),
// shape: StadiumBorder(),
alignment: Alignment.center, alignment: Alignment.center,
height: 39.w, height: 39.w,
width: 98.w, width: 98.w,
decoration: BoxDecoration( decoration: BoxDecoration(
color: outdate color: outdate ? Color(0xFFE8E8E8) : Color(0xFFFDE019),
? Colors.black.withOpacity(0.06) borderRadius: BorderRadius.only(
: Color(0x80FEBF76), topLeft: Radius.circular(16.w),
borderRadius: BorderRadius.all(Radius.circular(4)), bottomRight: Radius.circular(12.w)),
), ),
child: outdate child: outdate
? '已结束' ? '已结束'
.text .text
.size(22.sp) .size(22.sp)
.color(Colors.black.withOpacity(0.25)) .color(Color(0xFF999999))
.make() .make()
: '报名中' : '报名中'
.text .text
.size(22.sp) .size(22.sp)
.color(Color(0xFFF48117)) .color(Color(0xFF333333))
.make(), .make(),
), ))
onTap: () { ],
outdate ),
? null 24.hb,
: () { Row(
Get.to(() => ActivityDetailPage(id: model!.id)); crossAxisAlignment: CrossAxisAlignment.start,
}; children: [
}, Container(
constraints: BoxConstraints(maxWidth: 340.w),
child: Text(
model == null ? '' : model!.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xD9000000),
fontSize: 28.sp,
fontWeight: FontWeight.bold),
), ),
24.wb ),
], Spacer(),
), ],
), ),
Spacer(), Spacer(),
[ [
@ -116,13 +107,14 @@ class ActivityCard extends StatelessWidget {
), ),
), ),
// Spacer(), // Spacer(),
ActivityFunc.dateCheck(model!.end) Offstage(
.text offstage: ActivityFunc.dateCheck(model!.end) == '已结束',
.size(24.sp) child: ActivityFunc.dateCheck(model!.end)
.black .text
.make(), .size(24.sp)
].row().pSymmetric(h: 24.w), .black
20.hb, .make()),
].row(),
], ],
), ),
), ),

@ -9,6 +9,7 @@ import 'package:aku_new_community/widget/bee_divider.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:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -151,6 +152,10 @@ class _ActivityDetailPageState extends State<ActivityDetailPage> {
bottomNavi: BottomButton( bottomNavi: BottomButton(
child: '立即报名'.text.size(32.sp).color(Colors.black).bold.make(), child: '立即报名'.text.size(32.sp).color(Colors.black).bold.make(),
onPressed: () async { onPressed: () async {
if (_model!.regisEndTime?.isBefore(DateTime.now()) ?? false) {
BotToast.showText(text: '报名时间已结束');
return;
}
var re = await NetUtil().get(SAASAPI.activity.registration, var re = await NetUtil().get(SAASAPI.activity.registration,
params: {'activityId': _model!.id}, showMessage: true); params: {'activityId': _model!.id}, showMessage: true);
if (re.success) { if (re.success) {

@ -5,7 +5,7 @@ class ActivityFunc {
} }
var nowDate = DateTime.now(); var nowDate = DateTime.now();
if (date.isBefore(nowDate)) { if (date.isBefore(nowDate)) {
return ''; return '已结束';
} else { } else {
var days = date.difference(nowDate).inDays; var days = date.difference(nowDate).inDays;
if (days > 0) { if (days > 0) {

@ -1,11 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/application_objects.dart'; import 'package:aku_new_community/constants/application_objects.dart';
import 'package:aku_new_community/provider/app_provider.dart'; import 'package:aku_new_community/provider/app_provider.dart';
@ -13,6 +5,12 @@ import 'package:aku_new_community/ui/search/bee_search.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/login_util.dart'; import 'package:aku_new_community/utils/login_util.dart';
import 'package:aku_new_community/widget/bee_back_button.dart'; import 'package:aku_new_community/widget/bee_back_button.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class AllApplicationPage extends StatefulWidget { class AllApplicationPage extends StatefulWidget {
AllApplicationPage({Key? key}) : super(key: key); AllApplicationPage({Key? key}) : super(key: key);
@ -211,8 +209,8 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
child: ListView( child: ListView(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
children: [ children: [
_buildListTile('为您推荐', 0),
_buildListTile('智慧管家', 1), _buildListTile('智慧管家', 1),
_buildListTile('暂未上线', 0),
// _buildListTile('商城购物', 2), // _buildListTile('商城购物', 2),
], ],
), ),
@ -222,8 +220,8 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
controller: _pageController, controller: _pageController,
children: [ children: [
_buildView(recommendApp),
_buildView(smartManagerApp), _buildView(smartManagerApp),
_buildView(recommendApp),
], ],
).expand(), ).expand(),
], ],

@ -1,10 +1,8 @@
import 'package:aku_new_community/utils/headers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/utils/headers.dart';
class HomeTitle extends StatelessWidget { class HomeTitle extends StatelessWidget {
final String title; final String title;
final String suffixTitle; final String suffixTitle;
@ -21,27 +19,10 @@ class HomeTitle extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Row(
children: [ children: [
85.hb, title.text.size(32.sp).bold.make(),
32.wb,
Stack(
children: [
// Positioned(
// left: 0,
// right: 0,
// bottom: 4.w,
// child: Container(
// color: kPrimaryColor,
// height: 8.w,
// ),
// ),
title.text.size(32.sp).bold.make(),
],
),
Spacer(), Spacer(),
MaterialButton( GestureDetector(
shape: StadiumBorder(), onTap: onTap,
padding: EdgeInsets.symmetric(horizontal: 12.w),
onPressed: onTap,
child: Row( child: Row(
children: [ children: [
suffixTitle.text.size(24.sp).color(Color(0xFF999999)).make(), suffixTitle.text.size(24.sp).color(Color(0xFF999999)).make(),
@ -54,7 +35,6 @@ class HomeTitle extends StatelessWidget {
], ],
), ),
), ),
12.wb,
], ],
); );
} }

Loading…
Cancel
Save