页面整改加首页设计

hmxc
章文轩 3 years ago
parent a960f56810
commit 1053c11c28

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

@ -178,6 +178,9 @@ class R {
/// ![preview](file:///Users/datang/aku_community/assets/icons/contract.png)
static const String ASSETS_ICONS_CONTRACT_PNG = 'assets/icons/contract.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/examine.png)
static const String ASSETS_ICONS_EXAMINE_PNG = 'assets/icons/examine.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/facility.png)
static const String ASSETS_ICONS_FACILITY_PNG = 'assets/icons/facility.png';
@ -213,6 +216,50 @@ class R {
static const String ASSETS_ICONS_HOUSE_KEEPING_PNG =
'assets/icons/house_keeping.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_all.png)
static const String ASSETS_ICONS_ICON_MAIN_ALL_PNG =
'assets/icons/icon_main_all.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_consult.png)
static const String ASSETS_ICONS_ICON_MAIN_CONSULT_PNG =
'assets/icons/icon_main_consult.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_find.png)
static const String ASSETS_ICONS_ICON_MAIN_FIND_PNG =
'assets/icons/icon_main_find.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_fix.png)
static const String ASSETS_ICONS_ICON_MAIN_FIX_PNG =
'assets/icons/icon_main_fix.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_invite.png)
static const String ASSETS_ICONS_ICON_MAIN_INVITE_PNG =
'assets/icons/icon_main_invite.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_location.png)
static const String ASSETS_ICONS_ICON_MAIN_LOCATION_PNG =
'assets/icons/icon_main_location.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_message.png)
static const String ASSETS_ICONS_ICON_MAIN_MESSAGE_PNG =
'assets/icons/icon_main_message.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_open.png)
static const String ASSETS_ICONS_ICON_MAIN_OPEN_PNG =
'assets/icons/icon_main_open.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_pay.png)
static const String ASSETS_ICONS_ICON_MAIN_PAY_PNG =
'assets/icons/icon_main_pay.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_police.png)
static const String ASSETS_ICONS_ICON_MAIN_POLICE_PNG =
'assets/icons/icon_main_police.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_main_subscribe.png)
static const String ASSETS_ICONS_ICON_MAIN_SUBSCRIBE_PNG =
'assets/icons/icon_main_subscribe.png';
/// ![preview](file:///Users/datang/aku_community/assets/icons/icon_notification.png)
static const String ASSETS_ICONS_ICON_NOTIFICATION_PNG =
'assets/icons/icon_notification.png';
@ -478,6 +525,18 @@ class R {
static const String ASSETS_IMAGES_CAR_HEADER_PNG =
'assets/images/car_header.png';
/// ![preview](file:///Users/datang/aku_community/assets/images/card_blue.png)
static const String ASSETS_IMAGES_CARD_BLUE_PNG =
'assets/images/card_blue.png';
/// ![preview](file:///Users/datang/aku_community/assets/images/card_pink.png)
static const String ASSETS_IMAGES_CARD_PINK_PNG =
'assets/images/card_pink.png';
/// ![preview](file:///Users/datang/aku_community/assets/images/card_yellow.png)
static const String ASSETS_IMAGES_CARD_YELLOW_PNG =
'assets/images/card_yellow.png';
/// ![preview](file:///Users/datang/aku_community/assets/images/code_logo.png)
static const String ASSETS_IMAGES_CODE_LOGO_PNG =
'assets/images/code_logo.png';
@ -521,6 +580,9 @@ class R {
/// ![preview](file:///Users/datang/aku_community/assets/images/mine_bg.png)
static const String ASSETS_IMAGES_MINE_BG_PNG = 'assets/images/mine_bg.png';
/// ![preview](file:///Users/datang/aku_community/assets/images/notice.png)
static const String ASSETS_IMAGES_NOTICE_PNG = 'assets/images/notice.png';
/// ![preview](file:///Users/datang/aku_community/assets/images/open_door.png)
static const String ASSETS_IMAGES_OPEN_DOOR_PNG =
'assets/images/open_door.png';

@ -359,6 +359,9 @@ class _Community {
///
String get signUpActivity => '/user/activity/signUp';
///
String get getSwiper => '/user/news/findNewsRotation';
}
class _Market {

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

@ -32,11 +32,13 @@ class FixDetailModel extends Equatable {
@JsonSerializable()
class AppReportRepairVo extends Equatable {
final int id;
final String roomName;
final int type;
final int status;
final String reportDetail;
final List<ImgModel> imgUrls;
AppReportRepairVo({
required this.roomName,
required this.id,
required this.type,
required this.status,
@ -50,6 +52,7 @@ class AppReportRepairVo extends Equatable {
List<Object> get props {
return [
id,
roomName,
type,
status,
reportDetail,

@ -26,6 +26,7 @@ FixDetailModel _$FixDetailModelFromJson(Map<String, dynamic> json) {
AppReportRepairVo _$AppReportRepairVoFromJson(Map<String, dynamic> json) {
return AppReportRepairVo(
roomName: json['roomName'] as String,
id: json['id'] as int,
type: json['type'] as int,
status: json['status'] as int,

@ -1,3 +1,5 @@
import 'package:aku_community/utils/hive_store.dart';
import 'package:aku_community/utils/websocket/tips_dialog.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
@ -30,6 +32,13 @@ class _ElectronicCommercPageState extends State<ElectronicCommercPage>
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 0), () async {
var agreement = await HiveStore.appBox?.get('ElectronicCommercPage') ?? false;
if (!agreement) {
await TipsDialog.tipsDialog();
HiveStore.appBox!.put('ElectronicCommercPage',true);
}
});
_tabController = TabController(length: _tabs.length, vsync: this);
Future.delayed(
Duration(

@ -1,3 +1,5 @@
import 'package:aku_community/utils/hive_store.dart';
import 'package:aku_community/utils/websocket/tips_dialog.dart';
import 'package:flutter/material.dart';
import 'package:aku_community/pages/express_packages/express_package_view.dart';
@ -18,6 +20,13 @@ class _ExpressPackagePageState extends State<ExpressPackagePage>
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 0), () async {
var agreement = await HiveStore.appBox?.get('ExpressPackagePage') ?? false;
if (!agreement) {
await TipsDialog.tipsDialog();
HiveStore.appBox!.put('ExpressPackagePage',true);
}
});
_tabController = TabController(length: _tabs.length, vsync: this);
}

@ -120,7 +120,7 @@ class GoodsInfoCard extends StatelessWidget {
]),
),
Container(
margin: EdgeInsets.only(
padding: EdgeInsets.only(
top: 19.w,
bottom: 30.w,
),

@ -0,0 +1,75 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/pages/tab_navigator.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
class BorrowExaminePage extends StatefulWidget {
BorrowExaminePage({Key? key}) : super(key: key);
@override
_BorrowExaminePageState createState() => _BorrowExaminePageState();
}
class _BorrowExaminePageState extends State<BorrowExaminePage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '出借结果',
body: Center(
child: Column(
children: [
75.w.heightBox,
SizedBox(
width: 110.w,
height: 110.w,
child: Image.asset(R.ASSETS_ICONS_EXAMINE_PNG
),
),
48.w.heightBox,
'正在审核中'
.text
.color(ktextPrimary)
.size(36.sp)
.bold
.make(),
16.w.heightBox,
'使用后请记得归还'
.text
.color(ktextSubColor)
.size(26.sp)
.make(),
95.w.heightBox,
MaterialButton(
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w)),
elevation: 0,
hoverElevation: 0,
highlightElevation: 0,
focusElevation: 0,
disabledElevation: 0,
padding: EdgeInsets.symmetric(vertical: 24.w),
minWidth: double.infinity,
onPressed: () {
Get.back();},
child: '返回物品借还列表'
.text
.color( ktextPrimary )
.size(36.sp)
.make(),
)
],
),
).pSymmetric(
h: 24.w,
),
);
}
}

@ -195,7 +195,10 @@ class _BorrowGoodsDetailPageState extends State<BorrowGoodsDetailPage> {
child: ClipRRect(
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(model.imgList)),
image: API.image(ImgModel.first(model.imgList)), imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 184.w,
width: 184.w,);
},
),
),
),

@ -9,6 +9,7 @@ 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/widget/bee_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -16,6 +17,8 @@ import 'package:get/get.dart';
import 'package:power_logger/power_logger.dart';
import 'package:velocity_x/velocity_x.dart';
import 'borrow_examine_page.dart';
class BorrowGoodsSubmitModel {
List<int> selectIds;
@ -136,14 +139,17 @@ class _BorrowGoodsPageState extends State<BorrowGoodsPage> {
color: kPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w),
onPressed: () async {
if(_submitIds.length<1){
BotToast.showText(text: '请先选择您要借出的物品');
}else{
BaseModel baseModel = await NetUtil().post(
API.manager.articleBorrowGoods,
params: {"ids": _submitIds},
showMessage: false);
Get.to(BorrowFinshPage(
isSuccess: baseModel.status,
failText: baseModel.message,
Get.to(BorrowExaminePage(
));
}
},
child: '借出'.text.black.size(32.sp).bold.make(),
),
@ -171,6 +177,10 @@ class _BorrowGoodsPageState extends State<BorrowGoodsPage> {
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(model.imgUrls)),
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 184.w,
width: 184.w,);
},
),
),
),

