功能分类

首页改版
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,6 +368,12 @@ class _HomePageState extends State<HomePage>
), ),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Container(
padding: EdgeInsets.all(32.w),
margin: EdgeInsets.symmetric(horizontal: 32.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16.w)),
child: Column( child: Column(
children: [ children: [
HomeTitle( HomeTitle(
@ -375,11 +381,11 @@ class _HomePageState extends State<HomePage>
suffixTitle: '查看全部', suffixTitle: '查看全部',
onTap: () => Get.to(() => ActivityListPage()), onTap: () => Get.to(() => ActivityListPage()),
), ),
24.hb,
_activityItemModels == [] _activityItemModels == []
? SizedBox() ? SizedBox()
: Container( : Container(
height: 480.w, height: 460.w,
padding: EdgeInsets.only(left: 32.w),
child: ListView.separated( child: ListView.separated(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
@ -406,7 +412,11 @@ class _HomePageState extends State<HomePage>
// : 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,18 +29,20 @@ 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: [
Stack(
clipBehavior: Clip.antiAliasWithSaveLayer,
children: [ children: [
Hero( Hero(
tag: ImgModel.first(model!.imgList), tag: ImgModel.first(model!.imgList),
child: Material( child: Material(
color: Colors.grey, color: Colors.grey,
borderRadius: BorderRadius.circular(16.w),
clipBehavior: Clip.antiAliasWithSaveLayer,
child: BeeImageNetwork( child: BeeImageNetwork(
imgs: model!.imgList ?? [], imgs: model!.imgList ?? [],
width: double.infinity, width: double.infinity,
@ -48,63 +50,52 @@ class ActivityCard extends StatelessWidget {
), ),
), ),
), ),
Padding( Positioned(
padding: EdgeInsets.only(left: 24.w, top: 24.w), top: 0,
child: Row( left: 0,
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(
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(),
))
],
),
24.hb,
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),
), ),
onTap: () {
outdate
? null
: () {
Get.to(() => ActivityDetailPage(id: model!.id));
};
},
), ),
24.wb Spacer(),
], ],
), ),
),
Spacer(), Spacer(),
[ [
Flexible( Flexible(
@ -116,13 +107,14 @@ class ActivityCard extends StatelessWidget {
), ),
), ),
// Spacer(), // Spacer(),
ActivityFunc.dateCheck(model!.end) Offstage(
offstage: ActivityFunc.dateCheck(model!.end) == '已结束',
child: ActivityFunc.dateCheck(model!.end)
.text .text
.size(24.sp) .size(24.sp)
.black .black
.make(), .make()),
].row().pSymmetric(h: 24.w), ].row(),
20.hb,
], ],
), ),
), ),

@ -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,
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(), 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