社区物业页面更新

hmxc
章文轩 3 years ago
parent 46eb53711f
commit cd783e14e3

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

@ -221,6 +221,78 @@ class R {
static const String ASSETS_ICONS_FIRE_ALARM_PNG = static const String ASSETS_ICONS_FIRE_ALARM_PNG =
'assets/icons/fire_alarm.png'; 'assets/icons/fire_alarm.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_bmdh.png)
static const String ASSETS_ICONS_FUNC_BMDH_PNG = 'assets/icons/func_bmdh.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_bsbx.png)
static const String ASSETS_ICONS_FUNC_BSBX_PNG = 'assets/icons/func_bsbx.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_dlxx.png)
static const String ASSETS_ICONS_FUNC_DLXX_PNG = 'assets/icons/func_dlxx.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_dzsw.png)
static const String ASSETS_ICONS_FUNC_DZSW_PNG = 'assets/icons/func_dzsw.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_fkyq.png)
static const String ASSETS_ICONS_FUNC_FKYQ_PNG = 'assets/icons/func_fkyq.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_fwll.png)
static const String ASSETS_ICONS_FUNC_FWLL_PNG = 'assets/icons/func_fwll.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_gife.png)
static const String ASSETS_ICONS_FUNC_GIFE_PNG = 'assets/icons/func_gife.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_hdtp.png)
static const String ASSETS_ICONS_FUNC_HDTP_PNG = 'assets/icons/func_hdtp.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_jhgl.png)
static const String ASSETS_ICONS_FUNC_JHGL_PNG = 'assets/icons/func_jhgl.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_jyzx.png)
static const String ASSETS_ICONS_FUNC_JYZX_PNG = 'assets/icons/func_jyzx.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_jzfw.png)
static const String ASSETS_ICONS_FUNC_JZFW_PNG = 'assets/icons/func_jzfw.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_kdbg.png)
static const String ASSETS_ICONS_FUNC_KDBG_PNG = 'assets/icons/func_kdbg.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_kmm.png)
static const String ASSETS_ICONS_FUNC_KMM_PNG = 'assets/icons/func_kmm.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_shjf.png)
static const String ASSETS_ICONS_FUNC_SHJF_PNG = 'assets/icons/func_shjf.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_sqjs.png)
static const String ASSETS_ICONS_FUNC_SQJS_PNG = 'assets/icons/func_sqjs.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_ssyy.png)
static const String ASSETS_ICONS_FUNC_SSYY_PNG = 'assets/icons/func_ssyy.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_tsby.png)
static const String ASSETS_ICONS_FUNC_TSBY_PNG = 'assets/icons/func_tsby.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_wjdc.png)
static const String ASSETS_ICONS_FUNC_WJDC_PNG = 'assets/icons/func_wjdc.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_wpch.png)
static const String ASSETS_ICONS_FUNC_WPCH_PNG = 'assets/icons/func_wpch.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_yjbj.png)
static const String ASSETS_ICONS_FUNC_YJBJ_PNG = 'assets/icons/func_yjbj.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_ywh.png)
static const String ASSETS_ICONS_FUNC_YWH_PNG = 'assets/icons/func_ywh.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_zbqy.png)
static const String ASSETS_ICONS_FUNC_ZBQY_PNG = 'assets/icons/func_zbqy.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_zfsm.png)
static const String ASSETS_ICONS_FUNC_ZFSM_PNG = 'assets/icons/func_zfsm.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/func_zxgl.png)
static const String ASSETS_ICONS_FUNC_ZXGL_PNG = 'assets/icons/func_zxgl.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/goods_borrow.png) /// ![preview](file:///Users/datang/aku_community/assets/icons/goods_borrow.png)
static const String ASSETS_ICONS_GOODS_BORROW_PNG = static const String ASSETS_ICONS_GOODS_BORROW_PNG =
'assets/icons/goods_borrow.png'; 'assets/icons/goods_borrow.png';
@ -251,6 +323,10 @@ class R {
static const String ASSETS_ICONS_ICON_CHANGE_LIST_PNG = static const String ASSETS_ICONS_ICON_CHANGE_LIST_PNG =
'assets/icons/icon_change_list.png'; 'assets/icons/icon_change_list.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_community_push.png)
static const String ASSETS_ICONS_ICON_COMMUNITY_PUSH_PNG =
'assets/icons/icon_community_push.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_favor_choose.png) /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_favor_choose.png)
static const String ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG = static const String ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG =
'assets/icons/icon_favor_choose.png'; 'assets/icons/icon_favor_choose.png';
@ -302,6 +378,30 @@ class R {
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_more.png) /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_more.png)
static const String ASSETS_ICONS_ICON_MORE_PNG = 'assets/icons/icon_more.png'; static const String ASSETS_ICONS_ICON_MORE_PNG = 'assets/icons/icon_more.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_car.png)
static const String ASSETS_ICONS_ICON_MY_CAR_PNG =
'assets/icons/icon_my_car.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_carSeat.png)
static const String ASSETS_ICONS_ICON_MY_CARSEAT_PNG =
'assets/icons/icon_my_carSeat.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_house.png)
static const String ASSETS_ICONS_ICON_MY_HOUSE_PNG =
'assets/icons/icon_my_house.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_location.png)
static const String ASSETS_ICONS_ICON_MY_LOCATION_PNG =
'assets/icons/icon_my_location.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_setting.png)
static const String ASSETS_ICONS_ICON_MY_SETTING_PNG =
'assets/icons/icon_my_setting.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_my_visitor.png)
static const String ASSETS_ICONS_ICON_MY_VISITOR_PNG =
'assets/icons/icon_my_visitor.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_notification.png) /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_notification.png)
static const String ASSETS_ICONS_ICON_NOTIFICATION_PNG = static const String ASSETS_ICONS_ICON_NOTIFICATION_PNG =
'assets/icons/icon_notification.png'; 'assets/icons/icon_notification.png';
@ -310,6 +410,18 @@ class R {
static const String ASSETS_ICONS_ICON_PRICE_PNG = static const String ASSETS_ICONS_ICON_PRICE_PNG =
'assets/icons/icon_price.png'; 'assets/icons/icon_price.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_property_location.png)
static const String ASSETS_ICONS_ICON_PROPERTY_LOCATION_PNG =
'assets/icons/icon_property_location.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_property_message.png)
static const String ASSETS_ICONS_ICON_PROPERTY_MESSAGE_PNG =
'assets/icons/icon_property_message.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_property_search.png)
static const String ASSETS_ICONS_ICON_PROPERTY_SEARCH_PNG =
'assets/icons/icon_property_search.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_setting.png) /// ![preview](file:///Users/datang/aku_community/assets/icons/icon_setting.png)
static const String ASSETS_ICONS_ICON_SETTING_PNG = static const String ASSETS_ICONS_ICON_SETTING_PNG =
'assets/icons/icon_setting.png'; 'assets/icons/icon_setting.png';

@ -325,6 +325,10 @@ class _Manager {
String get surroundingEnterprises => String get surroundingEnterprises =>
'/user/surroundingEnterprises/list'; '/user/surroundingEnterprises/list';
///+
String get findUnpaidAmount =>
'/user/dailyPayment/findUnpaidAmount';
} }
class _Community { class _Community {
@ -376,6 +380,27 @@ class _Community {
/// ///
String get getSwiper => '/user/news/findNewsRotation'; String get getSwiper => '/user/news/findNewsRotation';
///
String get findHotNews => '/user/news/findHotNews';
///
String get addViews => '/user/news/addViews';
///
String get getGambitList => '/user/gambit/list';
///
String get gambitThemeDetail => '/user/gambit/GambitThemeDetail';
///()
String get listGambit => '/user/gambit/listGambit';
///
String get listByGambitId => '/user/gambit/listByGambitId';
} }
class _Market { class _Market {

@ -70,34 +70,34 @@ class AO {
List<AO> appObjects = [ List<AO> appObjects = [
// if (false) AO('一键开门', R.ASSETS_APPLICATIONS_OEPN_DOOR_PNG, () => Scaffold()), // if (false) AO('一键开门', R.ASSETS_APPLICATIONS_OEPN_DOOR_PNG, () => Scaffold()),
AO('开门码', R.ASSETS_APPLICATIONS_DOOR_CODE_PNG, () => OpeningCodePage()), AO('开门码', R.ASSETS_ICONS_FUNC_KMM_PNG, () => OpeningCodePage()),
AO('访客邀请', R.ASSETS_APPLICATIONS_VISITOR_INVITE_PNG, AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG,
() => VisitorAccessPage()), () => VisitorAccessPage()),
AO('报事报修', R.ASSETS_APPLICATIONS_FIX_PNG, () => FixedSubmitPage()), AO('报事报修', R.ASSETS_ICONS_FUNC_BSBX_PNG, () => FixedSubmitPage()),
AO('生活缴费', R.ASSETS_APPLICATIONS_PAYMENT_PNG, () => LifePayChoosePage()), AO('生活缴费', R.ASSETS_ICONS_FUNC_SHJF_PNG, () => LifePayChoosePage()),
AO('业委会', R.ASSETS_APPLICATIONS_COMMITTEE_PNG, () => IndustryCommitteePage()), AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()),
AO('建议咨询', R.ASSETS_APPLICATIONS_ADVICE_PNG, AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG,
() => AdvicePage(type: AdviceType.SUGGESTION)), () => AdvicePage(type: AdviceType.SUGGESTION)),
AO('便民电话', R.ASSETS_APPLICATIONS_COMMUNITY_PHONE_PNG, AO('便民电话', R.ASSETS_ICONS_FUNC_BMDH_PNG,
() => ConvenientPhonePage()), () => ConvenientPhonePage()),
AO('活动投票', R.ASSETS_APPLICATIONS_VOTE_PNG, () => EventVotingPage()), AO('活动投票', R.ASSETS_ICONS_FUNC_HDTP_PNG, () => EventVotingPage()),
AO('物品出门', R.ASSETS_APPLICATIONS_GOODS_OUT_PNG, () => GoodsDetoPage()), AO('物品出门', R.ASSETS_ICONS_FUNC_WPCH_PNG, () => GoodsDetoPage()),
AO('投诉表扬', R.ASSETS_APPLICATIONS_COMPLAINT_PNG, AO('投诉表扬', R.ASSETS_ICONS_FUNC_TSBY_PNG,
() => AdvicePage(type: AdviceType.COMPLAIN)), () => AdvicePage(type: AdviceType.COMPLAIN)),
AO('问卷调查', R.ASSETS_APPLICATIONS_QUESTION_PNG, () => QuestionnairePage()), AO('问卷调查', R.ASSETS_ICONS_FUNC_WJDC_PNG, () => QuestionnairePage()),
AO('装修管理', R.ASSETS_APPLICATIONS_DECORATION_PNG, () => NewRenovationPage()), AO('装修管理', R.ASSETS_ICONS_FUNC_ZXGL_PNG, () => NewRenovationPage()),
AO('借还管理', R.ASSETS_APPLICATIONS_BORROW_PNG, () => SelectBorrowReturnPage()), AO('借还管理', R.ASSETS_ICONS_FUNC_JHGL_PNG, () => SelectBorrowReturnPage()),
AO('一键报警', R.ASSETS_APPLICATIONS_POLICE_PNG, () => AlarmPage()), AO('一键报警', R.ASSETS_ICONS_FUNC_YJBJ_PNG, () => AlarmPage()),
AO('设施预约', R.ASSETS_ICONS_TOOL_FACILITY_PNG, () => FacilityAppointmentPage()), AO('设施预约', R.ASSETS_ICONS_FUNC_SSYY_PNG, () => FacilityAppointmentPage()),
AO('快递包裹', R.ASSETS_APPLICATIONS_TRANSFER_PNG, () => ExpressPackagePage()), AO('快递包裹', R.ASSETS_ICONS_FUNC_KDBG_PNG, () => ExpressPackagePage()),
AO('电子商务', R.ASSETS_ICONS_COMMERC_PNG, () => ElectronicCommercPage()), AO('电子商务', R.ASSETS_ICONS_FUNC_DZSW_PNG, () => ElectronicCommercPage()),
AO('服务浏览', R.ASSETS_ICONS_SERVICE_PNG, () => ServiceBrowsePage()), AO('服务浏览', R.ASSETS_ICONS_FUNC_FWLL_PNG, () => ServiceBrowsePage()),
AO('社区介绍', R.ASSETS_ICONS_INTRODUCE_PNG, () => CommunityIntroducePage()), AO('社区介绍', R.ASSETS_ICONS_FUNC_SQJS_PNG, () => CommunityIntroducePage()),
AO('家政服务', R.ASSETS_ICONS_HOUSE_KEEPING_PNG, () => HouseKeepingPage()), AO('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()),
AO('地理信息', R.ASSETS_ICONS_INTRODUCE_PNG, () => GeographicInformationPage()), AO('地理信息', R.ASSETS_ICONS_FUNC_DLXX_PNG, () => GeographicInformationPage()),
AO('周边企业', R.ASSETS_ICONS_HOUSE_KEEPING_PNG, () => SurroundingEnterprisesPage()), AO('周边企业', R.ASSETS_ICONS_FUNC_ZBQY_PNG, () => SurroundingEnterprisesPage()),
AO('住房说明', R.ASSETS_ICONS_INTRODUCE_PNG, () => HouseIntroducePage()), AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()),
// AO( // AO(
// '小区教育', // '小区教育',
@ -235,11 +235,14 @@ List<String> _residentLifeApp = [
'便民电话', '便民电话',
'问卷调查', '问卷调查',
'建议咨询', '建议咨询',
'活动投票',
'设施预约', '设施预约',
'借还管理', '借还管理',
'业委会', '业委会',
'快递包裹', '快递包裹',
'投诉表扬',
'活动投票',
'地理信息',
'周边企业',
]; ];
/// ///

@ -0,0 +1,46 @@
import 'package:aku_community/model/common/img_model.dart';
class GambitModel {
int? id;
String? title;
String? summary;
String? content;
List<ImgModel>? imgUrl;
int? activityNum;
GambitModel(
{this.id,
this.title,
this.summary,
this.content,
this.imgUrl,
this.activityNum});
GambitModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
summary = json['summary'];
content = json['content'];
if (json['imgUrl'] != null) {
imgUrl = [];
json['imgUrl'].forEach((v) {
imgUrl!.add(new ImgModel.fromJson(v));
});
} else
imgUrl = [];
activityNum = json['activityNum'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['summary'] = this.summary;
data['content'] = this.content;
if (this.imgUrl != null) {
data['imgUrl'] = this.imgUrl!.map((v) => v.toJson()).toList();
}
data['activityNum'] = this.activityNum;
return data;
}
}

@ -0,0 +1,38 @@
import 'package:aku_community/model/common/img_model.dart';
class HotNewsModel {
int? id;
String? title;
String? createDate;
int? views;
List<ImgModel>? imgList;
HotNewsModel(
{this.id, this.title, this.createDate, this.views, this.imgList});
HotNewsModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
createDate = json['createDate'];
views = json['views'];
if (json['imgList'] != null) {
imgList = [];
json['imgList'].forEach((v) {
imgList!.add(new ImgModel.fromJson(v));
});
} else
imgList = [];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['createDate'] = this.createDate;
data['views'] = this.views;
if (this.imgList != null) {
data['imgList'] = this.imgList!.map((v) => v.toJson()).toList();
}
return data;
}
}

@ -51,12 +51,12 @@ class _PersonalIndexState extends State<PersonalIndex>
right: 0, right: 0,
bottom: 0, bottom: 0,
child: Container( child: Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
image: DecorationImage( // image: DecorationImage(
image: AssetImage(R.ASSETS_IMAGES_MINE_BG_PNG), // image: AssetImage(R.ASSETS_ICONS_ICON_MY_SETTING_PNG),
fit: BoxFit.cover, // fit: BoxFit.cover,
), // ),
), // ),
child: Column( child: Column(
children: [ children: [
Spacer(), Spacer(),
@ -403,10 +403,10 @@ class _PersonalIndexState extends State<PersonalIndex>
width: 72.w, width: 72.w,
height: 40.w, height: 40.w,
alignment: Alignment.center, alignment: Alignment.center,
child: Image.asset(R.ASSETS_ICONS_ICON_SETTING_PNG,width: 40.w,height: 40.w), child: Image.asset(R.ASSETS_ICONS_ICON_MY_SETTING_PNG,width: 40.w,height: 40.w),
), ),
), ),
// 32.wb, 24.wb,
], ],
), ),
@ -586,15 +586,18 @@ class _PersonalIndexState extends State<PersonalIndex>
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
_function('我的房屋', R.ASSETS_ICONS_USER_ICON_WDFW_PNG, () => HouseOwnersPage( _function('我的房屋', R.ASSETS_ICONS_ICON_MY_HOUSE_PNG, () => HouseOwnersPage(
identify: UserTool.userProvider.userDetailModel!.type ?? 4, identify: UserTool.userProvider.userDetailModel!.type ?? 4,
),userProvider.userDetailModel!.estateNames?[0]??'',), ),userProvider.userDetailModel!.estateNames!.isEmpty?'': userProvider.userDetailModel!.estateNames?[0]??'',),
36.hb, 36.hb,
_function('我的车位', R.ASSETS_ICONS_USER_ICON_WDCW_PNG, () => CarParkingPage(),'B区N392号'), _function('我的车位', R.ASSETS_ICONS_ICON_MY_CARSEAT_PNG, () => CarParkingPage(),''),
36.hb, 36.hb,
_function('我的车', R.ASSETS_ICONS_USER_ICON_WDC_PNG, () => CarManagePage(),'浙999999'), _function('我的车', R.ASSETS_ICONS_ICON_MY_CAR_PNG, () => CarManagePage(),''),
36.hb, 36.hb,
_myVisitor() _function('我的访客', R.ASSETS_ICONS_ICON_MY_VISITOR_PNG, () => CarManagePage(),''),
36.hb,
_function('收获地址设置', R.ASSETS_ICONS_ICON_MY_LOCATION_PNG, () => CarManagePage(),''),
// //
// ApplicationView.custom( // ApplicationView.custom(
// items: userAppObjects, // items: userAppObjects,
@ -641,7 +644,11 @@ class _PersonalIndexState extends State<PersonalIndex>
} }
_function( String title ,String path,dynamic page ,String msg,){ _function( String title ,String path,dynamic page ,String msg,){
return Row( return GestureDetector(
onTap: (){
Get.to(page);
},
child: Row(
children: [ children: [
Image.asset(path,width: 40.w,height: 40.w,fit:BoxFit.fitHeight,), Image.asset(path,width: 40.w,height: 40.w,fit:BoxFit.fitHeight,),
16.wb, 16.wb,
@ -667,116 +674,10 @@ class _PersonalIndexState extends State<PersonalIndex>
color: Color(0xFF999999), color: Color(0xFF999999),
), ),
], ],
);
}
_myVisitor(){
final userProvider = Provider.of<UserProvider>(context);
return Row(
children: [
Text(
'我的访客',
style: TextStyle(
fontSize: 28.sp,
color: Colors.black.withOpacity(0.85),
),
),
Spacer(),
Container(
width: 110.w,
height: 40.w,
child: Stack(
children: [
Positioned(
child: Hero(
tag: 'AVATAR4',
child: ClipOval(
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(userProvider
.userInfoModel!.imgUrls.isNotEmpty
? userProvider
.userInfoModel!.imgUrls.first.url
: ''),
height: 40.w,
width: 40.w,
fit: BoxFit.cover,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 40.w,
width: 40.w,);
},
),
),
),
top: 0,
bottom: 0,
right: 0,
),
Positioned(
child: Hero(
tag: 'AVATAR5',
child: ClipOval(
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(userProvider
.userInfoModel!.imgUrls.isNotEmpty
? userProvider
.userInfoModel!.imgUrls.first.url
: ''),
height: 40.w,
width: 40.w,
fit: BoxFit.cover,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w,
width: 106.w,);
},
),
),
),
top: 0,
bottom: 0,
right: 15,
),
Positioned(
child: Hero(
tag: 'AVATAR6',
child: ClipOval(
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(userProvider
.userInfoModel!.imgUrls.isNotEmpty
? userProvider
.userInfoModel!.imgUrls.first.url
: ''),
height: 40.w,
width: 40.w,
fit: BoxFit.cover,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w,
width: 106.w,);
},
),
),
),
top: 0,
bottom: 0,
right: 30,
),
],
)
), ),
24.wb,
Icon(
CupertinoIcons.chevron_forward,
size: 24.w,
color: Color(0xFF999999),
),
],
); );
} }
@override @override
bool get wantKeepAlive => true; bool get wantKeepAlive => true;
} }