@ -57,6 +57,10 @@ class _GoodsManagePageState extends State<GoodsManagePage> {
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(model.imgUrls)),
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w,
width: 106.w,);
},
),
),
),
@ -118,7 +122,7 @@ class _GoodsManagePageState extends State<GoodsManagePage> {
itemCount: items.length);
}),
bottomNavi: BottomButton(
child: '扫一扫'.text.black.size(32.sp).bold.make(),
child: widget.isBorrow?'出借'.text.black.size(32.sp).bold.make():'归还'.text.black.size(32.sp).bold.make(),
onPressed: widget.isBorrow
? () {
Get.to(() => BorrowGoodsPage());

@ -1,13 +1,17 @@
import 'package:aku_community/constants/api.dart';
import 'package:aku_community/model/manager/mine_goods_model.dart';
import 'package:aku_community/pages/goods_manage_page/borrow/borrow_examine_page.dart';
import 'package:aku_community/pages/manager_func.dart';
import 'package:aku_community/pages/things_page/widget/bee_list_view.dart';
import 'package:aku_community/utils/bee_map.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/utils/network/net_util.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
class MineGoodsPage extends StatefulWidget {
MineGoodsPage({Key? key}) : super(key: key);
@ -54,6 +58,68 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
);
}
InkWell _frmBorrow(int? id) {
List<int> _list = [];
_list.add(id!);
return InkWell(
onTap: () async {
BaseModel baseModel = await NetUtil().post(
API.manager.articleBorrowGoods,
params: {"ids": _list},
showMessage: false);
Get.to(BorrowExaminePage(
));
},
child: Container(
width: 120.w,
height: 44.w,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 7.w),
decoration: BoxDecoration(
color: Color(0xff2a2a2a),
borderRadius: BorderRadius.all(Radius.circular(20)),
),
child: Text(
'借用',
style: TextStyle(fontSize: 22.sp, color: Colors.white),
),
),
);
}
InkWell _frmReturn(int? id) {
List<int> _list = [];
_list.add(id!);
return InkWell(
onTap: () async {
BaseModel baseModel =
await NetUtil().post(API.manager.articleReturnGoods,
params: {
'ids': _list,
},
showMessage: true);
Get.to(BorrowExaminePage(
));
},
child: Container(
width: 120.w,
height: 44.w,
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 7.w),
decoration: BoxDecoration(
color: Color(0xff2a2a2a),
borderRadius: BorderRadius.all(Radius.circular(20)),
),
child: Text(
'归还',
style: TextStyle(fontSize: 22.sp, color: Colors.white),
),
),
);
}
String _getDatelength(int date) {
if (date >= 24) {
return '${(date ~/ 24)}' + '${date % 24}小时';
@ -127,16 +193,39 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
Container(
margin: EdgeInsets.only(top: 16.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'借用状态: ${BeeMap.borrowStatus[model.borrowStatus]}',
'借用状态',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
color:Color(0xff999999),
),
),
_frmLoss(model.id),
Text(
'${BeeMap.borrowStatus[model.borrowStatus]}',
style: TextStyle(
fontSize: 24.sp,
color:BeeMap.borrowStatusColor[model.borrowStatus],
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 16.w),
child: Row(
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Spacer(),
model.borrowStatus==1||model.borrowStatus==4?_frmLoss(model.id):SizedBox(),
model.borrowStatus==0||model.borrowStatus==2?SizedBox(width: 16.w):SizedBox(),
model.borrowStatus==0||model.borrowStatus==2?_frmBorrow(model.id):SizedBox(),
model.borrowStatus==1||model.borrowStatus==4?SizedBox(width: 16.w):SizedBox(),
model.borrowStatus==1||model.borrowStatus==4?_frmReturn(model.id):SizedBox(),
],
),
),

@ -1,3 +1,5 @@
import 'package:aku_community/pages/goods_manage_page/borrow/borrow_examine_page.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
@ -133,15 +135,19 @@ class _ReturnGoodsDetailPageState extends State<ReturnGoodsDetailPage> {
color: kPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w),
onPressed: () async {
if(_selectItems.length<1){
BotToast.showText(text: '请先选择您要借归还的物品');
}else{
BaseModel baseModel =
await NetUtil().post(API.manager.articleReturnGoods,
params: {
'ids': _selectItems,
},
showMessage: true);
if (baseModel.status!) {
Get.back();
Get.to(BorrowExaminePage(
));
}
},
child: '归还'.text.black.size(32.sp).bold.make(),
),
@ -199,6 +205,10 @@ class _ReturnGoodsDetailPageState extends State<ReturnGoodsDetailPage> {
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(model.imgList)),
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 184.w,
width: 184.w,);
},
),
),
),

