pull/1/head
章文轩 3 years ago
commit 44c5edd85d

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

@ -12,8 +12,6 @@ import 'package:aku_new_community/pages/goods_deto_page/goods_deto_page.dart';
import 'package:aku_new_community/pages/goods_manage_page/select_borrow_return_page.dart'; import 'package:aku_new_community/pages/goods_manage_page/select_borrow_return_page.dart';
import 'package:aku_new_community/pages/house_introduce/house_introduce.dart'; import 'package:aku_new_community/pages/house_introduce/house_introduce.dart';
import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart'; import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_choose_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart'; import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart';
import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart'; import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart'; import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart';
@ -76,8 +74,8 @@ List<AO> appObjects = [
AO('开门码', R.ASSETS_ICONS_FUNC_KMM_PNG, () => OpeningCodePage()), AO('开门码', R.ASSETS_ICONS_FUNC_KMM_PNG, () => OpeningCodePage()),
AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => VisitorAccessPage()), AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => VisitorAccessPage()),
AO('报事报修', R.ASSETS_ICONS_FUNC_BSBX_PNG, () => WorkOrderPage()), AO('报事报修', Assets.home.icBsbx.path, () => WorkOrderPage()),
AO('生活缴费', R.ASSETS_ICONS_FUNC_SHJF_PNG, () => LifePayPageNew()), AO('生活缴费', Assets.home.icShjf.path, () => LifePayPageNew()),
AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()), AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()),
AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG, AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG,
() => AdvicePage(type: AdviceType.SUGGESTION)), () => AdvicePage(type: AdviceType.SUGGESTION)),
@ -90,7 +88,7 @@ List<AO> appObjects = [
AO('装修管理', R.ASSETS_ICONS_FUNC_ZXGL_PNG, () => NewRenovationPage()), AO('装修管理', R.ASSETS_ICONS_FUNC_ZXGL_PNG, () => NewRenovationPage()),
AO('借还管理', R.ASSETS_ICONS_FUNC_JHGL_PNG, () => SelectBorrowReturnPage()), AO('借还管理', R.ASSETS_ICONS_FUNC_JHGL_PNG, () => SelectBorrowReturnPage()),
AO('一键报警', R.ASSETS_ICONS_FUNC_YJBJ_PNG, () => AlarmPage()), AO('一键报警', R.ASSETS_ICONS_FUNC_YJBJ_PNG, () => AlarmPage()),
AO('设施预约', R.ASSETS_ICONS_FUNC_SSYY_PNG, () => FacilityAppointmentPage()), AO('设施预约', Assets.home.icSsyy.path, () => FacilityAppointmentPage()),
AO('快递包裹', R.ASSETS_ICONS_FUNC_KDBG_PNG, () => ExpressPackagePage()), AO('快递包裹', R.ASSETS_ICONS_FUNC_KDBG_PNG, () => ExpressPackagePage()),
AO('电子商务', R.ASSETS_ICONS_FUNC_DZSW_PNG, () => ElectronicCommercPage()), AO('电子商务', R.ASSETS_ICONS_FUNC_DZSW_PNG, () => ElectronicCommercPage()),
AO('服务浏览', R.ASSETS_ICONS_FUNC_FWLL_PNG, () => ServiceBrowsePage()), AO('服务浏览', R.ASSETS_ICONS_FUNC_FWLL_PNG, () => ServiceBrowsePage()),
@ -100,15 +98,15 @@ List<AO> appObjects = [
AO('地理信息', R.ASSETS_ICONS_FUNC_DLXX_PNG, () => GeographicInformationPage()), AO('地理信息', R.ASSETS_ICONS_FUNC_DLXX_PNG, () => GeographicInformationPage()),
AO('周边企业', R.ASSETS_ICONS_FUNC_ZBQY_PNG, () => SurroundingEnterprisesPage()), AO('周边企业', R.ASSETS_ICONS_FUNC_ZBQY_PNG, () => SurroundingEnterprisesPage()),
AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()), AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()),
AO('智慧养老', Assets.icons.provideAged.path, () => OldAgeSupportPageSimple()), AO('智慧养老', Assets.home.icZhyl.path, () => OldAgeSupportPageSimple()),
AO('周边服务', Assets.icons.nearbyService.path, null), AO('周边服务', Assets.home.icZbfw.path, null),
AO('小蜜蜂任务', Assets.icons.beeTask.path, () => TaskPage()), AO('小蜜蜂任务', Assets.home.icRwfb.path, () => TaskPage()),
AO('自营商城', Assets.icons.shoppingMall.path, null), AO('自营商城', Assets.icons.shoppingMall.path, null),
AO('邻家宠物', Assets.icons.nearbyPet.path, null), AO('邻家宠物', Assets.home.icLjcw.path, null),
AO('共享停车', Assets.icons.sharePark.path, null), AO('共享停车', Assets.icons.sharePark.path, null),
AO('二手市场', Assets.icons.secondHandMarket.path, null), AO('二手市场', Assets.icons.secondHandMarket.path, null),
AO('共享投屏', Assets.icons.projectionScreen.path, null), AO('共享投屏', Assets.icons.projectionScreen.path, null),
AO('全部应用', Assets.icons.funcAll.path, () => AllApplicationPage()), AO('全部应用', Assets.home.icQbyy.path, () => AllApplicationPage()),
// AO( // AO(
// '小区教育', // '小区教育',