@ -0,0 +1,40 @@
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/models/market/goods_item.dart';
import 'package:aku_community/models/market/order/order_detail_model.dart';
import 'package:aku_community/models/search/search_goods_model.dart';
import 'package:aku_community/utils/network/base_list_model.dart';
import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/utils/text_utils.dart';
import 'package:aku_community/widget/others/user_tool.dart';
class PropertyFunc {
///id
static Future<double> getDailyPaymentPrePay() async {
BaseModel baseModel =
await NetUtil().get(API.manager.dailyPaymentPrePay, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId,
});
if (baseModel.status ?? false) {
return (baseModel.data as num).toDouble();
} else {
return 0;
}
}
///id
static Future<double> getFindUnpaidAmount() async {
BaseModel baseModel =
await NetUtil().get(API.manager.findUnpaidAmount, params: {
"estateId": UserTool.appProveider.selectedHouse!.estateId,
});
if (baseModel.status ?? false) {
return (baseModel.data as num).toDouble();
} else {
return 0;
}
}
}

@ -1,18 +1,24 @@
import 'package:aku_community/base/base_style.dart'; import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart'; import 'package:aku_community/const/resource.dart';
import 'package:aku_community/constants/application_objects.dart'; import 'package:aku_community/constants/application_objects.dart';
import 'package:aku_community/pages/life_pay/life_pay_choose_page.dart';
import 'package:aku_community/pages/message_center_page/message_center_page.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/personal/user_profile_page.dart';
import 'package:aku_community/pages/property/property_func.dart';
import 'package:aku_community/pages/sign/sign_in_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/painters/user_bottom_bar_painter.dart';
import 'package:aku_community/provider/app_provider.dart'; import 'package:aku_community/provider/app_provider.dart';
import 'package:aku_community/provider/user_provider.dart'; import 'package:aku_community/provider/user_provider.dart';
import 'package:aku_community/ui/profile/house/add_house_page.dart';
import 'package:aku_community/ui/profile/house/house_owners_page.dart';
import 'package:aku_community/ui/profile/order/order_page.dart'; import 'package:aku_community/ui/profile/order/order_page.dart';
import 'package:aku_community/ui/search/bee_search.dart'; import 'package:aku_community/ui/search/bee_search.dart';
import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/utils/login_util.dart'; import 'package:aku_community/utils/login_util.dart';
import 'package:aku_community/widget/others/user_tool.dart';
import 'package:aku_community/widget/views/application_view.dart'; import 'package:aku_community/widget/views/application_view.dart';
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:bot_toast/bot_toast.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';
@ -20,7 +26,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class PropertyPage extends StatefulWidget { class PropertyPage extends StatefulWidget {
final bool? isSign; final bool? isSign;
@ -35,15 +40,15 @@ class _PropertyPageState extends State<PropertyPage>
int sum = 0; int sum = 0;
int commentCount = 0; int commentCount = 0;
int sysCount = 0; int sysCount = 0;
num unpaid = 0;
num paid = 0;
late TabController _tabController; late TabController _tabController;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_getRefresh();
_tabController = TabController( _tabController = TabController(initialIndex: 0, length: 2, vsync: this);
initialIndex: 0, length: 2, vsync: this);
} }
@override @override
@ -52,6 +57,14 @@ class _PropertyPageState extends State<PropertyPage>
super.dispose(); super.dispose();
} }
_getRefresh(){
Future.delayed(Duration(milliseconds: 0), () async {
paid = await PropertyFunc.getDailyPaymentPrePay();
unpaid = await PropertyFunc.getFindUnpaidAmount();
setState(() {});
});
}
SliverAppBar _sliverAppBar(double height) { SliverAppBar _sliverAppBar(double height) {
final userProvider = Provider.of<UserProvider>(context); final userProvider = Provider.of<UserProvider>(context);
AppProvider appProvider = Provider.of<AppProvider>(context); AppProvider appProvider = Provider.of<AppProvider>(context);
@ -63,7 +76,7 @@ class _PropertyPageState extends State<PropertyPage>
snap: false, snap: false,
//toolbarHeight: 0, //toolbarHeight: 0,
elevation: 0, elevation: 0,
collapsedHeight:420.w, collapsedHeight: 420.w,
titleSpacing: 10.0, titleSpacing: 10.0,
floating: true, floating: true,
title: Row( title: Row(
@ -74,17 +87,19 @@ class _PropertyPageState extends State<PropertyPage>
Padding( Padding(
padding: EdgeInsets.only(right: 5), padding: EdgeInsets.only(right: 5),
child: Image.asset( child: Image.asset(
R.ASSETS_ICONS_ICON_MAIN_LOCATION_PNG, R.ASSETS_ICONS_ICON_PROPERTY_LOCATION_PNG,
width: 32.w, width: 40.w,
height: 32.w, height: 40.w,
), ),
), ),
Text( Text(
appProvider.location?['city']==null?'':appProvider.location?['city'] as String? ?? '', appProvider.location?['city'] == null
? ''
: appProvider.location?['city'] as String? ?? '',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w500,
fontSize: 24.sp, fontSize: 32.sp,
color: Color(0xff333333), color: Colors.white.withOpacity(0.85),
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -94,7 +109,7 @@ class _PropertyPageState extends State<PropertyPage>
onTap: () { onTap: () {
Get.to(() => BeeSearch()); Get.to(() => BeeSearch());
}, },
child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_FIND_PNG, child: Image.asset(R.ASSETS_ICONS_ICON_PROPERTY_SEARCH_PNG,
height: 40.w, width: 40.w), height: 40.w, width: 40.w),
), ),
Padding( Padding(
@ -118,7 +133,7 @@ class _PropertyPageState extends State<PropertyPage>
if (LoginUtil.isNotLogin) return; if (LoginUtil.isNotLogin) return;
Get.to(() => MessageCenterPage()); Get.to(() => MessageCenterPage());
}, },
child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_MESSAGE_PNG, child: Image.asset(R.ASSETS_ICONS_ICON_PROPERTY_MESSAGE_PNG,
height: 40.w, width: 40.w), height: 40.w, width: 40.w),
)), )),
), ),
@ -128,38 +143,21 @@ class _PropertyPageState extends State<PropertyPage>
flexibleSpace: Stack( flexibleSpace: Stack(
children: [ children: [
Positioned( Positioned(
child: Container( child: Image.asset(
color: Color(0xF9D57A59), R.ASSETS_IMAGES_PROPERTY_BG_PNG,
height: 503.w,
width: double.infinity, width: double.infinity,
height: 503.w,
fit: BoxFit.cover,
), ),
// 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, top: 0,
left: 0, left: 0,
right: 0, right: 0,
bottom: 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( Positioned(
child: Container( child: Container(
margin: EdgeInsets.only(left: 32.w,right: 32.w), margin: EdgeInsets.only(left: 32.w, right: 32.w),
width: 686.w, width: 686.w,
height: 74.w, height: 74.w,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -172,19 +170,40 @@ class _PropertyPageState extends State<PropertyPage>
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
24.wb, 24.wb,
Text('当前绑定房屋',style: TextStyle(fontSize: 28.sp,color: Colors.white.withOpacity(0.85),height: 1.00),), Text(
'当前绑定房屋',
style: TextStyle(
fontSize: 28.sp,
color: Colors.white.withOpacity(0.85),
height: 1.00),
),
Spacer(), Spacer(),
Text('B栋2单元1803室',style: TextStyle(fontSize: 28.sp,color: Colors.white.withOpacity(0.85),height:1.00,fontWeight: FontWeight.bold),), Text(
userProvider.userDetailModel!.estateNames!.isEmpty?'暂未绑定': userProvider.userDetailModel!.estateNames?[0]??'暂未绑定',
style: TextStyle(
fontSize: 28.sp,
color: Colors.white.withOpacity(0.85),
height: 1.00,
fontWeight: FontWeight.bold),
),
32.wb, 32.wb,
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
Get.to(HouseOwnersPage(
identify: UserTool.userProvider.userDetailModel!.type ?? 4,
));
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
width: 80.w, width: 80.w,
height: 42.w, height: 42.w,
child:Text('切换',style: TextStyle(fontSize: 24.sp,color: Colors.white.withOpacity(0.85)),), child: Text(
'切换',
style: TextStyle(
fontSize: 24.sp,
color: Colors.white.withOpacity(0.85)),
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFF3D8CE8), color: Color(0xFF3D8CE8),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
@ -194,18 +213,16 @@ class _PropertyPageState extends State<PropertyPage>
), ),
), ),
24.wb, 24.wb,
], ],
), ),
), ),
top: kTextTabBarHeight+50.w, top: kTextTabBarHeight + 50.w,
left: 0, left: 0,
right: 0, right: 0,
), ),
Positioned( Positioned(
child: _goodsTitle(), child: _goodsTitle(),
top: kTextTabBarHeight+50.w+94.w, top: kTextTabBarHeight + 50.w + 94.w,
left: 0, left: 0,
right: 0, right: 0,
), ),
@ -213,28 +230,24 @@ class _PropertyPageState extends State<PropertyPage>
child: Container( child: Container(
padding: EdgeInsets.only(top: 20.w), padding: EdgeInsets.only(top: 20.w),
height: 150.w, height: 150.w,
child: TabBarView( child: TabBarView(
children: [_payView(true),_payView(false)], children: [_payView(true), _payView(false)],
controller: _tabController, controller: _tabController,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
), ),
), ),
top: kTextTabBarHeight+50.w+94.w+60.w, top: kTextTabBarHeight + 50.w + 94.w + 60.w,
left: 0, left: 0,
right: 0, right: 0,
), ),
], ],
), ),
); );
} }
_payView(bool pay) {
_payView(bool pay){
return Container( return Container(
padding: EdgeInsets.only(left: 36.w,right: 36.w), padding: EdgeInsets.only(left: 36.w, right: 36.w),
width: double.infinity, width: double.infinity,
height: 150.w, height: 150.w,
child: Row( child: Row(
@ -245,7 +258,7 @@ class _PropertyPageState extends State<PropertyPage>
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
'1,944.00', pay?paid.toStringAsFixed(2):unpaid.toStringAsFixed(2),
style: TextStyle( style: TextStyle(
color: Color(0xFFFFFFFF).withOpacity(0.85), color: Color(0xFFFFFFFF).withOpacity(0.85),
fontSize: 40.sp, fontSize: 40.sp,
@ -262,24 +275,43 @@ class _PropertyPageState extends State<PropertyPage>
], ],
), ),
Spacer(), Spacer(),
Container( GestureDetector(
onTap: () async{
final appProvider = Provider.of<AppProvider>(Get.context!, listen: false);
if (appProvider.selectedHouse == null) {
BotToast.showText(text: '请先添加房屋');
Get.to(() => AddHousePage());
}else{
bool? result = await Get.to(() => LifePayChoosePage());
if (result == true) _getRefresh();
}
},
child: Container(
alignment: Alignment.center, alignment: Alignment.center,
width: 160.w, width: 160.w,
height: 55.w, height: 55.w,
child:Text(!pay?'一键缴费':'点击充值',style: TextStyle(fontSize: 24.sp,color: Colors.white.withOpacity(0.85)),), child: Text(
!pay ? '缴纳账单' : '点击充值',
style: TextStyle(
fontSize: 24.sp, color: Colors.white.withOpacity(0.85)),
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFFFB634), color: Color(0xFFFFC257),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(8.w), Radius.circular(8.w),
), ),
), ),
), ),
),
], ],
), ),
); );
} }
_goodsTitle(){ _goodsTitle() {
return Row( return Row(
children: [ children: [
24.wb, 24.wb,
@ -294,16 +326,14 @@ class _PropertyPageState extends State<PropertyPage>
}, },
isScrollable: true, isScrollable: true,
labelPadding: EdgeInsets.zero, labelPadding: EdgeInsets.zero,
controller: _tabController, controller: _tabController,
labelColor: Colors.white.withOpacity(0.85), labelColor: Colors.white.withOpacity(0.85),
unselectedLabelColor: Colors.white.withOpacity(0.65), unselectedLabelColor: Colors.white.withOpacity(0.65),
indicatorPadding: EdgeInsets.symmetric(horizontal: 40.w), indicatorPadding: EdgeInsets.symmetric(horizontal: 40.w),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
labelStyle: TextStyle(
labelStyle: TextStyle(color:Colors.white.withOpacity(0.85),), color: Colors.white.withOpacity(0.85),
),
indicatorColor: Color(0xFFE8A93A), indicatorColor: Color(0xFFE8A93A),
tabs: _tabItems()), tabs: _tabItems()),
), ),
@ -329,18 +359,16 @@ class _PropertyPageState extends State<PropertyPage>
], ],
), ),
), ),
36.wb, 36.wb,
], ],
); );
} }
List<Widget> _tabItems() { List<Widget> _tabItems() {
return [_tabItem(0,'未缴账单'),_tabItem(1,'预缴金额')]; return [_tabItem(0, '未缴账单'), _tabItem(1, '预缴金额')];
} }
_tabItem(int index,String text) { _tabItem(int index, String text) {
bool isChoose = index == _tabController.index; bool isChoose = index == _tabController.index;
// Color textColor = index == _tabController.index // Color textColor = index == _tabController.index
// ? getCurrentThemeColor() // ? getCurrentThemeColor()
@ -359,9 +387,11 @@ class _PropertyPageState extends State<PropertyPage>
Text( Text(
text, text,
style: TextStyle( style: TextStyle(
fontWeight: isChoose?FontWeight.bold:FontWeight.normal, fontWeight: isChoose ? FontWeight.bold : FontWeight.normal,
fontSize: isChoose?32.sp:28.sp, fontSize: isChoose ? 32.sp : 28.sp,
color: isChoose?Colors.white.withOpacity(0.85):Colors.white.withOpacity(0.65)), color: isChoose
? Colors.white.withOpacity(0.85)
: Colors.white.withOpacity(0.65)),
), ),
], ],
), ),
@ -456,7 +486,6 @@ class _PropertyPageState extends State<PropertyPage>
), ),
); );
return Scaffold( return Scaffold(
body: EasyRefresh( body: EasyRefresh(
header: MaterialHeader(), header: MaterialHeader(),
onRefresh: () async { onRefresh: () async {
@ -469,16 +498,19 @@ class _PropertyPageState extends State<PropertyPage>
// orderWidget, // orderWidget,
SliverToBoxAdapter( SliverToBoxAdapter(
child: _getFunctionView(getOutApp,'出行安全',Color(0xFFFAC058)), child: _getFunctionView(getOutApp, '出行安全', Color(0xFFFAC058)),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: _getFunctionView(propertyServicesApp,'物业服务',Color(0xFF58FA8F)), child: _getFunctionView(
propertyServicesApp, '物业服务', Color(0xFF58FA8F)),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: _getFunctionView(residentLifeApp,'居民生活',Color(0xFF58C0FA)), child:
_getFunctionView(residentLifeApp, '居民生活', Color(0xFF58C0FA)),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: _getFunctionView(aboutCommunityApp,'关于社区',Color(0xFFFA5858)), child: _getFunctionView(
aboutCommunityApp, '关于社区', Color(0xFFFA5858)),
), ),
], ],
), ),
@ -486,9 +518,9 @@ class _PropertyPageState extends State<PropertyPage>
); );
} }
_getFunctionView(List<AO> item,String title,Color color){ _getFunctionView(List<AO> item, String title, Color color) {
return Container( return Container(
margin: EdgeInsets.only(left: 32.w,right: 32.w,top: 32.w), margin: EdgeInsets.only(left: 32.w, right: 32.w, top: 32.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffffffff), color: Color(0xffffffff),
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.all(Radius.circular(8)),
@ -500,7 +532,7 @@ class _PropertyPageState extends State<PropertyPage>
], ],
), ),
//margin: EdgeInsets.all(20.w), //margin: EdgeInsets.all(20.w),
padding: EdgeInsets.only(left: 32.w,right: 32.w,top: 24.w), padding: EdgeInsets.only(left: 32.w, right: 32.w, top: 24.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
@ -511,7 +543,6 @@ class _PropertyPageState extends State<PropertyPage>
Row( Row(
//crossAxisAlignment: CrossAxisAlignment.center, //crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 6.w), margin: EdgeInsets.only(top: 6.w),
width: 4.w, width: 4.w,
@ -529,26 +560,22 @@ class _PropertyPageState extends State<PropertyPage>
], ],
), ),
) )
], ],
), ),
); );
} }
_getTitle(String title){ _getTitle(String title) {
return Text( return Text(
title, title,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 28.sp, fontSize: 28.sp,
color: ktextPrimary, color: ktextPrimary,
), ),
); );
} }
@override @override
bool get wantKeepAlive => true; bool get wantKeepAlive => true;
} }