@ -1,5 +1,19 @@
// Dart imports:
import 'package:aku_community/constants/application_objects.dart';
import 'package:aku_community/model/common/img_model.dart';
import 'package:aku_community/model/community/swiper_model.dart';
import 'package:aku_community/pages/life_pay/life_pay_choose_page.dart';
import 'package:aku_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_community/pages/things_page/fixed_submit_page.dart';
import 'package:aku_community/pages/visitor_access_page/visitor_access_page.dart';
import 'package:aku_community/ui/community/facility/facility_appointment_page.dart';
import 'package:aku_community/ui/home/application/all_application.dart';
import 'package:aku_community/ui/home/public_infomation/public_information_detail_page.dart';
import 'package:aku_community/ui/manager/advice/advice_page.dart';
import 'package:aku_community/ui/search/bee_search.dart';
import 'package:aku_community/widget/animated/OverlayWidget.dart';
import 'package:aku_community/widget/others/rectIndicator.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -33,6 +47,8 @@ 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);
@ -45,6 +61,7 @@ class _HomePageState extends State<HomePage>
with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin {
@override
bool get wantKeepAlive => true;
int _currentIndicator = 0;
ScrollController? _scrollController;
@ -53,9 +70,13 @@ class _HomePageState extends State<HomePage>
late EasyRefreshController _refreshController;
int page = 1;
ActivityItemModel? _activityItemModel;
int commentCount = 0;
int sysCount = 0;
int sum = 0;
// ActivityItemModel? _activityItemModel;
List<ActivityItemModel> _activityItemModels = [];
List<BoardItemModel> _boardItemModels = [];
List<SwiperModel> _swiperModels = [];
@override
void initState() {
@ -75,37 +96,73 @@ class _HomePageState extends State<HomePage>
Widget build(BuildContext context) {
super.build(context);
AppProvider appProvider = Provider.of<AppProvider>(context);
commentCount = appProvider.messageCenterModel.commentCount ?? 0;
sysCount = appProvider.messageCenterModel.sysCount ?? 0;
sum = commentCount + sysCount;
return Scaffold(
extendBodyBehindAppBar: true,
appBar: AnimateAppBar(
scrollController: _scrollController,
actions: [
Badge(
GestureDetector(
onTap: () {
Get.to(() => BeeSearch());
},
child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_FIND_PNG,
height: 40.w, width: 40.w),
),
Padding(
padding: const EdgeInsets.only(right: 16, left: 12),
child: Badge(
elevation: 0,
badgeColor: Color(0xFFCF2525),
padding: sum > 9 ? EdgeInsets.all(2) : EdgeInsets.all(5),
showBadge: appProvider.messageCenterModel.commentCount != 0 ||
appProvider.messageCenterModel.sysCount != 0,
position: BadgePosition.topEnd(
top: 8,
end: 8,
top: 3,
end: -5,
),
child: ColumnActionButton(
onPressed: () {
badgeContent: Text(
(sum).toString(),
style: TextStyle(color: Colors.white, fontSize: 10),
),
child: GestureDetector(
onTap: () {
if (LoginUtil.isNotLogin) return;
Get.to(() => MessageCenterPage());
},
title: '消息',
path: R.ASSETS_ICONS_ALARM_PNG,
),
child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_MESSAGE_PNG,
height: 40.w, width: 40.w),
)),
),
],
),
body: EasyRefresh(
// floatingActionButton: FloatingActionButton(
//
// child: Container(
// decoration: BoxDecoration(
// image: DecorationImage(
// fit: BoxFit.fill,
// image:
// AssetImage(R.ASSETS_ICONS_ICON_MAIN_OPEN_PNG),)
// ),
// ),
// onPressed: (){
// print('FloatingActionButton');
// },
// ),
body: Stack(
children: [
EasyRefresh(
controller: _refreshController,
header: MaterialHeader(),
firstRefresh: true,
onRefresh: () async {
_activityItemModel = await CommunityFunc.activity();
//_activityItemModel = await CommunityFunc.activity();
_activityItemModels = await CommunityFunc.activityList();
_boardItemModels = await CommunityFunc.board();
_swiperModels = await CommunityFunc.swiper();
appProvider.getMessageCenter();
setState(() {});
},
@ -117,54 +174,378 @@ class _HomePageState extends State<HomePage>
mainAxisSize: MainAxisSize.min,
children: [
HomeSearch(),
// HomeSwiper(),
HomeSwiper(), //
// SizedBox(height: 100.w),
ApplicationBox(child: ApplicationView()),
Container(
padding: EdgeInsets.only(
top: 24.w, left: 32.w, right: 32.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(
child: Container(
height: 40,
margin: EdgeInsets.only(left: 32.w, right: 32.w, top: 24.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
boxShadow: const <BoxShadow>[
BoxShadow(
color: Color(0x14000000),
blurRadius: 4,
spreadRadius: 0.5)
],
),
child: HomeNotification(items: _boardItemModels)),
),
SliverToBoxAdapter(
child: Row(
children: [
GestureDetector(
child: Container(
margin: EdgeInsets.only(left: 32.w, top: 24.w),
padding: EdgeInsets.only(left: 32.w, top: 24.w),
width: 150,
height: 150,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image:
AssetImage(R.ASSETS_IMAGES_CARD_YELLOW_PNG),)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
HomeNotification(items: _boardItemModels),
HomeTitle(
title: '公共资讯',
suffixTitle: '更多资讯',
onTap: () async {
final cancel = BotToast.showLoading();
BaseModel model = await NetUtil().get(API.news.category);
List<NewsCategoryModel>? category;
if (model.status == true && model.data != null) {
category = (model.data as List)
.map((e) => NewsCategoryModel.fromJson(e))
.toList();
}
cancel();
Get.to(
() => PublicInfomationPage(models: category ?? []));
Text(
'访客邀请',
style: TextStyle(
color: Color(0xD9000000),
fontSize: 26.sp,
fontWeight: FontWeight.bold),
),
10.hb,
Text(
'一键分享',
style: TextStyle(
color: Color(0x73000000),
fontSize: 20.sp,
),
),
Text(
'让拜访不再是难事',
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());
},
),
Container(
margin: EdgeInsets.only(top: 24.w,left: 25.w),
child: Column(
children: [
GestureDetector(
child: Container(
width: 195,
height: 69,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage(R.ASSETS_IMAGES_CARD_PINK_PNG),
)),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
20.wb,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
20.hb,
Text(
'一键报警',
style: TextStyle(
color: Color(0xD9000000),
fontSize: 26.sp,
fontWeight: FontWeight.bold),
),
10.hb,
Text(
'提交报警位置给物业',
style: TextStyle(
color: Color(0x73000000),
fontSize: 20.sp,
),
),
],
),
Spacer(),
Image.asset(R.ASSETS_ICONS_ICON_MAIN_POLICE_PNG,width: 100.w,height: 100.w,),
25.wb,
],
),
),
onTap: (){
Get.to(AlarmPage());
},
),
GestureDetector(
child: Container(
margin: EdgeInsets.only(top: 20.w),
width: 195,
height: 69,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage(R.ASSETS_IMAGES_CARD_BLUE_PNG),
)),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
20.wb,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
20.hb,
Text(
'建议咨询',
style: TextStyle(
color: Color(0xD9000000),
fontSize: 26.sp,
fontWeight: FontWeight.bold),
),
10.hb,
Text(
'欢迎给我们提供服务意见',
style: TextStyle(
color: Color(0x73000000),
fontSize: 20.sp,
),
),
],
),
Spacer(),
Image.asset(R.ASSETS_ICONS_ICON_MAIN_CONSULT_PNG,width: 100.w,height: 100.w,),
25.wb,
],
),
),
onTap: (){
Get.to(AdvicePage(type: AdviceType.SUGGESTION));
},
)
],
),
)
],
),
),
// SliverToBoxAdapter(
// child: 20.hb,
// ),
SliverToBoxAdapter(
child: Column(
children: [
// HomeTitle(
// title: '公共资讯',
// suffixTitle: '更多资讯',
// onTap: () async {
// final cancel = BotToast.showLoading();
// BaseModel model = await NetUtil().get(API.news.category);
// List<NewsCategoryModel>? category;
// if (model.status == true && model.data != null) {
// category = (model.data as List)
// .map((e) => NewsCategoryModel.fromJson(e))
// .toList();
// }
// cancel();
// Get.to(
// () => PublicInfomationPage(models: category ?? []));
// },
// ),
HomeTitle(
title: '社区活动',
suffixTitle: '更多活动',
suffixTitle: '查看全部',
onTap: () => Get.to(() => ActivityListPage()),
),
_activityItemModel == null
_activityItemModels == []
? SizedBox()
: ActivityCard(model: _activityItemModel)
.pSymmetric(h: 24.w, v: 24.w),
:Container(
height: 400.w,
padding: EdgeInsets.only(left: 32.w),
child: ListView.separated(
padding: EdgeInsets.zero,
separatorBuilder: (context, index) {
return SizedBox(width: 16.w,);
},
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) {
return Container(
width: 500.w,
child: Builder(
builder: (context) {
return ActivityCard(model: _activityItemModels[index]);
},
),
);
},
itemCount: _activityItemModels.length,
),
),
// : ActivityCard(model: _activityItemModel)
// .pSymmetric(h: 24.w, v: 24.w),
],
)
.box
.white
.withRounded(value: 8.w)
.clip(Clip.antiAlias)
.margin(EdgeInsets.symmetric(horizontal: 32.w))
.make(),
),
],
),
),
OverlayLivingBtnWidget()
],
),
);
}
Widget HomeSwiper() {
return Container(
width: double.infinity,
height: 320.w,
child: AspectRatio(
aspectRatio: 375 / 160,
child: Swiper(
key: UniqueKey(),
itemBuilder: (BuildContext context, int index) {
return getSwiperImage(_swiperModels[index]);
},
// CarouselSlider(
// items:
// _swiperModels.map((e) => getSwiperImage(e)).toList(),
// options: CarouselOptions(
// viewportFraction: 1.0,
// aspectRatio: 686 / 172,
// autoPlay: true,
// onPageChanged: (index, _) {
// setState(() {
// _currentIndicator = index;
// });
// },
// ),
pagination: SwiperPagination(
alignment: Alignment.bottomRight,
builder: SwiperCustomPagination(
builder: (BuildContext context, SwiperPluginConfig config) {
return RectIndicator(
position: config.activeIndex,
count: _swiperModels.length,
activeColor: Color(0x99FFFFFF),
color: Color(0xD9FFFFFF),
// keyColor
width: 4,
//
activeWidth: 14,
//
radius: 4,
//
height: 4,
); //
})),
scrollDirection: Axis.horizontal,
// control: new SwiperControl(),
autoplay: true,
onTap: (index) {
Get.to(() =>
PublicInformationDetailPage(id: _swiperModels[index].newsId!));
},
itemCount: _swiperModels.length,
),
),
);
}
Widget getSwiperImage(SwiperModel swiperModel) {
return Container(
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(swiperModel.voResourcesImgList)),
fit: BoxFit.fill,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
fit: BoxFit.fill,
);
},
),
);
}
Widget getFunction() {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
getFunctionBtn(
'报事报修', R.ASSETS_ICONS_ICON_MAIN_FIX_PNG, () => FixedSubmitPage()),
getFunctionBtn('设施预约', R.ASSETS_ICONS_ICON_MAIN_SUBSCRIBE_PNG,
() => FacilityAppointmentPage()),
getFunctionBtn('生活缴费', R.ASSETS_ICONS_ICON_MAIN_PAY_PNG,
() => LifePayChoosePage()),
getFunctionBtn('全部应用', R.ASSETS_ICONS_ICON_MAIN_ALL_PNG,
() => AllApplicationPage()),
],
);
}
Widget getFunctionBtn(String title, String path, dynamic page) {
return MaterialButton(
shape: StadiumBorder(),
padding: EdgeInsets.zero,
onPressed: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRoom(title)) return;
Get.to(page);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
path,
height: 80.w,
width: 80.w,
),
8.hb,
title.text.size(22.sp).color(Color(0xA6000000)).bold.make(),
],
),
);
}
}

