物业主页

hmxc
章文轩 3 years ago
parent 7811bc41c5
commit c61b1bcfe3

@ -97,7 +97,7 @@ List<AO> appObjects = [
AO('地理信息', R.ASSETS_ICONS_INTRODUCE_PNG, () => GeographicInformationPage()),
AO('周边企业', R.ASSETS_ICONS_HOUSE_KEEPING_PNG, () => SurroundingEnterprisesPage()),
AO('住房介绍', R.ASSETS_ICONS_INTRODUCE_PNG, () => HouseIntroducePage()),
AO('住房说明', R.ASSETS_ICONS_INTRODUCE_PNG, () => HouseIntroducePage()),
// AO(
// '小区教育',
@ -185,7 +185,7 @@ List<String> _smartManagerApp = [
'家政服务',
'地理信息',
'周边企业',
'住房介绍'
'住房说明'
@ -199,3 +199,65 @@ List<String> _smartManagerApp = [
///
List<AO> get smartManagerApp =>
_smartManagerApp.map((e) => AO.fromRaw(e)).toList();
///
List<String> _getOutApp = [
// if (false) '一键开门',
'开门码',
'访客邀请',
'物品出门',
'一键报警',
];
///
List<AO> get getOutApp =>
_getOutApp.map((e) => AO.fromRaw(e)).toList();
///
List<String> _propertyServicesApp = [
// if (false) '一键开门',
'报事报修',
'设施预约',
'生活缴费',
'装修管理',
];
///
List<AO> get propertyServicesApp =>
_propertyServicesApp.map((e) => AO.fromRaw(e)).toList();
///
List<String> _residentLifeApp = [
'便民电话',
'问卷调查',
'建议咨询',
'活动投票',
'设施预约',
'借还管理',
'业委会',
'快递包裹',
];
///
List<AO> get residentLifeApp =>
_residentLifeApp.map((e) => AO.fromRaw(e)).toList();
///About community
List<String> _aboutCommunityApp = [
'服务浏览',
'社区介绍',
// '地理信息',
// '周边企业',
'住房说明',
'电子商务',
];
///
List<AO> get aboutCommunityApp =>
_aboutCommunityApp.map((e) => AO.fromRaw(e)).toList();

@ -30,7 +30,6 @@ import 'package:aku_community/const/resource.dart';
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/community/activity_item_model.dart';
import 'package:aku_community/model/community/board_model.dart';
import 'package:aku_community/models/news/news_category_model.dart';
import 'package:aku_community/pages/home/widget/animate_app_bar.dart';
import 'package:aku_community/pages/message_center_page/message_center_page.dart';
import 'package:aku_community/provider/app_provider.dart';
@ -39,17 +38,11 @@ import 'package:aku_community/ui/community/activity/activity_list_page.dart';
import 'package:aku_community/ui/community/community_func.dart';
import 'package:aku_community/ui/home/home_notification.dart';
import 'package:aku_community/ui/home/home_title.dart';
import 'package:aku_community/ui/home/public_infomation/public_infomation_page.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/utils/login_util.dart';
import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/buttons/column_action_button.dart';
import 'package:aku_community/widget/views/application_box.dart';
import 'package:aku_community/widget/views/application_view.dart';
import 'widget/home_search.dart';
import 'package:flutter_swiper_null_safety/flutter_swiper_null_safety.dart';
import 'package:carousel_slider/carousel_slider.dart';
class HomePage extends StatefulWidget {
HomePage({Key? key}) : super(key: key);
@ -113,11 +106,11 @@ class _HomePageState extends State<HomePage>
height: 40.w, width: 40.w),
),
Padding(
padding: const EdgeInsets.only(right: 16, left: 12),
padding: EdgeInsets.only(right: 16.w, left: 12.w),
child: Badge(
elevation: 0,
badgeColor: Color(0xFFCF2525),
padding: sum > 9 ? EdgeInsets.all(2) : EdgeInsets.all(5),
padding: sum > 9 ? EdgeInsets.all(2.w) : EdgeInsets.all(5.w),
showBadge: appProvider.messageCenterModel.commentCount != 0 ||
appProvider.messageCenterModel.sysCount != 0,
position: BadgePosition.topEnd(
@ -126,7 +119,7 @@ class _HomePageState extends State<HomePage>
),
badgeContent: Text(
(sum).toString(),
style: TextStyle(color: Colors.white, fontSize: 10),
style: TextStyle(color: Colors.white, fontSize: 10.sp),
),
child: GestureDetector(
onTap: () {

@ -103,7 +103,7 @@ class _HouseIntroducePageState extends State<HouseIntroducePage> {
Widget build(BuildContext context) {
return BeeScaffold(
title: '住房介绍',
title: '住房说明',
systemStyle: SystemStyle.genStyle(bottom: Color(0xFF2A2A2A)),
body: BeeListView<HouseIntroduceModel>(
path: API.manager.houseType,

@ -34,6 +34,7 @@ class _PersonalIndexState extends State<PersonalIndex>
toolbarHeight: 0,
elevation: 0,
floating: true,
expandedHeight: 450.w - height,
backgroundColor: Colors.white,
flexibleSpace: FlexibleSpaceBar(

@ -0,0 +1,550 @@
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/constants/application_objects.dart';
import 'package:aku_community/pages/message_center_page/message_center_page.dart';
import 'package:aku_community/pages/personal/user_profile_page.dart';
import 'package:aku_community/pages/sign/sign_in_page.dart';
import 'package:aku_community/painters/user_bottom_bar_painter.dart';
import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/ui/profile/order/order_page.dart';
import 'package:aku_community/ui/search/bee_search.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/utils/login_util.dart';
import 'package:aku_community/widget/views/application_view.dart';
import 'package:badges/badges.dart';
import 'package:flutter/cupertino.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:provider/provider.dart';
class PropertyPage extends StatefulWidget {
final bool? isSign;
PropertyPage({Key? key, this.isSign}) : super(key: key);
@override
_PropertyPageState createState() => _PropertyPageState();
}
class _PropertyPageState extends State<PropertyPage>
with SingleTickerProviderStateMixin {
int sum = 0;
int commentCount = 0;
int sysCount = 0;
late TabController _tabController;
@override
void initState() {
super.initState();
_tabController = TabController(
initialIndex: 0, length: 2, vsync: this);
}
@override
void dispose() {
_tabController.dispose();
super.dispose();
}
SliverAppBar _sliverAppBar(double height) {
final userProvider = Provider.of<UserProvider>(context);
AppProvider appProvider = Provider.of<AppProvider>(context);
commentCount = appProvider.messageCenterModel.commentCount ?? 0;
sysCount = appProvider.messageCenterModel.sysCount ?? 0;
sum = commentCount + sysCount;
return SliverAppBar(
pinned: true,
snap: false,
//toolbarHeight: 0,
elevation: 0,
collapsedHeight:420.w,
titleSpacing: 10.0,
floating: true,
title: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
if (appProvider.location != null)
Padding(
padding: EdgeInsets.only(right: 5),
child: Image.asset(
R.ASSETS_ICONS_ICON_MAIN_LOCATION_PNG,
width: 32.w,
height: 32.w,
),
),
Text(
appProvider.location?['city']==null?'':appProvider.location?['city'] as String? ?? '',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 24.sp,
color: Color(0xff333333),
),
textAlign: TextAlign.center,
),
]),
actions: [
GestureDetector(
onTap: () {
Get.to(() => BeeSearch());
},
child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_FIND_PNG,
height: 40.w, width: 40.w),
),
Padding(
padding: EdgeInsets.only(right: 10.w, left: 12.w),
child: Badge(
elevation: 0,
badgeColor: Color(0xFFCF2525),
padding: sum > 9 ? EdgeInsets.all(2.w) : EdgeInsets.all(5.w),
showBadge: appProvider.messageCenterModel.commentCount != 0 ||
appProvider.messageCenterModel.sysCount != 0,
position: BadgePosition.topEnd(
top: 3,
end: -5,
),
badgeContent: Text(
(sum).toString(),
style: TextStyle(color: Colors.white, fontSize: 10.sp),
),
child: GestureDetector(
onTap: () {
if (LoginUtil.isNotLogin) return;
Get.to(() => MessageCenterPage());
},
child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_MESSAGE_PNG,
height: 40.w, width: 40.w),
)),
),
],
expandedHeight: 420.w,
backgroundColor: Colors.white,
flexibleSpace: Stack(
children: [
Positioned(
child: Container(
color: Color(0xF9D57A59),
height: 503.w,
width: double.infinity,
),
// Image(
// fit: BoxFit.cover,
// image: NetworkImage(
// "https://images.pexels.com/photos/62389/pexels-photo-62389.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260",
// ),
// ),
top: 0,
left: 0,
right: 0,
bottom: 0),
// Positioned(
// child: Container(
// height: 30,
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.vertical(
// top: Radius.circular(50),
// ),
// ),
// ),
// bottom: -1,
// left: 0,
// right: 0,
// ),
Positioned(
child: Container(
margin: EdgeInsets.only(left: 32.w,right: 32.w),
width: 686.w,
height: 74.w,
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.25),
borderRadius: BorderRadius.all(
Radius.circular(8.w),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
24.wb,
Text('当前绑定房屋',style: TextStyle(fontSize: 28.sp,color: Colors.white.withOpacity(0.85),height: 1.00),),
Spacer(),
Text('B栋2单元1803室',style: TextStyle(fontSize: 28.sp,color: Colors.white.withOpacity(0.85),height:1.00,fontWeight: FontWeight.bold),),
32.wb,
GestureDetector(
onTap: (){
},
child: Container(
alignment: Alignment.center,
width: 80.w,
height: 42.w,
child:Text('切换',style: TextStyle(fontSize: 24.sp,color: Colors.white.withOpacity(0.85)),),
decoration: BoxDecoration(
color: Color(0xFF3D8CE8),
borderRadius: BorderRadius.all(
Radius.circular(8.w),
),
),
),
),
24.wb,
],
),
),
top: kTextTabBarHeight+50.w,
left: 0,
right: 0,
),
Positioned(
child: _goodsTitle(),
top: kTextTabBarHeight+50.w+94.w,
left: 0,
right: 0,
),
Positioned(
child: Container(
padding: EdgeInsets.only(top: 20.w),
height: 150.w,
child: TabBarView(
children: [_payView(true),_payView(false)],
controller: _tabController,
physics: NeverScrollableScrollPhysics(),
),
),
top: kTextTabBarHeight+50.w+94.w+60.w,
left: 0,
right: 0,
),
],
),
);
}
_payView(bool pay){
return Container(
padding: EdgeInsets.only(left: 36.w,right: 36.w),
width: double.infinity,
height: 150.w,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'1,944.00',
style: TextStyle(
color: Color(0xFFFFFFFF).withOpacity(0.85),
fontSize: 40.sp,
),
),
8.hb,
Text(
'点击查看明细',
style: TextStyle(
color: Color(0xFFFFFFFF).withOpacity(0.45),
fontSize: 22.sp,
),
),
],
),
Spacer(),
Container(
alignment: Alignment.center,
width: 160.w,
height: 55.w,
child:Text(!pay?'一键缴费':'点击充值',style: TextStyle(fontSize: 24.sp,color: Colors.white.withOpacity(0.85)),),
decoration: BoxDecoration(
color: Color(0xFFFFB634),
borderRadius: BorderRadius.all(
Radius.circular(8.w),
),
),
),
],
),
);
}
_goodsTitle(){
return Row(
children: [
24.wb,
Container(
height: 60.w,
child: Material(
color: Colors.transparent,
child: TabBar(
onTap: (index) {
// _presenter.fetchList(_category.id, 0, _sortType);
setState(() {});
},
isScrollable: true,
labelPadding: EdgeInsets.zero,
controller: _tabController,
labelColor: Colors.white.withOpacity(0.85),
unselectedLabelColor: Colors.white.withOpacity(0.65),
indicatorPadding: EdgeInsets.symmetric(horizontal: 40.w),
indicatorSize: TabBarIndicatorSize.label,
labelStyle: TextStyle(color:Colors.white.withOpacity(0.85),),
indicatorColor: Color(0xFFE8A93A),
tabs: _tabItems()),
),
),
Spacer(),
Container(
color: Colors.transparent,
child: Row(
children: [
Text(
'缴费记录',
style: TextStyle(
color: Colors.white.withOpacity(0.45),
fontSize: 24.sp,
),
),
10.wb,
Icon(
CupertinoIcons.chevron_forward,
size: 24.w,
color: Colors.white.withOpacity(0.45),
),
],
),
),
36.wb,
],
);
}
List<Widget> _tabItems() {
return [_tabItem(0,'未缴账单'),_tabItem(1,'预缴金额')];
}
_tabItem(int index,String text) {
bool isChoose = index == _tabController.index;
// Color textColor = index == _tabController.index
// ? getCurrentThemeColor()
// : Colors.black.withOpacity(0.9);
return Tab(
child: Container(
alignment: Alignment.center,
width: 150.w,
// color: Colors.white,
color: Colors.transparent,
padding: EdgeInsets.only(left: 10.w, right: 10.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
text,
style: TextStyle(
fontWeight: isChoose?FontWeight.bold:FontWeight.normal,
fontSize: isChoose?32.sp:28.sp,
color: isChoose?Colors.white.withOpacity(0.85):Colors.white.withOpacity(0.65)),
),
],
),
),
);
}
Container _containerBar(String title) {
return Container(
color: title == '我的物业' ? Colors.white : BaseStyle.colorf9f9f9,
padding: EdgeInsets.all(title == '我的物业' ? 0 : 32.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
title,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize34,
color: ktextPrimary,
),
),
],
),
);
}
Widget _orderButton({
required String name,
required String path,
required int index,
}) {
return MaterialButton(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(path, height: 50.w, width: 50.w),
10.hb,
Text(
name,
style: TextStyle(
color: Color(0xFF333333),
fontSize: 22.sp,
),
),
],
),
onPressed: () {
Get.to(() => OrderPage(initIndex: index));
},
);
}
@override
Widget build(BuildContext context) {
final double _statusHeight = MediaQuery.of(context).padding.top;
final userProvider = Provider.of<UserProvider>(context);
var orderWidget = SliverToBoxAdapter(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_containerBar('我的订单'),
GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 5,
),
shrinkWrap: true,
children: [
_orderButton(
name: '待付款',
path: R.ASSETS_ICONS_USER_ICON_DFK_PNG,
index: 1,
),
_orderButton(
name: '待收货',
path: R.ASSETS_ICONS_USER_ICON_DSH_PNG,
index: 2,
),
_orderButton(
name: '待评价',
path: R.ASSETS_ICONS_USER_ICON_DPJ_PNG,
index: 3,
),
_orderButton(
name: '售后',
path: R.ASSETS_ICONS_USER_ICON_SH_PNG,
index: 4,
),
],
),
],
),
);
return Scaffold(
body: EasyRefresh(
header: MaterialHeader(),
onRefresh: () async {
await userProvider.updateProfile();
await userProvider.updateUserDetail();
},
child: CustomScrollView(
slivers: <Widget>[
_sliverAppBar(_statusHeight),
// orderWidget,
SliverToBoxAdapter(
child: _getFunctionView(getOutApp,'出行安全',Color(0xFFFAC058)),
),
SliverToBoxAdapter(
child: _getFunctionView(propertyServicesApp,'物业服务',Color(0xFF58FA8F)),
),
SliverToBoxAdapter(
child: _getFunctionView(residentLifeApp,'居民生活',Color(0xFF58C0FA)),
),
SliverToBoxAdapter(
child: _getFunctionView(aboutCommunityApp,'关于社区',Color(0xFFFA5858)),
),
],
),
),
);
}
_getFunctionView(List<AO> item,String title,Color color){
return Container(
margin: EdgeInsets.only(left: 32.w,right: 32.w,top: 32.w),
decoration: BoxDecoration(
color: Color(0xffffffff),
borderRadius: BorderRadius.all(Radius.circular(8)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.grey.withOpacity(0.1),
offset: Offset(1, 1),
),
],
),
//margin: EdgeInsets.all(20.w),
padding: EdgeInsets.only(left: 32.w,right: 32.w,top: 24.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// _containerBar('我的物业'),
Container(
child: Column(
children: [
Row(
//crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.only(top: 6.w),
width: 4.w,
height: 24.w,
color: color,
),
10.wb,
_getTitle(title),
],
),
ApplicationView.custom(
items: item,
needAllApp: false,
),
],
),
)
],
),
);
}
_getTitle(String title){
return Text(
title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 28.sp,
color: ktextPrimary,
),
);
}
}