@ -1,6 +1,8 @@
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/community/activity_item_model.dart'; import 'package:aku_community/model/community/activity_item_model.dart';
import 'package:aku_community/model/community/board_model.dart'; import 'package:aku_community/model/community/board_model.dart';
import 'package:aku_community/model/community/gambit_model.dart';
import 'package:aku_community/model/community/hot_news_model.dart';
import 'package:aku_community/model/community/swiper_model.dart'; import 'package:aku_community/model/community/swiper_model.dart';
import 'package:aku_community/models/market/goods_classification.dart'; import 'package:aku_community/models/market/goods_classification.dart';
import 'package:aku_community/models/market/goods_popular_model.dart'; import 'package:aku_community/models/market/goods_popular_model.dart';
@ -11,6 +13,41 @@ import 'package:aku_community/utils/network/net_util.dart';
class CommunityFunc { class CommunityFunc {
///
static Future<List<GambitModel>> getListGambit() async {
BaseListModel model = await NetUtil().getList(
API.community.listGambit,
params: {'pageNum': 1, 'size': 6},
);
if (model.tableList!.length == 0) return [];
return model.tableList!.map((e) => GambitModel.fromJson(e)).toList();
}
///
static Future<List<HotNewsModel>> getHotNews() async {
BaseListModel model = await NetUtil().getList(
API.community.findHotNews,
params: {'pageNum': 1, 'size': 4},
);
if (model.tableList!.length == 0) return [];
return model.tableList!.map((e) => HotNewsModel.fromJson(e)).toList();
}
///
static Future<String> addViews(int newsId) async {
BaseModel model = await NetUtil().get(
API.community.addViews,
params: {'newsId': newsId,},
showMessage: true,
);
if (model.message == null)
return '';
return (model.message as String).toString();
}
/// ///
static Future<String> getNewProductsTodayNum() async { static Future<String> getNewProductsTodayNum() async {
BaseModel model = await NetUtil().get( BaseModel model = await NetUtil().get(

@ -1,7 +1,11 @@
import 'package:aku_community/base/base_style.dart'; import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/constants/api.dart'; import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/common/img_model.dart';
import 'package:aku_community/model/community/event_item_model.dart'; import 'package:aku_community/model/community/event_item_model.dart';
import 'package:aku_community/model/community/gambit_model.dart';
import 'package:aku_community/model/community/hot_news_model.dart';
import 'package:aku_community/ui/community/activity/activity_list_page.dart'; 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/community/community_views/widgets/chat_card.dart'; import 'package:aku_community/ui/community/community_views/widgets/chat_card.dart';
import 'package:aku_community/ui/home/home_title.dart'; import 'package:aku_community/ui/home/home_title.dart';
import 'package:aku_community/ui/market/search/search_goods_page.dart'; import 'package:aku_community/ui/market/search/search_goods_page.dart';
@ -25,6 +29,7 @@ import 'package:aku_community/ui/community/community_views/new_community_view.da
import 'package:aku_community/ui/community/community_views/topic/topic_community_view.dart'; import 'package:aku_community/ui/community/community_views/topic/topic_community_view.dart';
import 'package:aku_community/utils/headers.dart'; import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/utils/login_util.dart'; import 'package:aku_community/utils/login_util.dart';
import 'dart:math';
import 'package:aku_community/widget/bee_scaffold.dart'; import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/column_action_button.dart'; import 'package:aku_community/widget/buttons/column_action_button.dart';
import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart'; import 'package:aku_community/widget/tab_bar/bee_tab_bar.dart';
@ -48,6 +53,8 @@ class _CommunityPageState extends State<CommunityPage>
List<EventItemModel> _newItems = []; List<EventItemModel> _newItems = [];
List<GambitModel> _gambitModels = [];
List<HotNewsModel> _hotNewsModels = [];
int _pageNum = 1; int _pageNum = 1;
int _size = 4; int _size = 4;
@ -83,19 +90,8 @@ class _CommunityPageState extends State<CommunityPage>
appBar: AppBar( appBar: AppBar(
titleSpacing: 10.0, titleSpacing: 10.0,
title: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [ title: 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( Text(
appProvider.location?['city'] == null '附近社区',
? ''
: appProvider.location?['city'] as String? ?? '',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 24.sp, fontSize: 24.sp,
@ -103,34 +99,17 @@ class _CommunityPageState extends State<CommunityPage>
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
Text(
'(${appProvider.weatherType} ${appProvider.weatherTemp}℃)',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
),
textAlign: TextAlign.center,
),
]), ]),
backgroundColor: Colors.white, backgroundColor: Colors.white,
actions: [ actions: [
Badge( GestureDetector(
elevation: 0, onTap: () {
showBadge: appProvider.messageCenterModel.commentCount != 0 ||
appProvider.messageCenterModel.sysCount != 0,
position: BadgePosition.topEnd(
top: 8,
end: 8,
),
child: ColumnActionButton(
onPressed: () {
if (LoginUtil.isNotLogin) return;
Get.to(() => MessageCenterPage());
}, },
title: '消息', child: Image.asset(R.ASSETS_ICONS_ICON_COMMUNITY_PUSH_PNG,
path: R.ASSETS_ICONS_ALARM_PNG, height: 40.w, width: 40.w),
), )
),
], ],
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size.fromHeight(90.w), child: _geSearch()), preferredSize: Size.fromHeight(90.w), child: _geSearch()),
@ -165,6 +144,8 @@ class _CommunityPageState extends State<CommunityPage>
controller: _easyRefreshController, controller: _easyRefreshController,
onRefresh: () async { onRefresh: () async {
await (getNewInfo()); await (getNewInfo());
_gambitModels = await CommunityFunc.getListGambit();
_hotNewsModels = await CommunityFunc.getHotNews();
_onload = false; _onload = false;
setState(() {}); setState(() {});
}, },
@ -173,7 +154,7 @@ class _CommunityPageState extends State<CommunityPage>
: ListView( : ListView(
children: [ children: [
2.hb, 2.hb,
_getInfo(), _hotNewsModels.isEmpty?SizedBox():_getInfo(),
16.hb, 16.hb,
_getNews(), _getNews(),
16.hb, 16.hb,
@ -262,12 +243,12 @@ class _CommunityPageState extends State<CommunityPage>
width: 396.w, width: 396.w,
child: Builder( child: Builder(
builder: (context) { builder: (context) {
return _infoCard(); return _infoCard(_hotNewsModels[index]);
}, },
), ),
); );
}, },
itemCount: 3, itemCount: _hotNewsModels.length,
), ),
), ),
], ],
@ -299,26 +280,69 @@ class _CommunityPageState extends State<CommunityPage>
); );
} }
_infoCard() {
return Container( _next(int min, int max) {
var rng = new Random();
// min + max - min result;
var result = min + rng.nextInt(max - min);
// result ;
return result;
}
_infoCard(HotNewsModel item) {
return GestureDetector(
onTap: (){
},
child: Stack(
children: [
Container(
width: 396.w,
height: 204.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.horizontal(
right: Radius.circular(12),
left: Radius.circular(16),
),
image: DecorationImage(
image: NetworkImage(
API.image(ImgModel.first(item.imgList)),
),
fit: BoxFit.cover,
),
//color: Colors.black38,
),
),
Positioned(
top: 0,
bottom: 0,
left: 0,
right: 0,
child: Container(
alignment: Alignment.center,
width: 396.w, width: 396.w,
height: 204.w, height: 204.w,
padding: padding:
EdgeInsets.only(top: 32.w, left: 40.w, right: 40.w, bottom: 32.w), EdgeInsets.only(top: 32.w, left: 40.w, right: 40.w, bottom: 32.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.black.withOpacity(0.5),
borderRadius: BorderRadius.horizontal( borderRadius: BorderRadius.horizontal(
right: Radius.circular(12), right: Radius.circular(12),
left: Radius.circular(16), left: Radius.circular(16),
), //color: Colors.black38,
), ),
color: Colors.black38, child:
), Column(
child: Column( mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Container( Container(
width: 316.w, width: 316.w,
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
'肖生克的救赎到底在讲人性的还是在激励人在困...', item.title??'',
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
@ -331,7 +355,7 @@ class _CommunityPageState extends State<CommunityPage>
Row( Row(
children: [ children: [
Text( Text(
'271.8w浏览', '${item.views??0}浏览',
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
@ -341,7 +365,7 @@ class _CommunityPageState extends State<CommunityPage>
), ),
Spacer(), Spacer(),
Text( Text(
'01-03', item.createDate?.substring(0,10)??'',
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
@ -352,6 +376,13 @@ class _CommunityPageState extends State<CommunityPage>
], ],
) )
], ],
),
),
),
],
), ),
); );
} }
@ -386,7 +417,7 @@ class _CommunityPageState extends State<CommunityPage>
minWidth: double.infinity, minWidth: double.infinity,
color: Color(0xFFF3F3F3), color: Color(0xFFF3F3F3),
onPressed: () { onPressed: () {
Get.to(() => SearchGoodsPage()); //Get.to(() => SearchGoodsPage());
}, },
child: Row( child: Row(
children: [ children: [

@ -43,7 +43,7 @@ class _ApplicationViewState extends State<ApplicationView> {
width: 75.w, width: 75.w,
), ),
8.hb, 8.hb,
object.title.text.size(24.sp).bold.make(), object.title.text.size(24.sp).make(),
], ],
), ),
); );

Loading…
Cancel
Save