@ -9,6 +9,7 @@ import 'package:aku_community/utils/headers.dart';
class AnimateAppBar extends StatefulWidget with PreferredSizeWidget {
final ScrollController? scrollController;
final List<Widget>? actions;
AnimateAppBar({Key? key, this.scrollController, this.actions})
: super(key: key);
@ -16,21 +17,22 @@ class AnimateAppBar extends StatefulWidget with PreferredSizeWidget {
_AnimateAppBarState createState() => _AnimateAppBarState();
@override
Size get preferredSize => Size.fromHeight(56);
Size get preferredSize => Size.fromHeight(45);
}
class _AnimateAppBarState extends State<AnimateAppBar> {
Color _bgColor = Colors.transparent;
Color _bgColor = Colors.white;
@override
void initState() {
super.initState();
widget.scrollController!.addListener(() {
setState(() {
_bgColor = widget.scrollController!.offset > 30
? Color(0xFFFFBD00)
? Colors.white
: widget.scrollController!.offset < 0
? Colors.transparent
: Color(0xFFFFBD00)
: Colors.white
.withOpacity((widget.scrollController!.offset / 30));
});
});
@ -39,16 +41,24 @@ class _AnimateAppBarState extends State<AnimateAppBar> {
@override
Widget build(BuildContext context) {
final appProvider = Provider.of<AppProvider>(context);
return AppBar(
title: Text(S.of(context)!.tempPlotName),
backgroundColor: _bgColor,
leading: Container(
margin: EdgeInsets.only(left: 32.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
return Padding(
padding: const EdgeInsets.only(top: 5),
child: AppBar(
titleSpacing: 10.0,
title: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if (appProvider.location != null)
Padding(
padding: const EdgeInsets.only(top: 2,right: 5),
child: Image.asset(
R.ASSETS_ICONS_ICON_MAIN_LOCATION_PNG,
width: 32.w,
height: 32.w,
),
),
Text(
appProvider.location!['city'] as String? ?? '',
style: TextStyle(
@ -56,17 +66,20 @@ class _AnimateAppBarState extends State<AnimateAppBar> {
fontSize: 24.sp,
color: Color(0xff333333),
),
textAlign: TextAlign.center,
),
Text(
'${appProvider.weatherType} ${appProvider.weatherTemp}',
'(${appProvider.weatherType} ${appProvider.weatherTemp})',
style: TextStyle(
fontSize: 20.sp,
color: Color(0xff333333),
fontSize: 24.sp,
color: Color(0xff999999),
),
)
]),
textAlign: TextAlign.center,
),
]),
backgroundColor: _bgColor,
actions: widget.actions,
),
);
}
}

@ -18,41 +18,42 @@ class _HomeSearchState extends State<HomeSearch> {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [Color(0xffffd000), Color(0xffffbd00)],
),
),
// decoration: BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.centerLeft,
// end: Alignment.centerRight,
// colors: [Color(0xffffd000), Color(0xffffbd00)],
// ),
// ),
color: Colors.white,
padding: EdgeInsets.only(
top: MediaQuery.of(context).padding.top,
left: 32.w,
right: 32.w,
bottom: 16.w,
),
child: MaterialButton(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
height: 72.w,
shape: StadiumBorder(),
elevation: 0,
minWidth: double.infinity,
color: Color(0xFFF3F3F3),
onPressed: () {
Get.to(() => BeeSearch());
},
child: Row(
children: [
Icon(
Icons.search,
size: 32.w,
color: Color(0xFF666666),
),
10.wb,
'搜索应用'.text.size(28.sp).color(ktextSubColor).make().expand(),
],
),
),
// child: MaterialButton(
// materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
// height: 72.w,
// shape: StadiumBorder(),
// elevation: 0,
// minWidth: double.infinity,
// color: Color(0xFFF3F3F3),
// onPressed: () {
// Get.to(() => BeeSearch());
// },
// child: Row(
// children: [
// Icon(
// Icons.search,
// size: 32.w,
// color: Color(0xFF666666),
// ),
// 10.wb,
// '搜索应用'.text.size(28.sp).color(ktextSubColor).make().expand(),
// ],
// ),
// ),
);
}
}