@ -1,4 +1,5 @@
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/pages/property/property_page.dart';
import 'package:aku_community/pages/sign/sign_in_page.dart';
import 'package:aku_community/ui/community/community_views/community_page.dart';
import 'package:aku_community/ui/market/market_page.dart';
@ -40,7 +41,7 @@ class _TabNavigatorState extends State<TabNavigator>
_pages = [
HomePage(),
MarketPage(),
PropertyIndex(),
PropertyPage(),//PropertyIndex(),
CommunityPage(),
PersonalIndex()
];

@ -71,21 +71,12 @@ class GoodsCard extends StatelessWidget {
),
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w,
vertical: 10.w,
),
child: Container(
)
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w,
vertical: 10.w,
padding: EdgeInsets.only(
left: 16.w,right: 16.w,
top: 10.w,
),
child: Text(
item.title,
item.title+'98-034789reuyguiuioprguioptuiop348907r789-0re8097grt789rge978-ge',
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
@ -95,20 +86,59 @@ class GoodsCard extends StatelessWidget {
),
),
Padding(
padding: EdgeInsets.only(
left: 16.w,right: 16.w,
top: 10.w,
),
child: Container(
child: _getIcon(1),
)
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.w,
horizontal: 16.w,
),
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: '¥${item.sellingPrice} ',
text: '¥',
style: TextStyle(
color: Colors.red,
fontSize: 28.sp,
),
),
TextSpan(
text: '${item.sellingPrice} ',
style: TextStyle(
color: Colors.red,
fontWeight: FontWeight.bold,
fontSize: 40.sp,
),
),
],
),
),
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.w,
),
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: '原价:¥',
style: TextStyle(
color: ktextSubColor,
fontSize: 20.sp,
),
),
TextSpan(
text: '${item.markingPrice}',
style: TextStyle(
@ -121,11 +151,89 @@ class GoodsCard extends StatelessWidget {
),
),
),
16.hb,
Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.w,
),
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: '折扣:',
style: TextStyle(
color: ktextSubColor,
fontSize: 20.sp,
),
),
TextSpan(
text: '9折',
style: TextStyle(
color: ktextSubColor,
fontSize: 20.sp,
),
),
],
),
),
),
],
),
);
}
Widget _getIcon(int type){
if(type==1){
return Container(
width: 86.w,
height: 26.w,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4.w), ),
gradient: LinearGradient(
begin: FractionalOffset.centerLeft,
end: FractionalOffset.centerRight,
colors: <Color>[Color(0xFFEC5329), Color(0xFFF58123)],
),
),
child: Text(
'京东自营',
style: TextStyle(
fontSize: 18.sp,
color: kForeGroundColor
),
),
);
}
else if(type==2){
return Container(
alignment: Alignment.center,
width: 86.w,
height: 30.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4.w), ),
gradient: LinearGradient(
begin: FractionalOffset.centerLeft,
end: FractionalOffset.centerRight,
colors: <Color>[Color(0xFFF59B1C), Color(0xFFF5AF16)],
),
),
child: Text(
'京东POP',
style: TextStyle(
fontSize: 18.sp,
color: kForeGroundColor
),
),
);
}
else
return SizedBox();
}

@ -268,11 +268,12 @@ class _MarketPageState extends State<MarketPage>
children: [
if (appProvider.location != null)
Padding(
padding:EdgeInsets.only(right: 5.w),
padding:EdgeInsets.only(right: 5.w,top: 5.w),
child: Image.asset(
R.ASSETS_ICONS_SHOP_LOCATION_PNG,
width: 48.w,
height: 48.w,
width: 40.w,
height: 40.w,
fit: BoxFit.fitHeight,
//color: Colors.white,
),
),

Loading…
Cancel
Save