File diff suppressed because it is too large Load Diff

@ -1,9 +1,8 @@
// Dart imports: // Dart imports:
import 'package:aku_new_community/constants/application_objects.dart'; import 'package:aku_new_community/constants/application_objects.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/extensions/color_ext.dart'; import 'package:aku_new_community/extensions/color_ext.dart';
import 'package:aku_new_community/model/common/img_model.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/home/home_activity_model.dart'; import 'package:aku_new_community/models/home/home_activity_model.dart';
import 'package:aku_new_community/models/home/home_announce_model.dart'; import 'package:aku_new_community/models/home/home_announce_model.dart';
import 'package:aku_new_community/models/home/home_swiper_model.dart'; import 'package:aku_new_community/models/home/home_swiper_model.dart';
@ -12,29 +11,31 @@ import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_new_community/pages/visitor_access_page/visitor_access_page.dart'; import 'package:aku_new_community/pages/visitor_access_page/visitor_access_page.dart';
import 'package:aku_new_community/provider/app_provider.dart'; import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/ui/community/activity/activity_card.dart'; import 'package:aku_new_community/ui/community/activity/activity_card.dart';
import 'package:aku_new_community/ui/community/activity/activity_detail_page.dart';
import 'package:aku_new_community/ui/community/activity/activity_list_page.dart'; import 'package:aku_new_community/ui/community/activity/activity_list_page.dart';
import 'package:aku_new_community/ui/community/community_func.dart'; import 'package:aku_new_community/ui/community/community_func.dart';
import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart';
import 'package:aku_new_community/ui/home/home_notification.dart'; import 'package:aku_new_community/ui/home/home_notification.dart';
import 'package:aku_new_community/ui/home/home_title.dart'; import 'package:aku_new_community/ui/home/home_title.dart';
import 'package:aku_new_community/ui/home/public_infomation/public_information_detail_page.dart';
import 'package:aku_new_community/ui/manager/advice/advice_page.dart'; import 'package:aku_new_community/ui/manager/advice/advice_page.dart';
import 'package:aku_new_community/ui/market/search/good_detail_page.dart'; import 'package:aku_new_community/ui/market/search/good_detail_page.dart';
import 'package:aku_new_community/ui/search/bee_search.dart'; 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/animated/OverlayWidget.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart'; import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/others/rectIndicator.dart'; import 'package:aku_new_community/widget/others/rectIndicator.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/views/bee_gradient_divider.dart';
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:card_swiper/card_swiper.dart'; import 'package:card_swiper/card_swiper.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:jpush_flutter/jpush_flutter.dart'; import 'package:jpush_flutter/jpush_flutter.dart';
import 'package:palette_generator/palette_generator.dart';
import 'package:power_logger/power_logger.dart'; import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -69,7 +70,6 @@ class _HomePageState extends State<HomePage>
List<HomeSwiperModel> _swiperModels = []; List<HomeSwiperModel> _swiperModels = [];
SwiperController _swiperController = SwiperController(); SwiperController _swiperController = SwiperController();
ValueNotifier<Color> _barColor = ValueNotifier(Colors.transparent);
@override @override
void initState() { void initState() {
@ -85,14 +85,6 @@ class _HomePageState extends State<HomePage>
} }
_scrollController = ScrollController(); _scrollController = ScrollController();
_refreshController = EasyRefreshController(); _refreshController = EasyRefreshController();
_swiperController.addListener(() {
//onChangeIndex_currentSwiperIndexindex1+1index;
if (_swiperModels.length <= 1) {
_swiperBarColor(0);
} else {
_swiperBarColor((_currentSwiperIndex + 1) % 3);
}
});
SystemChrome.setSystemUIOverlayStyle( SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent)); SystemUiOverlayStyle(statusBarColor: Colors.transparent));
} }
@ -112,96 +104,93 @@ class _HomePageState extends State<HomePage>
commentCount = appProvider.messageCenterModel.commentCount ?? 0; commentCount = appProvider.messageCenterModel.commentCount ?? 0;
sysCount = appProvider.messageCenterModel.sysCount ?? 0; sysCount = appProvider.messageCenterModel.sysCount ?? 0;
sum = commentCount + sysCount; sum = commentCount + sysCount;
var head = ValueListenableBuilder( var head = Padding(
valueListenable: _barColor, padding: EdgeInsets.only(
builder: (context, Color color, child) { top: MediaQuery.of(context).padding.top + 20.w,
return Container( right: 32.w,
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), left: 32.w,
decoration: BoxDecoration( bottom: 20.w),
border: Border.all(width: 0, color: color), child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
color: color, if (appProvider.location != null)
), Image.asset(
width: double.infinity, Assets.home.icLocation.path,
child: child, width: 48.w,
); height: 48.w,
},
child: Padding(
padding: EdgeInsets.symmetric(vertical: 16.w, horizontal: 16.w),
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
if (appProvider.location != null)
Padding(
padding: const 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,
),
Text(
'(${appProvider.weatherType} ${appProvider.weatherTemp}℃)',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
textAlign: TextAlign.center,
), ),
Spacer(), 16.wb,
GestureDetector( Text(
onTap: () { appProvider.location?['city'] == null
Get.to(() => BeeSearch()); ? ''
}, : appProvider.location?['city'] as String? ?? '',
child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_FIND_PNG, style: TextStyle(
height: 40.w, width: 40.w), fontWeight: FontWeight.w600,
fontSize: 28.sp,
color: Color(0xff333333),
), ),
Padding( textAlign: TextAlign.center,
padding: EdgeInsets.only(right: 16.w, left: 12.w), ),
child: Badge( Text(
elevation: 0, '(${appProvider.weatherType} ${appProvider.weatherTemp}℃)',
badgeColor: Color(0xFFCF2525), style: TextStyle(
padding: sum > 9 ? EdgeInsets.all(2.w) : EdgeInsets.all(5.w), fontSize: 28.sp,
showBadge: appProvider.messageCenterModel.commentCount != 0 || color: Color(0xff999999),
appProvider.messageCenterModel.sysCount != 0,
position: BadgePosition.topEnd(
top: 8.w,
end: -4.w,
),
badgeContent: Text(
(sum > 99 ? 99 : sum).toString(),
style: TextStyle(color: Colors.white, fontSize: 20.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),
)),
), ),
]), textAlign: TextAlign.center,
), ),
Spacer(),
GestureDetector(
onTap: () {
Get.to(() => BeeSearch());
},
child:
Image.asset(Assets.home.icSearch.path, height: 48.w, width: 48.w),
),
20.wb,
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: 8.w,
end: -4.w,
),
badgeContent: Text(
(sum > 99 ? 99 : sum).toString(),
style: TextStyle(color: Colors.white, fontSize: 20.sp),
),
child: GestureDetector(
onTap: () {
if (LoginUtil.isNotLogin) return;
Get.to(() => MessageCenterPage());
},
child: Image.asset(Assets.home.icMessage.path,
height: 48.w, width: 48.w),
)),
]),
); );
return AnnotatedRegion<SystemUiOverlayStyle>( return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.dark, value: SystemUiOverlayStyle.dark,
child: Scaffold( child: Scaffold(
extendBody: true, extendBody: true,
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
body: Stack( backgroundColor: Color(0xFFFDE019),
children: [ appBar: PreferredSize(
EasyRefresh( preferredSize:
Size.fromHeight(MediaQuery.of(context).padding.top + 88.w),
child: head),
body: SafeArea(
child: Container(
height: MediaQuery.of(context).size.height,
decoration: BoxDecoration(
borderRadius:
BorderRadius.vertical(top: Radius.circular(32.w)),
color: Color(0xFFF9F9F9)),
clipBehavior: Clip.antiAliasWithSaveLayer,
child: EasyRefresh(
controller: _refreshController, controller: _refreshController,
header: BeeBallPauseHeader(bgColor: _barColor), header: MaterialHeader(),
firstRefresh: true, firstRefresh: true,
onRefresh: () async { onRefresh: () async {
_activityItemModels = await CommunityFunc.activityList(); _activityItemModels = await CommunityFunc.activityList();
@ -211,132 +200,99 @@ class _HomePageState extends State<HomePage>
setState(() {}); setState(() {});
}, },
child: CustomScrollView( child: CustomScrollView(
shrinkWrap: true,
controller: _scrollController, controller: _scrollController,
slivers: [ slivers: [
SliverToBoxAdapter( SliverToBoxAdapter(
child: Column( child: HomeSwiper(),
mainAxisSize: MainAxisSize.min,
children: [
head,
HomeSwiper(), //
// SizedBox(height: 100.w),
Container(
padding: EdgeInsets.only(top: 24.w, bottom: 32.w),
child: getFunction(), //ApplicationView(),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: const <BoxShadow>[
BoxShadow(
color: Color(0x14000000),
blurRadius: 0,
offset: Offset(0.0, 2.0),
spreadRadius: 0.1)
],
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(28),
bottomRight: Radius.circular(28))),
)
//ApplicationBox(child: ApplicationView()),
],
),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Container( child: Container(
height: 40, margin: EdgeInsets.symmetric(horizontal: 32.w),
margin: EdgeInsets.only( padding:
left: 32.w, right: 32.w, top: 24.w), EdgeInsets.only(top: 20.w, left: 36.w, right: 36.w),
decoration: BoxDecoration( child: _applications(), //ApplicationView(),
color: Colors.white, decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8)), color: Colors.white,
boxShadow: const <BoxShadow>[ borderRadius: BorderRadius.circular(16.w),
BoxShadow( ),
color: Color(0x14000000), ),
blurRadius: 4,
spreadRadius: 0.5)
],
),
child: HomeNotification(items: _boardItemModels)),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Row( child: Container(
mainAxisAlignment: MainAxisAlignment.center, width: 686.w,
children: [ height: 320.w,
GestureDetector( clipBehavior: Clip.antiAliasWithSaveLayer,
child: Container( decoration: BoxDecoration(
margin: EdgeInsets.only(top: 24.w), color: Colors.white,
padding: EdgeInsets.only(left: 32.w, top: 24.w), borderRadius: BorderRadius.circular(16.w)),
width: 140, margin: EdgeInsets.all(32.w),
height: 150, child: Row(
decoration: BoxDecoration( children: [
image: DecorationImage( Expanded(
fit: BoxFit.fill, flex: 1,
image: child: GestureDetector(
AssetImage(R.ASSETS_IMAGES_CARD_YELLOW_PNG), child: Container(
)), padding:
child: Column( EdgeInsets.only(left: 34.w, top: 40.w),
crossAxisAlignment: CrossAxisAlignment.start, decoration: BoxDecoration(
children: [ borderRadius: BorderRadius.circular(16.w),
Text( image: DecorationImage(
'访客邀请', fit: BoxFit.fill,
style: TextStyle( image: AssetImage(
color: Color(0xD9000000), Assets.home.imgFkyq.path),
fontSize: 26.sp, )),
fontWeight: FontWeight.bold), child: Column(
), crossAxisAlignment:
10.hb, CrossAxisAlignment.start,
Text( children: [
'一键分享', Text(
style: TextStyle( '访客邀请',
color: Color(0x73000000), style: TextStyle(
fontSize: 20.sp, color: Color(0xD9000000),
), fontSize: 26.sp,
), fontWeight: FontWeight.bold),
Text( ),
'让拜访不再是难事', 10.hb,
style: TextStyle( Text(
color: Color(0x73000000), '让拜访更加便捷',
fontSize: 20.sp, style: TextStyle(
), color: Color(0x73000000),
), fontSize: 20.sp,
Spacer(), ),
Image.asset( ),
R.ASSETS_ICONS_ICON_MAIN_INVITE_PNG, ],
width: 100.w,
height: 100.w,
), ),
30.hb, ),
], onTap: () {
Get.to(() => VisitorAccessPage());
},
), ),
), ),
onTap: () { BeeGradientDivider.vertical(),
Get.to(VisitorAccessPage()); Expanded(
}, flex: 2,
), child: Column(
25.wb, children: [
Container( Expanded(
margin: EdgeInsets.only(top: 24.w), flex: 1,
child: Column( child: GestureDetector(
children: [ child: Container(
GestureDetector( width: double.infinity,
child: Container( decoration: BoxDecoration(
width: 190, borderRadius:
height: 69, BorderRadius.circular(16.w),
decoration: BoxDecoration( image: DecorationImage(
image: DecorationImage( fit: BoxFit.cover,
fit: BoxFit.fill, image: AssetImage(
image: AssetImage( Assets.home.imgYjbj.path),
R.ASSETS_IMAGES_CARD_PINK_PNG), )),
)), padding: EdgeInsets.only(
child: Row( left: 32.w, top: 40.w),
mainAxisAlignment: child: Column(
MainAxisAlignment.start,
children: [
20.wb,
Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
20.hb,
Text( Text(
'一键报警', '一键报警',
style: TextStyle( style: TextStyle(
@ -354,41 +310,32 @@ class _HomePageState extends State<HomePage>
), ),
], ],
), ),
Spacer(), ),
Image.asset( onTap: () {
R.ASSETS_ICONS_ICON_MAIN_POLICE_PNG, Get.to(() => AlarmPage());
width: 98.w, },
height: 98.w,
),
20.wb,
],
), ),
), ),
onTap: () { BeeGradientDivider.horizontal(),
Get.to(AlarmPage()); Expanded(
}, flex: 1,
), child: GestureDetector(
GestureDetector( child: Container(
child: Container( padding: EdgeInsets.only(
margin: EdgeInsets.only(top: 20.w), top: 40.w, left: 32.w),
width: 190, width: double.infinity,
height: 69, decoration: BoxDecoration(
decoration: BoxDecoration( borderRadius:
image: DecorationImage( BorderRadius.circular(16.w),
fit: BoxFit.fill, image: DecorationImage(
image: AssetImage( fit: BoxFit.cover,
R.ASSETS_IMAGES_CARD_BLUE_PNG), image: AssetImage(
)), Assets.home.imgJyzx.path),
child: Row( )),
mainAxisAlignment: child: Column(
MainAxisAlignment.start,
children: [
20.wb,
Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
20.hb,
Text( Text(
'建议咨询', '建议咨询',
style: TextStyle( style: TextStyle(
@ -406,25 +353,18 @@ class _HomePageState extends State<HomePage>
), ),
], ],
), ),
Spacer(), ),
Image.asset( onTap: () {
R.ASSETS_ICONS_ICON_MAIN_CONSULT_PNG, Get.to(AdvicePage(
width: 98.w, type: AdviceType.SUGGESTION));
height: 98.w, },
),
20.wb,
],
), ),
), )
onTap: () { ],
Get.to(AdvicePage( ),
type: AdviceType.SUGGESTION)); )
}, ],
) ),
],
),
)
],
), ),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
@ -470,8 +410,7 @@ class _HomePageState extends State<HomePage>
], ],
), ),
), ),
OverlayLivingBtnWidget() ),
],
), ),
)); ));
} }
@ -479,48 +418,46 @@ class _HomePageState extends State<HomePage>
Widget HomeSwiper() { Widget HomeSwiper() {
return Container( return Container(
width: double.infinity, width: double.infinity,
height: 320.w, clipBehavior: Clip.antiAlias,
decoration: margin: EdgeInsets.all(32.w),
BoxDecoration(border: Border.all(width: 0, color: _barColor.value)), height: 248.w,
child: AspectRatio( decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.w)),
aspectRatio: 375 / 160, child: Swiper(
child: Swiper( key: UniqueKey(),
key: UniqueKey(), controller: _swiperController,
controller: _swiperController, onIndexChanged: (index) async {
onIndexChanged: (index) async { _currentSwiperIndex = index;
_currentSwiperIndex = index; },
}, itemBuilder: (BuildContext context, int index) {
itemBuilder: (BuildContext context, int index) { return getSwiperImage(_swiperModels[index]);
return getSwiperImage(_swiperModels[index]); },
},
pagination: SwiperPagination( pagination: SwiperPagination(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
builder: SwiperCustomPagination( builder: SwiperCustomPagination(
builder: (BuildContext context, SwiperPluginConfig config) { builder: (BuildContext context, SwiperPluginConfig config) {
return RectIndicator( return RectIndicator(
position: config.activeIndex, position: config.activeIndex,
count: _swiperModels.length, count: _swiperModels.length,
activeColor: Color(0x99FFFFFF), activeColor: Color(0x99FFFFFF),
color: Color(0xD9FFFFFF), color: Color(0xD9FFFFFF),
// keyColor // keyColor
width: 4, width: 4,
// //
activeWidth: 14, activeWidth: 14,
// //
radius: 4, radius: 4,
// //
height: 4, height: 4,
); // ); //
})), })),
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
// control: new SwiperControl(), // control: new SwiperControl(),
autoplay: true, autoplay: true,
onTap: (index) { onTap: (index) {
swiperNavigate(_swiperModels[index]); swiperNavigate(_swiperModels[index]);
}, },
itemCount: _swiperModels.length, itemCount: _swiperModels.length,
),
), ),
); );
} }
@ -531,41 +468,49 @@ class _HomePageState extends State<HomePage>
launch(model.customizeUrl ?? ''); launch(model.customizeUrl ?? '');
break; break;
case 2: case 2:
Get.to(GoodDetailPage(goodId: model.id)); model.associationId == null
? null
: Get.to(() => GoodDetailPage(
goodId: model.associationId!,
));
break; break;
case 3: case 3:
// Get.to(page) model.associationId == null
? null
: Get.to(() => PublicInformationDetailPage(
id: model.associationId!,
));
break; break;
case 4: case 4:
model.associationId == null
? null
: Get.to(() => NoticeDetailPage(
id: model.associationId!,
));
break; break;
case 5: case 5:
model.associationId == null
? null
: Get.to(() => ActivityDetailPage(
id: model.associationId!,
));
break; break;
default: default:
BotToast.showText(text: '类型错误'); () {};
}
}
Future _swiperBarColor(int index) async {
if (_swiperModels.isNotEmpty) {
var color =
await PaletteGenerator.fromImageProvider(CachedNetworkImageProvider(
SAASAPI.image(ImgModel.first(_swiperModels[index].imgList)),
));
_barColor.value = color.dominantColor?.color ?? Colors.transparent;
} else {
_barColor.value = Colors.transparent;
} }
} }
Widget getSwiperImage(HomeSwiperModel swiperModel) { Widget getSwiperImage(HomeSwiperModel swiperModel) {
return Container( return Container(
clipBehavior: Clip.antiAliasWithSaveLayer,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.w)),
child: BeeImageNetwork( child: BeeImageNetwork(
imgs: swiperModel.imgList ?? [], imgs: swiperModel.imgList ?? [],
), ),
); );
} }
Widget getFunction() { Widget _applications() {
return Column( return Column(
children: [ children: [
Row( Row(
@ -578,7 +523,7 @@ class _HomePageState extends State<HomePage>
getFunctionBtn(AO.fromRaw('智慧养老')), getFunctionBtn(AO.fromRaw('智慧养老')),
], ],
), ),
32.hb, 24.hb,
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -589,34 +534,41 @@ class _HomePageState extends State<HomePage>
getFunctionBtn(AO.fromRaw('全部应用')), getFunctionBtn(AO.fromRaw('全部应用')),
], ],
), ),
44.hb,
BeeDivider.horizontal(),
10.hb,
HomeNotification(items: _boardItemModels),
10.hb,
], ],
); );
} }
Widget getFunctionBtn(AO ao) { Widget getFunctionBtn(AO ao) {
return MaterialButton( return Expanded(
shape: StadiumBorder(), flex: 1,
padding: EdgeInsets.zero, child: GestureDetector(
onPressed: () { onTap: () {
if (LoginUtil.isNotLogin) return; if (LoginUtil.isNotLogin) return;
// if (!LoginUtil.haveRoom(ao.title)) return; // if (!LoginUtil.haveRoom(ao.title)) return;
if (ao.page == null) { if (ao.page == null) {
BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5)); BotToast.showText(
} else { text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));
Get.to(ao.page); } else {
} Get.to(ao.page);
}, }
child: Column( },
mainAxisAlignment: MainAxisAlignment.center, child: Column(
children: [ mainAxisAlignment: MainAxisAlignment.center,
Image.asset( children: [
ao.path, Image.asset(
height: 80.w, ao.path,
width: 80.w, height: 96.w,
), width: 96.w,
16.hb, ),
ao.title.text.size(22.sp).color(Color(0xA6000000)).bold.make(), 8.hb,
], ao.title.text.size(24.sp).color(Color(0xFF333333)).make(),
],
),
), ),
); );
} }