@ -1,3 +1,5 @@
import 'package:aku_community/utils/hive_store.dart';
import 'package:aku_community/utils/websocket/tips_dialog.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -22,8 +24,22 @@ class IndustryCommitteePage extends StatefulWidget {
_IndustryCommitteePageState createState() => _IndustryCommitteePageState();
}
class _IndustryCommitteePageState extends State<IndustryCommitteePage> {
EasyRefreshController _refreshController = EasyRefreshController();
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 0), () async {
var agreement = await HiveStore.appBox?.get('IndustryCommitteePage') ?? false;
if (!agreement) {
await TipsDialog.tipsDialog();
HiveStore.appBox!.put('IndustryCommitteePage',true);
}
});
}
Widget _buildBottomNavi() {
return [

@ -195,7 +195,7 @@ class ManagerFunc {
}
static Future<BaseModel> fromLoss(int? id) async {
BaseModel baseModel = await NetUtil().post(
BaseModel baseModel = await NetUtil().get(
API.manager.fromLoss,
params: {'articleBorrowId': id},
showMessage: true,

@ -79,6 +79,10 @@ class _PersonalIndexState extends State<PersonalIndex>
height: 106.w,
width: 106.w,
fit: BoxFit.cover,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 106.w,
width: 106.w,);
},
),
),
),

@ -171,6 +171,15 @@ class _FixedDetailPageState extends State<FixedDetailPage> {
.make()
],
),
Row(
children: [
'报修房屋'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
model.appReportRepairVo.roomName.text.black
.size(28.sp)
.make()
],
),
Row(
children: [
'派单类型'.text.color(ktextSubColor).size(28.sp).make(),

@ -14,12 +14,14 @@ import 'package:aku_community/widget/others/stack_avatar.dart';
class ActivityCard extends StatelessWidget {
final ActivityItemModel? model;
const ActivityCard({
Key? key,
required this.model,
}) : super(key: key);
bool get outdate => model!.end!.compareTo(DateTime.now()) == -1;
Widget build(BuildContext context) {
return MaterialButton(
clipBehavior: Clip.antiAlias,
@ -28,7 +30,7 @@ class ActivityCard extends StatelessWidget {
onPressed: () => Get.to(() => ActivityDetailPage(id: model!.id)),
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w),
borderRadius: BorderRadius.circular(24.w),
side: BorderSide(
color: Colors.grey,
),
@ -44,58 +46,109 @@ class ActivityCard extends StatelessWidget {
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(model!.imgUrls)),
height: 210.w,
height: 197.w,
width: double.infinity,
fit: BoxFit.cover,
),
),
),
model!.title!.text
.size(28.sp)
.black
Padding(
padding: EdgeInsets.only(left: 24.w, top: 24.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
constraints: BoxConstraints(maxWidth: 340.w),
child: Text(
model==null?'':model!.title!,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xD9000000),
fontSize: 28.sp,
fontWeight: FontWeight.bold),
),
),
Spacer(),
GestureDetector(
child: Container(
//color: Color(0x80FEBF76),
// shape: StadiumBorder(),
alignment: Alignment.center,
height: 39.w,
width: 98.w,
decoration: BoxDecoration(
color: outdate ? Color(0xFFABABAB) : Color(0x80FEBF76),
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: outdate
? '已结束'
.text
.size(22.sp)
.color(Color(0xFF666666))
.bold
.make()
.pSymmetric(h: 24.w, v: 16.w),
[
'地 点:'.text.size(24.sp).color(Color(0xFF999999)).make(),
model!.location!.text.size(24.sp).make(),
].row().pSymmetric(h: 24.w),
6.hb,
[
'活动时间:'.text.size(24.sp).color(Color(0xFF999999)).make(),
'${DateUtil.formatDate(
model!.begin,
format: 'MM月dd日 HH:mm',
)}${DateUtil.formatDate(
model!.end,
format: 'MM月dd日 HH:mm',
)}'
: '报名中'
.text
.size(24.sp)
.size(22.sp)
.color(Color(0xFFF48117))
.bold
.make(),
].row().pSymmetric(h: 24.w),
[
StackAvatar(
avatars: model!.headImgURls!.map((e) => e.url).toList()),
Spacer(),
MaterialButton(
elevation: 0,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
color: Color(0xFFFFC40C),
shape: StadiumBorder(),
height: 44.w,
minWidth: 120.w,
disabledColor: Color(0xFFABABAB),
onPressed: outdate
),
onTap: () {
outdate
? null
: () {
Get.to(() => ActivityDetailPage(id: model!.id));
};
},
child: outdate
? '已结束'.text.size(20.sp).bold.make()
: '去看看'.text.size(20.sp).bold.make(),
),
].row().p(24.w),
24.wb
],
),
),
// [
// '地 点:'.text.size(24.sp).color(Color(0xFF999999)).make(),
// model!.location!.text.size(24.sp).make(),
// ].row().pSymmetric(h: 24.w),
20.hb,
[
'报名截止:'.text.size(22.sp).color(Color(0x73000000)).make(),
'${DateUtil.formatDate(
model!.end,
format: 'yyyy年MM月dd日 HH:mm',
)}'
.text
.size(22.sp)
.color(Color(0x73000000))
.make(),
].row().pSymmetric(h: 24.w),
// [
// // StackAvatar(
// // avatars: model!.headImgURls!.map((e) => e.url).toList()),
// Spacer(),
// MaterialButton(
// elevation: 0,
// materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
// color: Color(0xFFFFC40C),
// shape: StadiumBorder(),
// height: 44.w,
// minWidth: 120.w,
// disabledColor: Color(0xFFABABAB),
// onPressed: outdate
// ? null
// : () {
// Get.to(() => ActivityDetailPage(id: model!.id));
// },
// child: outdate
// ? '已结束'.text.size(20.sp).bold.make()
// : '去看看'.text.size(20.sp).bold.make(),
// ),
// ].row().p(24.w),
],
),
);

@ -1,19 +1,30 @@
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/model/community/swiper_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';
class CommunityFunc {
static Future<ActivityItemModel?> activity() async {
BaseListModel model = await NetUtil().getList(
API.community.activityList,
params: {'pageNum': 1, 'size': 1},
params: {'pageNum': 1, 'size': 5},
);
if (model.tableList!.length == 0) return null;
return ActivityItemModel.fromJson(model.tableList!.first);
}
static Future<List<ActivityItemModel>> activityList() async {
BaseListModel model = await NetUtil().getList(
API.community.activityList,
params: {'pageNum': 1, 'size': 5},
);
if (model.tableList!.length == 0) return [];
return model.tableList!.map((e) => ActivityItemModel.fromJson(e)).toList();
}
static Future<List<BoardItemModel>> board() async {
BaseListModel model = await NetUtil().getList(
API.community.boardList,
@ -22,4 +33,15 @@ class CommunityFunc {
if (model.tableList!.length == 0) return [];
return model.tableList!.map((e) => BoardItemModel.fromJson(e)).toList();
}
static Future<List<SwiperModel>> swiper() async {
BaseModel model = await NetUtil().get(
API.community.getSwiper,
);
if (model.data!.length == 0)
return [];
return (model.data as List)
.map((e) => SwiperModel.fromJson(e))
.toList();
}
}

@ -74,6 +74,10 @@ class _ChatCardState extends State<ChatCard> {
child:FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(widget.model!.imgUrls)),
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 300.w,
width: 300.w,);
},
),
),
),
@ -293,7 +297,7 @@ class _ChatCardState extends State<ChatCard> {
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
widget.model!.headSculptureImgUrl!.length>0?
Material(
color: Color(0xFFF5F5F5),
borderRadius: BorderRadius.circular(6.w),
@ -305,8 +309,12 @@ class _ChatCardState extends State<ChatCard> {
height: 86.w,
width: 86.w,
fit: BoxFit.cover,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP,height: 86.w,
width: 86.w,);
},
),
),
):SizedBox(),
24.wb,
Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -1,7 +1,10 @@
import 'package:aku_community/utils/bee_date_util.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:flutter/rendering.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
@ -12,6 +15,7 @@ import 'package:aku_community/utils/headers.dart';
class HomeNotification extends StatefulWidget {
final List<BoardItemModel> items;
HomeNotification({Key? key, required this.items}) : super(key: key);
@override
@ -19,43 +23,193 @@ class HomeNotification extends StatefulWidget {
}
class _HomeNotificationState extends State<HomeNotification> {
late BoardItemModel boardItemModel;
bool isDate = true;
@override
void initState() {
super.initState();
if (widget.items != null) {
if (widget.items.length > 0) {
boardItemModel = widget.items[0];
}
}
}
@override
Widget build(BuildContext context) {
return Row(
children: [
85.hb,
24.wb,
Image.asset(
R.ASSETS_ICONS_ICON_NOTIFICATION_PNG,
height: 40.w,
width: 40.w,
R.ASSETS_IMAGES_NOTICE_PNG,
height: 45.w,
width: 61.w,
),
24.wb,
widget.items.isEmpty
? Spacer()
: Container(
alignment: Alignment.centerLeft,
height: 85.w,
child: AnimatedTextKit(
pause: Duration(milliseconds: 2000),
animatedTexts: widget.items
.map((e) => RotateAnimatedText(
e.title!,
duration: Duration(milliseconds: 3000),
))
.toList(),
repeatForever: true,
width: 295,
child: CarouselSlider(
items: widget.items.map((e) => getText(e)).toList(),
options: CarouselOptions(
scrollDirection: Axis.vertical,
viewportFraction: 1.0,
aspectRatio: 300 / 40,
autoPlay: true,
onPageChanged: (index, _) {
print(index.toString());
// setState(() {
// _currentIndicator = index;
// });
},
),
),
).expand(),
MaterialButton(
shape: StadiumBorder(),
padding: EdgeInsets.symmetric(horizontal: 12.w),
onPressed: () {
),
// Container(
// alignment: Alignment.centerLeft,
// height: 85.w,
// child:
// Row(
// children: [
// Container(
// width: 200,
// height: 22,
// alignment: Alignment.centerLeft,
// child: AnimatedTextKit(
// pause: Duration(milliseconds: 2000),
// animatedTexts: widget.items
// .map((e) {
// return RotateAnimatedText(
// e.title!,
// textStyle: TextStyle(
// color: Color(0xA6000000),
// fontSize: 22.sp,
// fontWeight: FontWeight.bold,
//
//
// ),
// duration: Duration(milliseconds: 3000),
// );
// }
//
// )
// .toList(),
// repeatForever: true,
// onNext: (index,bool){
// print('next');
// boardItemModel = widget.items[index];
// isDate = true;
// setState(() {
// });
// },
// onNextBeforePause: (index,bool){
// print('before');
// isDate = false;
// setState(() {
// });
// },
// ),
// ),
//
//
// ],
// )
//
// ).expand(),
// isDate
// ? MaterialButton(
// shape: StadiumBorder(),
// padding: EdgeInsets.symmetric(horizontal: 12.w),
// onPressed: () {
// Get.to(() => NoticePage());
// },
// child: Row(
// children: [
// Container(
// constraints: BoxConstraints(minWidth: 60),
// child: Text(
// isDate
// ? boardItemModel.releaseDate != null
// ? BeeDateUtil(boardItemModel.releaseDate)
// .timeAgo
// : ''
// : '',
// style: TextStyle(
// color: Color(0x73000000),
// fontSize: 20.sp,
// ),
// )
// // AnimatedTextKit(
// // pause: Duration(milliseconds: 2000),
// // animatedTexts: widget.items
// // .map((e) => RotateAnimatedText(
// // e.releaseDate!=null?BeeDateUtil(e.releaseDate)
// // .timeAgo:'',
// //
// // textStyle: TextStyle(
// // color: Color(0x73000000),
// // fontSize: 20.sp,
// //
// // ),
// // duration: Duration(milliseconds: 3000),
// // ))
// // .toList(),
// // repeatForever: true,
// // ),
// ),
// 8.wb,
// Icon(
// CupertinoIcons.chevron_forward,
// size: 24.w,
// color: Color(0xFF999999),
// ),
// ],
// ),
// )
// : SizedBox(),
12.wb,
],
);
}
Widget getText(BoardItemModel e) {
return GestureDetector(
onTap: (){
Get.to(() => NoticePage());
},
child: Container(
width: 295,
color: Colors.transparent,
child: Row(
children: [
'更多公告'.text.size(20.sp).color(Color(0xFF999999)).make(),
Container(
constraints: BoxConstraints(
maxWidth: 230
),
child: Text(
e.title ?? '',
style: TextStyle(
color: Color(0xA6000000),
fontSize: 22.sp,
fontWeight: FontWeight.bold,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
)),
Spacer(),
Container(
child: Text(
e.releaseDate != null ? BeeDateUtil(e.releaseDate).timeAgo : '',
style: TextStyle(
color: Color(0x73000000),
fontSize: 20.sp,
),
)),
8.wb,
Icon(
CupertinoIcons.chevron_forward,
@ -65,8 +219,6 @@ class _HomeNotificationState extends State<HomeNotification> {
],
),
),
12.wb,
],
);
}
}

@ -23,18 +23,18 @@ class HomeTitle extends StatelessWidget {
return Row(
children: [
85.hb,
24.wb,
32.wb,
Stack(
children: [
Positioned(
left: 0,
right: 0,
bottom: 4.w,
child: Container(
color: kPrimaryColor,
height: 8.w,
),
),
// Positioned(
// left: 0,
// right: 0,
// bottom: 4.w,
// child: Container(
// color: kPrimaryColor,
// height: 8.w,
// ),
// ),
title.text.size(32.sp).bold.make(),
],
),
@ -45,7 +45,7 @@ class HomeTitle extends StatelessWidget {
onPressed: onTap,
child: Row(
children: [
suffixTitle.text.size(20.sp).color(Color(0xFF999999)).make(),
suffixTitle.text.size(24.sp).color(Color(0xFF999999)).make(),
8.wb,
Icon(
CupertinoIcons.chevron_forward,

@ -1,3 +1,5 @@
import 'package:aku_community/utils/hive_store.dart';
import 'package:aku_community/utils/websocket/tips_dialog.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -69,6 +71,13 @@ class _AdvicePageState extends State<AdvicePage> with TickerProviderStateMixin {
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 0), () async {
var agreement = await HiveStore.appBox?.get('AdvicePage') ?? false;
if (!agreement) {
await TipsDialog.tipsDialog();
HiveStore.appBox!.put('AdvicePage',true);
}
});
_tabController = TabController(length: 2, vsync: this);
}

@ -1,3 +1,5 @@
import 'package:aku_community/utils/hive_store.dart';
import 'package:aku_community/utils/websocket/tips_dialog.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -25,6 +27,13 @@ class _HouseKeepingPageState extends State<HouseKeepingPage>
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 0), () async {
var agreement = await HiveStore.appBox?.get('HouseKeepingPage') ?? false;
if (!agreement) {
await TipsDialog.tipsDialog();
HiveStore.appBox!.put('HouseKeepingPage',true);
}
});
_controller = TabController(length: _tabs.length, vsync: this);
}

@ -1,3 +1,5 @@
import 'package:aku_community/utils/hive_store.dart';
import 'package:aku_community/utils/websocket/tips_dialog.dart';
import 'package:flutter/material.dart';
import 'package:flustars/flustars.dart';
@ -26,6 +28,14 @@ class _QuestionnairePageState extends State<QuestionnairePage> {
@override
void initState() {
super.initState();
Future.delayed(Duration(milliseconds: 0), () async {
var agreement = await HiveStore.appBox?.get('QuestionnairePage') ?? false;
if (!agreement) {
await TipsDialog.tipsDialog();
HiveStore.appBox!.put('QuestionnairePage',true);
}
});
}
String _getButtonText(int? status) {

@ -39,7 +39,12 @@ class GoodsCard extends StatelessWidget {
children: [
FadeInImage.assetNetwork(
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
image: API.image(ImgModel.first(item.imgList))),
image: API.image(ImgModel.first(item.imgList)),
fit: BoxFit.fill,
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(R.ASSETS_IMAGES_PLACEHOLDER_WEBP);
},
),
Positioned(
left: 0,
right: 0,

@ -1,3 +1,5 @@
import 'dart:ui';
class BeeMap {
static Map<int, String> fixTag = {
1: '公区报修',
@ -37,9 +39,11 @@ class BeeMap {
1: '自己搬运',
2: '搬家公司',
};
static Map<int, String> goodsOutStatus = {1: '审核中', 2: '审核通过', 3: '审核失败'};
static Map<int, String> goodsOutStatus = {1: '审核中', 2: '审核通过', 3: '审核驳回'};
static Map<int, String> borrowStatus = {-1: '出借审核中',0: '出借审核驳回',1: '出借中', 2: '已归还', 3: '归还审核中',4:'归还审核驳回'};
static Map<int, String> borrowStatus = {1: '出借中', 2: '已归还', 3: '待检查'};
static Map<int, Color> borrowStatusColor = {-1: Color(0xFFFF8200),0: Color(0xFFE60E0E),1: Color(0xD9000000), 2: Color(0xFF999999), 3: Color(0xFFFF8200),4:Color(0xFFE60E0E)};
static Map<int, String> votingStatus = {
1: '未开始',

@ -0,0 +1,46 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:aku_community/extensions/num_ext.dart';
import 'package:aku_community/pages/tab_navigator.dart';
import 'package:aku_community/utils/developer_util.dart';
class TipsDialog {
static tipsDialog() async {
await Get.dialog(
CupertinoAlertDialog(
title: Text('功能提醒'),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
20.hb,
Row(
children: [
Text('请各位住户注意:'
,style: TextStyle(color: Color(0xA6000000),fontSize: 26.sp),),
],
),
20.hb,
Text('本功能已实现,但当前小区不具备能够使用该功能使用的条件,页面内容仅供参考。'
,style: TextStyle(color: Color(0xA6000000),fontSize: 26.sp),textAlign: TextAlign.start,),
20.hb,
],
),
actions: [
CupertinoDialogAction(
child: Text('确定'),
textStyle: TextStyle(color: Color(0xFF007AFF),fontSize: 28.sp),
onPressed: () => Get.back(),
),
],
),
barrierDismissible: false,
);
}
}

@ -0,0 +1,139 @@
import 'package:aku_community/pages/opening_code_page/opening_code_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/utils/headers.dart';
import 'package:get/get.dart';
class OverlayLivingBtnWidget extends StatefulWidget {
OverlayLivingBtnWidget({Key? key, }) : super(key: key);
@override
_OverlayLivingBtnWidgetState createState() => _OverlayLivingBtnWidgetState();
}
class _OverlayLivingBtnWidgetState extends State<OverlayLivingBtnWidget> with TickerProviderStateMixin{
double _topPos = 0;
double _leftPos = 0;
bool _isMoving = false;
double _width = 65;
double get _subWidth => _width / 2;
double _height = 65;
double get _subHeight => _height / 2;
bool _isHide = false;
@override
void initState() {
super.initState();
_topPos = ScreenUtil().screenHeight - 20 - _height -50;
_leftPos = _leftPos = ScreenUtil().screenWidth-20 - _width;
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return AnimatedPositioned(
left: _isHide ? -_width : _leftPos,
top: _topPos,
child: Container(
child: Stack(
children: [
Positioned(
left: 0,
right: 0,
top: 0,
bottom: 0,
child: Container(
width: 65.w,
height: 65.w,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image:
AssetImage(R.ASSETS_ICONS_ICON_MAIN_OPEN_PNG),)
),
),
),
GestureDetector(
onTap: () {
Get.to(OpeningCodePage());
},
onPanUpdate: (detail) {
setState(() {
_topPos = detail.globalPosition.dy - _subHeight;
_leftPos = detail.globalPosition.dx - _subWidth;
});
},
onPanStart: (detail) {
setState(() {
_isMoving = true;
});
},
onPanEnd: (detail) {
_isMoving = false;
if (_leftPos < 20) _leftPos = 20;
if (_topPos < ScreenUtil().statusBarHeight + 20)
_topPos = (20 + ScreenUtil().statusBarHeight);
if ((_leftPos + _width + 20) > ScreenUtil().screenWidth)
_leftPos = ScreenUtil().screenWidth - 20 - _width;
if ((_topPos + _height + 55 + 20) > ScreenUtil().screenHeight)
_topPos = ScreenUtil().screenHeight- 20 - _height - 55;
setState(() {});
},
child: Container(
height: _height,
width: _width,
color: Colors.transparent,
),
),
// Positioned(
// right: 5,
// top: 5,
// child: GestureDetector(
// onTap: () {
// setState(() {
// _isHide = true;
// });
// },
// child: Container(
// height: 20,
// width: 20,
// child: Icon(
// Icons.clear,
// size: 16,
// color: Colors.black,
// ),
// decoration: BoxDecoration(
// color: Colors.white.withOpacity(0.3),
// borderRadius: BorderRadius.circular(10),
// ),
// ),
// ),
// ),
],
),
),
curve: Curves.easeInOutCubic,
duration: _isMoving ? Duration.zero : Duration(milliseconds: 300),
);
}
}

@ -0,0 +1,61 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class RectIndicator extends StatelessWidget {
final int position;
final int count;
final Color color;
final Color activeColor;
final double width;
final double activeWidth;
final double height;
final double radius;
RectIndicator({
Key? key,
this.width: 50.0,
this.activeWidth: 50.0,
this.height: 4,
required this.position,
required this.count,
this.color: Colors.white,
required this.radius,
this.activeColor: const Color(0xFF3E4750),
}) : assert(count != null && position != null),
super(key: key);
_indicator(bool isActive) {
return AnimatedContainer(
margin: EdgeInsets.symmetric(horizontal: 3.0), //
height: height,
width: isActive ? activeWidth : width,
decoration: BoxDecoration(
color: isActive ? color : activeColor,
boxShadow: [
BoxShadow(
color: Colors.black12,
offset: Offset(0.0, 2.0),
blurRadius: 0.0)
],
borderRadius: BorderRadius.circular(radius )),
duration: Duration(milliseconds: 150),
);
}
_buildPageIndicators() {
List<Widget> indicatorList = [];
for (int i = 0; i < count; i++) {
indicatorList.add(i == position ? _indicator(true) : _indicator(false));
}
return indicatorList;
}
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: _buildPageIndicators(),
);
}
}

@ -12,17 +12,17 @@ class ApplicationBox extends StatelessWidget {
@override
Widget build(BuildContext context) {
return VxBox(child: child)
.margin(EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w))
// .margin(EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w))
.padding(EdgeInsets.all(24.w))
.color(Colors.white)
.withRounded(value: 8.w)
.withShadow([
BoxShadow(
color: Colors.grey.withOpacity(0.2),
offset: Offset(1.1, 1.1),
blurRadius: 10.0,
)
])
// .withShadow([
// BoxShadow(
// color: Colors.grey.withOpacity(0.2),
// offset: Offset(1.1, 1.1),
// blurRadius: 10.0,
// )
// ])
.make()
.centered();
}

@ -70,7 +70,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.5.0"
version: "2.6.1"
auto_size_text_pk:
dependency: transitive
description:
@ -176,6 +176,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
carousel_slider:
dependency: "direct main"
description:
name: carousel_slider
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.0"
characters:
dependency: transitive
description:
@ -503,6 +510,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.0"
flutter_swiper_null_safety:
dependency: "direct main"
description:
name: flutter_swiper_null_safety
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
@ -1079,7 +1093,7 @@ packages:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0"
version: "1.8.1"
sp_util:
dependency: transitive
description:
@ -1149,7 +1163,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.19"
version: "0.3.0"
timing:
dependency: transitive
description:

@ -2,7 +2,7 @@ name: aku_community
description: A new Flutter project.
publish_to: "none"
version: 1.8.2-dev+46
version: 1.8.3-dev+47
environment:
sdk: ">=2.12.0 <3.0.0"
@ -108,6 +108,10 @@ dependencies:
expandable: ^5.0.1
#加载网络图片
cached_network_image: ^3.1.0
#轮播图
flutter_swiper_null_safety: ^1.0.2
#划动组件
carousel_slider: ^4.0.0-nullsafety.0
dev_dependencies:
flutter_test:

Loading…
Cancel
Save