@ -60,7 +60,7 @@ class UserProvider extends ChangeNotifier {
_token = null; _token = null;
_userInfoModel = null; _userInfoModel = null;
_myHouses = []; _myHouses = [];
NetUtil().get(SAASAPI.login.logOut, showMessage: true); NetUtil().post(SAASAPI.login.logOut, showMessage: true);
NetUtil().dio!.options.headers.remove('app-login-token'); NetUtil().dio!.options.headers.remove('app-login-token');
HiveStore.appBox!.delete('token'); HiveStore.appBox!.delete('token');
HiveStore.appBox!.delete('login'); HiveStore.appBox!.delete('login');

@ -26,12 +26,10 @@ import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.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';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class CommunityPage extends StatefulWidget { class CommunityPage extends StatefulWidget {
@ -295,7 +293,7 @@ class _CommunityPageState extends State<CommunityPage>
var result = var result =
await Get.to(() => PublicInformationDetailPage(id: item.id)); await Get.to(() => PublicInformationDetailPage(id: item.id));
CommunityFunc.addViews(item.id); CommunityFunc.addViews(item.id);
if (result) { if (result != null && result) {
_easyRefreshController.callRefresh(); _easyRefreshController.callRefresh();
} }
}, },

@ -1,3 +1,4 @@
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/home/home_announce_model.dart'; import 'package:aku_new_community/models/home/home_announce_model.dart';
import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart'; import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart';
import 'package:aku_new_community/utils/bee_date_util.dart'; import 'package:aku_new_community/utils/bee_date_util.dart';
@ -35,11 +36,7 @@ class _HomeNotificationState extends State<HomeNotification> {
return Row( return Row(
children: [ children: [
24.wb, 24.wb,
Image.asset( Assets.home.icGonggao.image(width: 48.w, height: 48.w),
R.ASSETS_IMAGES_NOTICE_PNG,
height: 45.w,
width: 61.w,
),
24.wb, 24.wb,
widget.items.isEmpty widget.items.isEmpty
? Spacer() ? Spacer()
@ -48,7 +45,7 @@ class _HomeNotificationState extends State<HomeNotification> {
options: CarouselOptions( options: CarouselOptions(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
viewportFraction: 1.0, viewportFraction: 1.0,
aspectRatio: 300 / 40, aspectRatio: 343 / 44,
autoPlay: true, autoPlay: true,
onPageChanged: (index, _) { onPageChanged: (index, _) {
//print(index.toString()); //print(index.toString());
@ -77,9 +74,8 @@ class _HomeNotificationState extends State<HomeNotification> {
child: Text( child: Text(
e.title, e.title,
style: TextStyle( style: TextStyle(
color: Color(0xA6000000), color: Color(0xFF333333),
fontSize: 22.sp, fontSize: 24.sp,
fontWeight: FontWeight.bold,
), ),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@ -89,14 +85,14 @@ class _HomeNotificationState extends State<HomeNotification> {
child: Text( child: Text(
BeeDateUtil(DateUtil.getDateTime(e.createDate)).timeAgo, BeeDateUtil(DateUtil.getDateTime(e.createDate)).timeAgo,
style: TextStyle( style: TextStyle(
color: Color(0x73000000), color: Color(0xFF999999),
fontSize: 20.sp, fontSize: 24.sp,
), ),
)), )),
8.wb, 8.wb,
Icon( Icon(
CupertinoIcons.chevron_forward, CupertinoIcons.chevron_forward,
size: 24.w, size: 32.w,
color: Color(0xFF999999), color: Color(0xFF999999),
), ),
], ],

@ -93,12 +93,10 @@ class _MyHousePageState extends State<MyHousePage> {
children: [ children: [
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
print(model.id);
var base = await NetUtil().get( var base = await NetUtil().get(
SAASAPI.profile.house.switchDefaultEstate, SAASAPI.profile.house.switchDefaultEstate,
params: {'estateId': model.id}); params: {'estateId': model.id});
if (base.success) { if (base.success) {
await UserTool.userProvider.updateMyHouseInfo();
_refreshController.callRefresh(); _refreshController.callRefresh();
} else { } else {
BotToast.showText(text: '切换默认房屋失败'); BotToast.showText(text: '切换默认房屋失败');

@ -0,0 +1,54 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class BeeGradientDivider extends StatelessWidget {
final Axis direction;
final double? thin;
final double? length;
final List<Color> colors;
const BeeGradientDivider(
{Key? key,
required this.direction,
required this.thin,
required this.length,
required this.colors})
: super(key: key);
const BeeGradientDivider.horizontal({
Key? key,
this.thin,
this.length,
this.colors = const [Colors.white, Color(0xFFE8E8E8), Colors.white],
}) : this.direction = Axis.horizontal,
super(key: key);
const BeeGradientDivider.vertical({
Key? key,
this.thin,
this.length,
this.colors = const [Colors.white, Color(0xFFE8E8E8), Colors.white],
}) : this.direction = Axis.vertical,
super(key: key);
double get dLength => this.length ?? double.infinity;
double get dThin => this.thin ?? 1.w;
@override
Widget build(BuildContext context) {
return Container(
width: direction == Axis.horizontal ? dLength : dThin,
height: direction == Axis.vertical ? dLength : dThin,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: direction == Axis.horizontal
? Alignment.centerLeft
: Alignment.topCenter,
end: direction == Axis.horizontal
? Alignment.centerRight
: Alignment.bottomCenter,
colors: colors)),
);
}
}

@ -359,7 +359,7 @@ packages:
name: dio name: dio
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "4.0.4" version: "4.0.6"
dotted_border: dotted_border:
dependency: "direct main" dependency: "direct main"
description: description:
@ -518,21 +518,21 @@ packages:
name: flutter_sound name: flutter_sound
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "9.1.7" version: "9.1.9"
flutter_sound_platform_interface: flutter_sound_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: flutter_sound_platform_interface name: flutter_sound_platform_interface
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "9.1.7" version: "9.1.9"
flutter_sound_web: flutter_sound_web:
dependency: transitive dependency: transitive
description: description:
name: flutter_sound_web name: flutter_sound_web
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "9.1.7" version: "9.1.9"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -549,7 +549,7 @@ packages:
name: fluwx name: fluwx
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.8.1+1" version: "3.8.2"
frontend_server_client: frontend_server_client:
dependency: transitive dependency: transitive
description: description:
@ -696,7 +696,7 @@ packages:
name: jpush_flutter name: jpush_flutter
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.2.3" version: "2.2.4"
js: js:
dependency: transitive dependency: transitive
description: description:
@ -865,13 +865,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.0.4" version: "1.0.4"
palette_generator:
dependency: "direct main"
description:
name: palette_generator
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.3"
path: path:
dependency: transitive dependency: transitive
description: description:
@ -1375,7 +1368,7 @@ packages:
name: win32 name: win32
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.5.0" version: "2.5.1"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:

@ -114,8 +114,8 @@ dependencies:
scroll_to_index: ^2.1.1 scroll_to_index: ^2.1.1
#验证码自动填充 #验证码自动填充
sms_autofill: ^2.2.0 sms_autofill: ^2.2.0
#提取图片主色 # #提取图片主色
palette_generator: ^0.3.2 # palette_generator: ^0.3.2
#音频播放 #音频播放
just_audio: ^0.9.20 just_audio: ^0.9.20
#录音 #录音
@ -152,6 +152,7 @@ flutter:
- assets/static/ - assets/static/
- assets/json/ - assets/json/
- assets/bracelet/ - assets/bracelet/
- assets/home/
import_sorter: import_sorter:
emojis: true emojis: true

Loading…
Cancel
Save