# Conflicts:
#	lib/pages/home/home_page.dart
pull/1/head
戴余标 3 years ago
commit 8e51109009

@ -4,7 +4,7 @@
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application android:name="io.flutter.app.FlutterApplication" android:label="小蜜蜂智慧小区" android:icon="@mipmap/ic_launcher" android:networkSecurityConfig="@xml/network_security_config">
<application android:name="io.flutter.app.FlutterApplication" android:label="小蜜蜂" android:icon="@mipmap/ic_launcher" android:networkSecurityConfig="@xml/network_security_config">
<service android:name="com.amap.api.location.APSService"></service>
<meta-data android:name="com.amap.api.v2.apikey"
android:value="f6361c0537bf2d6ddb898b10618d3726"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

After

Width:  |  Height:  |  Size: 914 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

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: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 70 KiB

@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iTunesArtwork@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "iTunesArtwork@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

@ -6,10 +6,12 @@
"scale" : "1x"
},
{
"filename" : "iTunesArtwork@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "iTunesArtwork@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

@ -272,8 +272,6 @@ class _Manager {
///id
String get articleReturnList => '/user/articleBorrow/findBorrowByUserId';
///list
String get dailyPaymentList => '/user/dailyPayment/list';
///
String get findEstatelsPament => '/user/dailyPayment/findEstateIsPayment';
@ -388,6 +386,9 @@ class _Manager {
///+
String get findUnpaidAmount => '/user/dailyPayment/findUnpaidAmount';
///list
String get dailyPaymentList => '/user/dailyPayment/list';
}
class _Community {

@ -12,7 +12,7 @@ import 'package:aku_new_community/pages/goods_deto_page/goods_deto_page.dart';
import 'package:aku_new_community/pages/goods_manage_page/select_borrow_return_page.dart';
import 'package:aku_new_community/pages/house_introduce/house_introduce.dart';
import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_choose_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart';
import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart';
import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_page.dart';
@ -74,8 +74,8 @@ List<AO> appObjects = [
AO('开门码', R.ASSETS_ICONS_FUNC_KMM_PNG, () => OpeningCodePage()),
AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => VisitorAccessPage()),
AO('报事报修', R.ASSETS_ICONS_FUNC_BSBX_PNG, () => WorkOrderPage()),
AO('生活缴费', R.ASSETS_ICONS_FUNC_SHJF_PNG, () => LifePayChoosePage()),
AO('报事报修', Assets.home.icBsbx.path, () => WorkOrderPage()),
AO('生活缴费', Assets.home.icShjf.path, () => LifePayPageNew()),
AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()),
AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG,
() => AdvicePage(type: AdviceType.SUGGESTION)),
@ -88,7 +88,7 @@ List<AO> appObjects = [
AO('装修管理', R.ASSETS_ICONS_FUNC_ZXGL_PNG, () => NewRenovationPage()),
AO('借还管理', R.ASSETS_ICONS_FUNC_JHGL_PNG, () => SelectBorrowReturnPage()),
AO('一键报警', R.ASSETS_ICONS_FUNC_YJBJ_PNG, () => AlarmPage()),
AO('设施预约', R.ASSETS_ICONS_FUNC_SSYY_PNG, () => FacilityAppointmentPage()),
AO('设施预约', Assets.home.icSsyy.path, () => FacilityAppointmentPage()),
AO('快递包裹', R.ASSETS_ICONS_FUNC_KDBG_PNG, () => ExpressPackagePage()),
AO('电子商务', R.ASSETS_ICONS_FUNC_DZSW_PNG, () => ElectronicCommercPage()),
AO('服务浏览', R.ASSETS_ICONS_FUNC_FWLL_PNG, () => ServiceBrowsePage()),
@ -98,15 +98,15 @@ List<AO> appObjects = [
AO('地理信息', R.ASSETS_ICONS_FUNC_DLXX_PNG, () => GeographicInformationPage()),
AO('周边企业', R.ASSETS_ICONS_FUNC_ZBQY_PNG, () => SurroundingEnterprisesPage()),
AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()),
AO('智慧养老', Assets.icons.provideAged.path, () => OldAgeSupportPageSimple()),
AO('周边服务', Assets.icons.nearbyService.path, null),
AO('小蜜蜂任务', Assets.icons.beeTask.path, () => TaskPage()),
AO('智慧养老', Assets.home.icZhyl.path, () => OldAgeSupportPageSimple()),
AO('周边服务', Assets.home.icZbfw.path, null),
AO('任务发布', Assets.home.icRwfb.path, () => TaskPage()),
AO('自营商城', Assets.icons.shoppingMall.path, null),
AO('邻家宠物', Assets.icons.nearbyPet.path, null),
AO('邻家宠物', Assets.home.icLjcw.path, null),
AO('共享停车', Assets.icons.sharePark.path, null),
AO('二手市场', Assets.icons.secondHandMarket.path, null),
AO('共享投屏', Assets.icons.projectionScreen.path, null),
AO('全部应用', Assets.icons.funcAll.path, () => AllApplicationPage()),
AO('全部应用', Assets.home.icQbyy.path, () => AllApplicationPage()),
// AO(
// '小区教育',
@ -157,28 +157,9 @@ List<AO> userAppObjects = [
AO allApp =
AO('全部应用', R.ASSETS_APPLICATIONS_ALL_APP_PNG, () => AllApplicationPage());
/// original value
///线 original value
List<String> _recommendApp = [
// if (false) '一键开门',
'访客邀请',
'报事报修',
'建议咨询',
'一键报警',
'共享投屏',
'二手市场',
'共享停车',
];
///
List<AO> get recommendApp => _recommendApp.map((e) => AO.fromRaw(e)).toList();
/// original value
List<String> _smartManagerApp = [
// if (false) '一键开门',
'开门码',
'访客邀请',
'报事报修',
'生活缴费',
'业委会',
'建议咨询',
'便民电话',
@ -186,24 +167,34 @@ List<String> _smartManagerApp = [
'物品出门',
'投诉表扬',
'问卷调查',
'装修管理',
'借还管理',
'一键报警',
'设施预约',
'快递包裹',
'电子商务',
'服务浏览',
'社区介绍',
'家政服务',
'地理信息',
'周边企业',
'住房说明'
'住房说明',
'智慧养老',
'周边服务',
'自营商城',
'邻家宠物',
'共享停车',
'二手市场',
'共享投屏',
];
// '小区教育',
// '健康运动',
// '家政服务',
// '居家养老',
// '物业租赁',
///线
List<AO> get recommendApp => _recommendApp.map((e) => AO.fromRaw(e)).toList();
/// original value
List<String> _smartManagerApp = [
'开门码',
'报事报修',
'生活缴费',
'一键报警',
'任务发布',
];
///
@ -268,7 +259,7 @@ List<String> _aboutCommunityApp = [
List<AO> get aboutCommunityApp =>
_aboutCommunityApp.map((e) => AO.fromRaw(e)).toList();
List<String> _wisdomServiceApp = ['智慧养老', '周边服务', '小蜜蜂任务', '共享投屏'];
List<String> _wisdomServiceApp = ['智慧养老', '周边服务', '任务发布', '共享投屏'];
List<AO> get wisdomServiceApp =>
_wisdomServiceApp.map((e) => AO.fromRaw(e)).toList();

@ -7,6 +7,9 @@ class _ProfileApi {
}
class _MyHouse {
///
String get switchDefaultEstate => '/app/user/myEstate/checkEstate';
///
String get userHouse => '/app/user/myEstate/findAllMyEstate';

@ -34,6 +34,7 @@ class SAASAPI {
static _Information information = _Information();
static _WorkOrder workOrder = _WorkOrder();
static _Pay pay = _Pay();
static _LifePay lifePay = _LifePay();
///
static _ProfileApi profile = _ProfileApi();
@ -261,4 +262,25 @@ class _Pay {
///app
String get jcookOrderCheckAlipay => '/app/user/alipay/jcookOrderCheckAlipay';
///
String get createPrepaymentOrder => '/app/user/alipay/createPrepaymentOrder';
///app
String get prepaymentOrderCheckAlipay => '/app/user/alipay/prepaymentOrderCheckAlipay';
}
class _LifePay{
///
String get livingExpensesList => '/app/user/livingExpenses/list';
///
String get paymentRecordList => '/app/user/livingExpenses/paymentRecord';
///
String get findEstateBalance => '/app/user/livingExpenses/findEstateBalance';
}

@ -124,6 +124,59 @@ class $AssetsBraceletGen {
const AssetGenImage('assets/bracelet/xiaomi6.png');
}
class $AssetsHomeGen {
const $AssetsHomeGen();
/// File path: assets/home/ic_bsbx.png
AssetGenImage get icBsbx => const AssetGenImage('assets/home/ic_bsbx.png');
/// File path: assets/home/ic_gonggao.png
AssetGenImage get icGonggao =>
const AssetGenImage('assets/home/ic_gonggao.png');
/// File path: assets/home/ic_ljcw.png
AssetGenImage get icLjcw => const AssetGenImage('assets/home/ic_ljcw.png');
/// File path: assets/home/ic_location.png
AssetGenImage get icLocation =>
const AssetGenImage('assets/home/ic_location.png');
/// File path: assets/home/ic_message.png
AssetGenImage get icMessage =>
const AssetGenImage('assets/home/ic_message.png');
/// File path: assets/home/ic_qbyy.png
AssetGenImage get icQbyy => const AssetGenImage('assets/home/ic_qbyy.png');
/// File path: assets/home/ic_rwfb.png
AssetGenImage get icRwfb => const AssetGenImage('assets/home/ic_rwfb.png');
/// File path: assets/home/ic_search.png
AssetGenImage get icSearch =>
const AssetGenImage('assets/home/ic_search.png');
/// File path: assets/home/ic_shjf.png
AssetGenImage get icShjf => const AssetGenImage('assets/home/ic_shjf.png');
/// File path: assets/home/ic_ssyy.png
AssetGenImage get icSsyy => const AssetGenImage('assets/home/ic_ssyy.png');
/// File path: assets/home/ic_zbfw.png
AssetGenImage get icZbfw => const AssetGenImage('assets/home/ic_zbfw.png');
/// File path: assets/home/ic_zhyl.png
AssetGenImage get icZhyl => const AssetGenImage('assets/home/ic_zhyl.png');
/// File path: assets/home/img_fkyq.png
AssetGenImage get imgFkyq => const AssetGenImage('assets/home/img_fkyq.png');
/// File path: assets/home/img_jyzx.png
AssetGenImage get imgJyzx => const AssetGenImage('assets/home/img_jyzx.png');
/// File path: assets/home/img_yjbj.png
AssetGenImage get imgYjbj => const AssetGenImage('assets/home/img_yjbj.png');
}
class $AssetsIconsGen {
const $AssetsIconsGen();
@ -663,6 +716,10 @@ class $AssetsIconsGen {
AssetGenImage get leaseHouse =>
const AssetGenImage('assets/icons/lease_house.png');
/// File path: assets/icons/life_pay_record.png
AssetGenImage get lifePayRecord =>
const AssetGenImage('assets/icons/life_pay_record.png');
/// File path: assets/icons/like.png
AssetGenImage get like => const AssetGenImage('assets/icons/like.png');
@ -1296,6 +1353,7 @@ class Assets {
static const $AssetsApplicationsGen applications = $AssetsApplicationsGen();
static const $AssetsBraceletGen bracelet = $AssetsBraceletGen();
static const $AssetsHomeGen home = $AssetsHomeGen();
static const $AssetsIconsGen icons = $AssetsIconsGen();
static const $AssetsImagesGen images = $AssetsImagesGen();
static const $AssetsJsonGen json = $AssetsJsonGen();

@ -0,0 +1,33 @@
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'life_pay_model.g.dart';
@JsonSerializable(createToJson: true, explicitToJson: true)
class LifePayModel extends Equatable {
final int id;
final String chargesName;
final String billDateStart;
final String billDateEnd;
final String createDate;
final double payPrincipal;
final double defaultAmount;
factory LifePayModel.fromJson(Map<String, dynamic> json) =>_$LifePayModelFromJson(json);
Map<String,dynamic> toJson()=> _$LifePayModelToJson(this);
LifePayModel({
required this.id,
required this.chargesName,
required this.billDateStart,
required this.billDateEnd,
required this.createDate,
required this.payPrincipal,
required this.defaultAmount,
});
@override
List<Object?> get props => [id, chargesName, billDateStart,billDateEnd,createDate,payPrincipal,defaultAmount];
}

@ -0,0 +1,28 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'life_pay_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
LifePayModel _$LifePayModelFromJson(Map<String, dynamic> json) => LifePayModel(
id: json['id'] as int,
chargesName: json['chargesName'] as String,
billDateStart: json['billDateStart'] as String,
billDateEnd: json['billDateEnd'] as String,
createDate: json['createDate'] as String,
payPrincipal: (json['payPrincipal'] as num).toDouble(),
defaultAmount: (json['defaultAmount'] as num).toDouble(),
);
Map<String, dynamic> _$LifePayModelToJson(LifePayModel instance) =>
<String, dynamic>{
'id': instance.id,
'chargesName': instance.chargesName,
'billDateStart': instance.billDateStart,
'billDateEnd': instance.billDateEnd,
'createDate': instance.createDate,
'payPrincipal': instance.payPrincipal,
'defaultAmount': instance.defaultAmount,
};

@ -6,26 +6,20 @@ part 'life_pay_record_model.g.dart';
@JsonSerializable()
class LifePayRecordModel extends Equatable {
final int id;
final String chargesTemplateDetailName;
final String roomName;
final String years;
final num paidPrice;
final String createName;
final String chargesName;
final String communityName;
final String buildingName;
final String unitName;
final String estateName;
final String billDateStart;
final String billDateEnd;
final String billCreateDate;
final num payAmount;
final String createDate;
final int payType;
final String code;
LifePayRecordModel({
required this.id,
required this.chargesTemplateDetailName,
required this.roomName,
required this.years,
required this.paidPrice,
required this.createName,
required this.createDate,
required this.payType,
required this.code,
});
factory LifePayRecordModel.fromJson(Map<String, dynamic> json) =>
_$LifePayRecordModelFromJson(json);
@ -34,14 +28,34 @@ class LifePayRecordModel extends Equatable {
List<Object> get props {
return [
id,
chargesTemplateDetailName,
roomName,
years,
paidPrice,
createName,
chargesName,
communityName,
buildingName,
unitName,
estateName,
billDateStart,
billDateEnd,
billCreateDate,
payAmount,
createDate,
payType,
code,
];
}
LifePayRecordModel({
required this.id,
required this.chargesName,
required this.communityName,
required this.buildingName,
required this.unitName,
required this.estateName,
required this.billDateStart,
required this.billDateEnd,
required this.billCreateDate,
required this.payAmount,
required this.createDate,
required this.payType,
required this.code,
});
}

@ -9,11 +9,15 @@ part of 'life_pay_record_model.dart';
LifePayRecordModel _$LifePayRecordModelFromJson(Map<String, dynamic> json) =>
LifePayRecordModel(
id: json['id'] as int,
chargesTemplateDetailName: json['chargesTemplateDetailName'] as String,
roomName: json['roomName'] as String,
years: json['years'] as String,
paidPrice: json['paidPrice'] as num,
createName: json['createName'] as String,
chargesName: json['chargesName'] as String,
communityName: json['communityName'] as String,
buildingName: json['buildingName'] as String,
unitName: json['unitName'] as String,
estateName: json['estateName'] as String,
billDateStart: json['billDateStart'] as String,
billDateEnd: json['billDateEnd'] as String,
billCreateDate: json['billCreateDate'] as String,
payAmount: json['payAmount'] as num,
createDate: json['createDate'] as String,
payType: json['payType'] as int,
code: json['code'] as String,

@ -1,3 +1,4 @@
import 'package:aku_new_community/model/common/img_model.dart';
import 'package:json_annotation/json_annotation.dart';
part 'market_all_category_model.g.dart';
@ -6,7 +7,7 @@ part 'market_all_category_model.g.dart';
class MarketAllCategoryModel {
final int id;
final String? name;
final List<String> imgUrls;
final List<ImgModel> imgUrls;
final List<MarketAllCategoryModel> categoryList;
factory MarketAllCategoryModel.fromJson(Map<String, dynamic> json) =>
_$MarketAllCategoryModelFromJson(json);

@ -11,8 +11,9 @@ MarketAllCategoryModel _$MarketAllCategoryModelFromJson(
MarketAllCategoryModel(
id: json['id'] as int,
name: json['name'] as String?,
imgUrls:
(json['imgUrls'] as List<dynamic>).map((e) => e as String).toList(),
imgUrls: (json['imgUrls'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
categoryList: (json['categoryList'] as List<dynamic>)
.map(
(e) => MarketAllCategoryModel.fromJson(e as Map<String, dynamic>))

@ -1,3 +1,4 @@
import 'package:aku_new_community/model/common/img_model.dart';
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
@ -7,7 +8,7 @@ part 'market_category_model.g.dart';
class MarketCategoryModel extends Equatable {
final int id;
final String? name;
final List<String> imgUrls;
final List<ImgModel> imgUrls;
@override
List<Object?> get props => [id];

@ -10,6 +10,7 @@ MarketCategoryModel _$MarketCategoryModelFromJson(Map<String, dynamic> json) =>
MarketCategoryModel(
id: json['id'] as int,
name: json['name'] as String?,
imgUrls:
(json['imgUrls'] as List<dynamic>).map((e) => e as String).toList(),
imgUrls: (json['imgUrls'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);

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

@ -1,3 +1,6 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/models/life_pay/life_pay_record_model.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:aku_new_community/utils/headers.dart';
@ -5,7 +8,9 @@ import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'widget/bill_card.dart';
class LifePayBillPage extends StatefulWidget {
LifePayBillPage({Key? key}) : super(key: key);
final LifePayRecordModel model;
LifePayBillPage({Key? key, required this.model}) : super(key: key);
@override
_LifePayBillPageState createState() => _LifePayBillPageState();
@ -35,6 +40,14 @@ class _LifePayBillPageState extends State<LifePayBillPage> {
);
}
Map<int, String> getPayType = {
1: '支付宝',
2: '微信',
3: '现金',
4: 'pos',
5: '预缴扣除'
};
@override
Widget build(BuildContext context) {
return BeeScaffold(
@ -53,13 +66,71 @@ class _LifePayBillPageState extends State<LifePayBillPage> {
),
child: Column(
children: [
_cardList('收费项目', '公共能耗费'),
_cardList('收费项目', widget.model.chargesName),
SizedBox(height: 30.w),
_cardList('收费地址', '深蓝公寓 1幢1单元306室'),
_cardList('收费地址',
'${S.of(context)!.tempPlotName} ${widget.model.unitName + widget.model.estateName}'),
],
),
),
BillCard(),
Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
padding: EdgeInsets.only(
left: 20.w,
right: 20.w,
bottom: 32.w,
top: 2.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_billItem('账单月份',DateUtil.formatDate(DateTime.parse(widget.model.billDateStart),
format: 'yyyy-MM'),),
_billItem('缴纳金额','¥'+widget.model.payAmount.toStringAsFixed(2),isRed: true),
_billItem('缴费时间',DateUtil.formatDate(DateTime.parse(widget.model.createDate),
format: 'yyyy/MM/dd hh:mm'),),
_billItem('付款方式', '${getPayType[widget.model.payType]}'),
_billItem('账单创建时间',DateUtil.formatDate(DateTime.parse(widget.model.billCreateDate),
format: 'yyyy/MM/dd hh:mm'),),
_billItem('流水号',widget.model.code,),
]
),
),
],
),
);
}
Container _billItem(String title,String value, { bool isRed = false}) {
return Container(
margin: EdgeInsets.only(top: 30.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
title,
style: TextStyle(
fontSize: BaseStyle.fontSize28,
color: ktextSubColor,
),
),
Text(
value,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize28,
color: isRed?Color(0xFFF5222D) :ktextPrimary,
),
),
],
),
);

@ -0,0 +1,583 @@
import 'dart:convert';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/life_pay/life_pay_list_model.dart';
import 'package:aku_new_community/models/life_pay/life_pay_model.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_record_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pre_pay_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_util.dart';
import 'package:aku_new_community/pages/life_pay/widget/life_pay_detail_page.dart';
import 'package:aku_new_community/pages/life_pay/widget/life_pay_detail_page_new.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart';
import 'package:aku_new_community/utils/bee_parse.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/network/base_list_model.dart';
import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_check_radio.dart';
import 'package:aku_new_community/widget/others/house_head_card.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart' hide Response;
import 'package:provider/provider.dart';
class LifePayPageNew extends StatefulWidget {
LifePayPageNew({Key? key}) : super(key: key);
@override
_LifePayPageNewState createState() => _LifePayPageNewState();
}
class MonthPay {
double payTotal; //
List<LifePayModel> selectIds; //id
List<LifePayModel> ids;//id
String itemNames; //
String timeTitle;
//
MonthPay(
{required this.payTotal,
required this.ids,
required this.itemNames,
required this.selectIds,
required this.timeTitle});
}
class _LifePayPageNewState extends State<LifePayPageNew> {
EasyRefreshController? _controller;
List<MonthPay> _selectMonths = []; //
List<LifePayModel> _models = []; //model,
int _page = 0;
int _size = 10;
double _prePrice = 0;
List<int> _selectModelIndex = []; //model
bool get allSelect =>
((_selectMonths.length == _selectModelIndex.length) && (_selectMonths.length != 0));
MonthPay get total {
double price = 0;
List<LifePayModel> ids = [];
for (var i in _selectModelIndex) {
MonthPay model = _selectMonths[i];
price += model.payTotal;
ids.addAll(model.selectIds);
}
return MonthPay( payTotal: price, ids: [], selectIds: ids, itemNames: '', timeTitle: '');
}
@override
void initState() {
super.initState();
_controller = EasyRefreshController();
Future.delayed(Duration.zero,(){
if( UserTool.userProvider.defaultHouse==null){
Get.off(()=>MyHousePage());
BotToast.showText(text: '请先选择您的房屋');
}
});
_models = [
LifePayModel(
id: 1,
createDate: '2022-02-11 00:00:01',
payPrincipal: 100,
billDateStart: '2022-02-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-03-11 00:00:01'),
LifePayModel(
id: 2,
createDate: '2022-02-12 00:00:01',
payPrincipal: 100,
billDateStart: '2022-02-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-03-12 00:00:01'),
LifePayModel(
id: 3,
createDate: '2022-03-11 00:00:01',
payPrincipal: 100,
billDateStart: '2022-03-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-04-11 00:00:01'),
LifePayModel(
id: 4,
createDate: '2022-04-11 00:00:01',
payPrincipal: 100,
billDateStart: '2022-04-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-05-11 00:00:01'),
LifePayModel(
id: 5,
createDate: '2022-02-15 00:00:01',
payPrincipal: 100,
billDateStart: '2022-02-15 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-03-15 00:00:01'),
LifePayModel(
id: 6,
createDate: '2022-02-16 00:00:01',
payPrincipal: 100,
billDateStart: '2022-02-16 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-03-16 00:00:01'),
LifePayModel(
id: 7,
createDate: '2022-03-18 00:00:01',
payPrincipal: 100,
billDateStart: '2022-03-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-04-19 00:00:01'),
];
}
@override
void dispose() {
_controller?.dispose();
BotToast.closeAllLoading();
super.dispose();
}
Widget _buildCard(MonthPay model, int index) {
return Container(
padding: EdgeInsets.symmetric(vertical: 32.w,horizontal: 32.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w), color: kForeGroundColor),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
setState(() {
if (_selectModelIndex.contains(index)) {
_selectModelIndex.remove(index);
} else {
_selectModelIndex.add(index);
}
});
},
child: Container(
padding: EdgeInsets.only(left: 10.w,right: 10.w,bottom: 50.w),
color: Colors.transparent,
child: BeeCheckRadio(
value: index,
groupValue: _selectModelIndex,
),
),
),
],
),
24.w.widthBox,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
model.timeTitle.text.color(Colors.black.withOpacity(0.8)).bold.size(32.sp).make(),
13.w.heightBox,
'已选择:'
.richText
.withTextSpanChildren([
'${model.selectIds.length}'
.textSpan
.color(Colors.black.withOpacity(0.85))
.size(32.sp)
.bold
.make(),
' / ${model.ids.length}'
.textSpan
.color(Colors.black.withOpacity(0.25))
.size(32.sp)
.bold
.make(),
])
.color(Colors.black.withOpacity(0.65))
.size(26.sp)
.make(),
13.w.heightBox,
SizedBox(
width: 400.w,
child: Text(
model.itemNames,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: ktextSubColor,
fontSize: 28.sp,
),
),
),
13.w.heightBox,
RichText(
text: TextSpan(
text: '合计:',
style: TextStyle(
color: ktextPrimary,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: '¥ ',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: '${model.payTotal.toStringAsFixed(2)}',
style: TextStyle(
color: kDangerColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold)),
]))
],
).expand(),
Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: [
GestureDetector(
onTap: () async {
dynamic back = await Get.to(()=>LifePayDetailPageNew(model: model,));
if(back){
for(int i=0;i<_selectMonths.length;i++){
if(_selectMonths[i].selectIds.isEmpty){
_selectModelIndex.remove(_selectMonths.indexOf(_selectMonths[i]));
}
}
setState(() {
});
}
},
child: Container(
decoration: BoxDecoration(
color: kPrimaryColor,
borderRadius: BorderRadius.circular(22.w),
),
padding:
EdgeInsets.symmetric(horizontal: 20.w, vertical: 8.w),
child: '选择明细'.text.color(Colors.black.withOpacity(0.85)).size(22.sp).bold.make(),
),
),
],
),
],
),
);
}
Widget _payButton() {
return MaterialButton(
elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(37.w)),
color: kPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w),
onPressed: () async {
// Function cancel = BotToast.showLoading();
// BaseModel baseModel =
// await NetUtil().post('/user/alipay/dailyPaymentAlipay', params: {
// "ids": total.ids,
// "payType": 1, //
// "payPrice": total.payTotal.toDoubleStringAsFixed()
// });
// if (baseModel.success) {
// bool result = await PayUtil()
// .callAliPay(baseModel.msg, API.pay.dailPayMentCheck);
// if (result) {
// Get.off(() => PayFinishPage());
// }
// }
// cancel();
},
child: '去缴费'.text.black.size(32.sp).bold.make(),
);
}
Widget _buildPrePayment() {
return Container(
padding: EdgeInsets.symmetric(vertical: 32.w, horizontal: 32.w),
width: double.infinity,
color: Colors.white,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'当前预缴'.text.size(28.sp).color(ktextSubColor).make(),
30.w.heightBox,
Row(
children: [
'¥'.text.size(28.sp).black.make(),
16.w.widthBox,
_prePrice.text.size(40.sp).black.bold.make(),
Spacer(),
MaterialButton(
elevation: 0,
height: 50.w,
padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 25.w),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24.w),
side: BorderSide(color: Color(0xFF979797), width: 1.w)),
color: Colors.white,
onPressed: () {
Get.to(() => LifePrePayPage(
prePay: _prePrice,
));
},
child: '预缴充值'.text.size(28.sp).black.make(),
)
],
),
],
),
);
}
Future<double> _dailyPaymentPrePay() async {
BaseModel baseModel =
await NetUtil().get(SAASAPI.lifePay.findEstateBalance, params: {
"estateId": UserTool.userProvider.defaultHouse!.id
});
if (baseModel.success) {
return (baseModel.data as num).toDouble();
} else {
return 0;
}
}
@override
Widget build(BuildContext context) {
final appProvider = Provider.of<AppProvider>(context);
return BeeScaffold(
title: '生活缴费',
actions: [
InkWell(
onTap: () {
Get.to(() => LifePayRecordPage());
},
child: Container(
padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
alignment: Alignment.center,
child: Image.asset(Assets.icons.lifePayRecord.path,width:48.w ,height: 48.w,)
),
),
],
body: EasyRefresh(
firstRefresh: true,
header: MaterialHeader(),
controller: _controller,
onRefresh: () async {
_prePrice = await _dailyPaymentPrePay();
_selectMonths.clear();
BaseModel model = await NetUtil()
.get(SAASAPI.lifePay.livingExpensesList, params: {
'estateId': UserTool.userProvider.defaultHouse!.id
});
if(model.success){
if(model.data!=null)
_models = ( model.data as List)
.map((e) => LifePayModel.fromJson(e))
.toList() ;
}
///
if(_models.isNotEmpty)
_models.forEach((element) {
if (_selectMonths.isEmpty) {
_selectMonths.add(MonthPay(
payTotal: element.payPrincipal + element.defaultAmount,
ids: [element],
itemNames: element.chargesName,
timeTitle: DateUtil.formatDate(
DateTime.parse(element.billDateStart),
format: 'yyyy-MM'), selectIds: [element],));
} else {
bool same = false;
for(int i=0;i<_selectMonths.length;i++){
if (DateUtil.formatDate(DateTime.parse(element.billDateStart),
format: 'yyyy-MM') ==
_selectMonths[i].timeTitle) {
_selectMonths[i].payTotal +=
element.defaultAmount + element.payPrincipal;
_selectMonths[i].ids.add(element);
_selectMonths[i].itemNames += ''+element.chargesName;
_selectMonths[i].selectIds.add(element);
same = true;
}
}
if(!same){
_selectMonths.add(MonthPay(
payTotal: element.payPrincipal + element.defaultAmount,
ids: [element],
selectIds: [element],
itemNames: element.chargesName,
timeTitle: DateUtil.formatDate(
DateTime.parse(element.billDateStart),
format: 'yyyy-MM')));
}
}
});
if (mounted) setState(() {});
},
child: Column(
children: [
HouseHeadCard(
onChanged: () {
_controller!.callRefresh();
},
context: context),
16.w.heightBox,
_buildPrePayment(),
16.w.heightBox,
Container(
//padding: EdgeInsets.all(32.w),
width: double.infinity,
color: kForeGroundColor,
constraints: BoxConstraints(minHeight: 20.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(padding: EdgeInsets.symmetric(vertical: 24.w,horizontal: 32.w),
child: '当前账单'.text.color(ktextPrimary).size(28.sp).make(),),
BeeDivider.horizontal(),
...List.generate(_selectMonths.length,
(index) => _buildCard(_selectMonths[index], index))
.sepWidget(separate: BeeDivider.horizontal()),
],
),
),
],
),
),
bottomNavi: Container(
color: kForeGroundColor,
padding: EdgeInsets.fromLTRB(
32.w, 16.w, 32.w, 12.w + MediaQuery.of(context).padding.bottom),
child: Row(
children: [
GestureDetector(
onTap: () {
if (allSelect) {
_selectModelIndex.clear();
setState(() {});
} else {
_selectModelIndex.clear();
for (var i = 0; i < _selectMonths.length; i++) {
_selectModelIndex.add(i);
}
setState(() {});
}
},
child: AnimatedContainer(
duration: Duration(milliseconds: 300),
decoration: BoxDecoration(
border: Border.all(
width: 1.w,
color: allSelect ? kPrimaryColor : kDarkSubColor),
color: allSelect ? kPrimaryColor : Colors.transparent,
borderRadius: BorderRadius.circular(20.w)),
curve: Curves.easeInOutCubic,
width: 40.w,
height: 40.w,
child: allSelect
? Icon(
CupertinoIcons.check_mark,
size: 25.w,
color: Colors.white,
)
: SizedBox(),
).material(color: Colors.transparent),
),
16.wb,
'全选'
.text
.color(ktextSubColor)
.size(28.sp)
.bold
.make(),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
RichText(
text: TextSpan(
text: '合计:',
style: TextStyle(
color: ktextPrimary,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: ' ¥',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: '${total.payTotal.toStringAsFixed(2)}',
style: TextStyle(
color: kDangerColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold)),
])),
'已选${_selectModelIndex.length}'
.text
.color(ktextSubColor)
.size(24.sp)
.make(),
],
),
24.w.widthBox,
_payButton(),
],
),
),
);
}
}

@ -1,5 +1,6 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/models/life_pay/life_pay_record_model.dart';
import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart';
import 'package:aku_new_community/utils/headers.dart';
@ -8,6 +9,9 @@ import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'life_pay_bill_page/life_pay_bill_page.dart';
class LifePayRecordPage extends StatefulWidget {
LifePayRecordPage({Key? key}) : super(key: key);
@ -41,10 +45,10 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '生活缴费',
title: '缴费记录',
body: BeeListView(
path: API.manager.paymentRecord,
extraParams: {"estateId": UserTool.appProvider.selectedHouse!.estateId},
path: SAASAPI.lifePay.paymentRecordList,
extraParams: {"estateId": UserTool.userProvider.defaultHouse!.id},
controller: _refreshController,
convert: (models) {
return models.rows
@ -82,17 +86,35 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
}
Widget _buildRecordCard(LifePayRecordModel model) {
return Column(
return GestureDetector(
onTap: (){
Get.to(()=>LifePayBillPage(model: model,));
},
child: Column(
children: [
Container(
padding: EdgeInsets.symmetric(vertical: 8.w,horizontal: 24.w),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.06),
borderRadius: BorderRadius.circular(8.w),
),
child: DateUtil.formatDate(
DateTime.parse(model.createDate),
format: 'MM-dd hh-mm').text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
),
Row(
children: [
model.chargesTemplateDetailName.text
model.chargesName.text
.size(30.sp)
.color(ktextPrimary)
.bold
.make(),
Spacer(),
'${S.of(context)!.tempPlotName} ${model.roomName}'
'${S.of(context)!.tempPlotName} ${model.unitName+model.estateName}'
.text
.size(24.sp)
.color(Color(0xFF999999))
@ -100,30 +122,18 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
],
),
16.w.heightBox,
Row(
children: [
'缴纳人'.text.color(ktextSubColor).size(24.sp).make(),
Spacer(),
'${model.createName}'
.text
.color(Color(0xFFFC361D))
.size(28.sp)
.bold
.make()
],
),
Row(
children: [
'缴纳金额'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.paidPrice}'.text.color(ktextPrimary).size(28.sp).make(),
'${model.payAmount}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
Row(
children: [
'缴费时间'.text.color(ktextSubColor).size(28.sp).make(),
'付款方式'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${DateUtil.formatDateStr(model.createDate, format: "yyyy/MM/dd HH:mm")}'
'${getPayType[model.payType]}'
.text
.color(ktextPrimary)
.size(28.sp)
@ -132,27 +142,26 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
),
Row(
children: [
'付款方式'.text.color(ktextSubColor).size(28.sp).make(),
'流水号'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${getPayType[model.payType]}'
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
'${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
Row(
children: [
'订单'.text.color(ktextSubColor).size(28.sp).make(),
'流水'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
].sepWidget(separate: 24.w.heightBox),
)
.box
.color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 32.w, horizontal: 20.w))
.make();
.make(),
);
}
}

@ -1,5 +1,6 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_util.dart';
import 'package:aku_new_community/utils/headers.dart';
@ -30,6 +31,7 @@ class LifePrePayPage extends StatefulWidget {
class _LifePrePayPageState extends State<LifePrePayPage> {
late TextEditingController _editingController;
String _payMethod = '支付宝';
num amount = 0;
@override
void initState() {
@ -66,6 +68,14 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
16.w.widthBox,
TextField(
controller: _editingController,
onChanged: (String value){
if(value.isEmpty){
amount = 0;
}else{
amount = double.parse(value);
}
},
decoration: InputDecoration(
hintText: '0.0',
hintStyle: TextStyle(
@ -156,24 +166,29 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
Function cancel = BotToast.showLoading();
try {
BaseModel baseModel =
await NetUtil().post(API.pay.dailPaymentPrePay, params: {
"estateId": UserTool.appProvider.selectedHouse!.estateId,
"payType": 1,
"payPrice": _editingController.text
});
await NetUtil().post(SAASAPI.pay.createPrepaymentOrder,
params: {
'estateId': UserTool.userProvider.defaultHouse!.id,
'payAmount':amount
},
showMessage: true);
if (baseModel.success) {
bool result = await PayUtil()
.callAliPay(baseModel.msg, API.pay.dailPaymentPrePayCheck);
bool result = await PayUtil().callAliPay(
(baseModel.data as String),
SAASAPI.pay.prepaymentOrderCheckAlipay);
if (result) {
Get.off(() => PayFinishPage());
}
} else {
BotToast.showText(text: baseModel.msg);
///
BotToast.showText(text: '充值失败');
}
}
cancel();
} catch (e) {
cancel();
LoggerData.addData(e);
}
cancel();
},
child: '立即充值'.text.size(32.sp).bold.black.make()),
);

@ -45,8 +45,6 @@ class PayFinishPage extends StatelessWidget {
),
70.w.heightBox,
'支付成功'.text.size(48.sp).color(Colors.white).bold.make(),
16.w.heightBox,
'Payment successful'.text.size(20.sp).color(Colors.white).make(),
],
),
),

@ -1,10 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:expandable/expandable.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/models/life_pay/life_pay_list_model.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page.dart';
@ -13,6 +6,11 @@ import 'package:aku_new_community/utils/bee_parse.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_check_radio.dart';
import 'package:expandable/expandable.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
class LifePayDetailPage extends StatefulWidget {
final LifePayListModel model;

@ -0,0 +1,298 @@
import 'package:aku_new_community/models/life_pay/life_pay_model.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:expandable/expandable.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/models/life_pay/life_pay_list_model.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/utils/bee_parse.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_check_radio.dart';
class LifePayDetailPageNew extends StatefulWidget {
final MonthPay model;
LifePayDetailPageNew({
Key? key,
required this.model,
}) : super(key: key);
@override
_LifePayDetailPageNewState createState() => _LifePayDetailPageNewState();
}
class _LifePayDetailPageNewState extends State<LifePayDetailPageNew> {
//model
List<int> _selectModelIndex = []; //model
List<LifePayModel> _list = [];
SelectPay get total {
int count = 0;
double price = 0;
List<int> ids = [];
widget.model.selectIds.forEach((element) {
count++;
price += (element.defaultAmount + element.payPrincipal);
ids.add(element.id);
});
widget.model.payTotal = price;
return SelectPay(payCount: count, payTotal: price, ids: ids);
}
bool get isAllSelect {
return _selectModelIndex.length == widget.model.ids.length && _selectModelIndex != 0;
}
@override
void initState() {
super.initState();
for(int i=0;i<widget.model.selectIds.length;i++){
_selectModelIndex.add(widget.model.ids.indexOf(widget.model.selectIds[i]));
}
for(int i=0;i<widget.model.ids.length;i++){
_list.add(widget.model.ids[i]);
}
}
Widget _buildCard(LifePayModel model, int index) {
return Container(
padding: EdgeInsets.symmetric(vertical:32.w,horizontal: 32.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w), color: kForeGroundColor),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
setState(() {
if (_selectModelIndex.contains(index)) {
_selectModelIndex.remove(index);
widget.model.selectIds.remove(model);
} else {
_selectModelIndex.add(index);
widget.model.selectIds.add(model);
}
print(widget.model.ids);
print(widget.model.selectIds);
});
},
child: Container(
padding: EdgeInsets.only(left: 10.w,right: 10.w,top: 5.w,bottom: 50.w),
color: Colors.transparent,
child: BeeCheckRadio(
value: index,
groupValue: _selectModelIndex,
),
),
),
],
),
24.w.widthBox,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
model.chargesName.text.color(ktextSubColor).size(28.sp).make(),
24.w.heightBox,
DateUtil.formatDate(DateTime.parse(model.billDateStart),
format: 'yyyy/MM/dd')
.richText
.withTextSpanChildren([
' - '
.textSpan
.color(Colors.black.withOpacity(0.45))
.size(24.sp)
.make(),
DateUtil.formatDate(DateTime.parse(model.billDateEnd),
format: 'yyyy/MM/dd')
.textSpan
.color(Colors.black.withOpacity(0.45))
.size(24.sp)
.make(),
])
.color(Colors.black.withOpacity(0.45))
.size(24.sp)
.make(),
],
).expand(),
RichText(
text: TextSpan(
text: '¥ ',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: '${model.payPrincipal+model.defaultAmount}',
style: TextStyle(
color: kDangerColor,
fontSize: 30.sp,
fontWeight: FontWeight.bold)),
])),
],
),
);
}
@override
Widget build(BuildContext context) {
var animatedContainer = AnimatedContainer(
duration: Duration(milliseconds: 300),
decoration: BoxDecoration(
border: Border.all(
width: 1.w, color: isAllSelect ? kPrimaryColor : kDarkSubColor),
color: isAllSelect ? kPrimaryColor : Colors.transparent,
borderRadius: BorderRadius.circular(20.w)),
curve: Curves.easeInOutCubic,
width: 40.w,
height: 40.w,
child: isAllSelect
? Icon(
CupertinoIcons.check_mark,
size: 25.w,
color: Colors.white,
)
: SizedBox(),
);
return BeeScaffold(
leading: IconButton(
onPressed: () {
///
widget.model.selectIds = _list;
Get.back(result: false);
},
icon: Icon(
CupertinoIcons.chevron_back,
color: Colors.black,
),
),
title: widget.model.timeTitle,
body: WillPopScope(
onWillPop: () async{
///
widget.model.selectIds = _list;
Get.back(result: false);
return false;
},
child: ListView(
padding: EdgeInsets.only(top: 16.w),
children: List.generate(widget.model.ids.length,
(index) => _buildCard(widget.model.ids[index], index)).sepWidget(separate: BeeDivider.horizontal(indent: 100.w,)),),
),
bottomNavi: Container(
color: Colors.white,
padding: EdgeInsets.fromLTRB(
32.w, 16.w, 32.w, 12.w + MediaQuery.of(context).padding.bottom),
child: Row(
children: [
GestureDetector(
onTap: () {
if (isAllSelect) {
_selectModelIndex.clear();
widget.model.selectIds.clear();
setState(() {});
} else {
_selectModelIndex.clear();
for (var i = 0; i < widget.model.ids.length; i++) {
_selectModelIndex.add(i);
widget.model.selectIds.add(widget.model.ids[i]);
}
setState(() {});
}
},
child: animatedContainer,
),
16.wb,
'全选'
.text
.color(ktextSubColor)
.size(28.sp)
.bold
.make(),
Spacer(),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
RichText(
text: TextSpan(
text: '合计:',
style: TextStyle(
color: ktextPrimary,
fontSize: 24.sp,
fontWeight: FontWeight.bold),
children: [
TextSpan(
text: ' ¥',
style: TextStyle(
color: kDangerColor,
fontSize: 24.sp,
fontWeight: FontWeight.bold)),
TextSpan(
text: '${total.payTotal.toStringAsFixed(2)}',
style: TextStyle(
color: kDangerColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold)),
])),
'已选${total.payCount}'
.text
.color(ktextSubColor)
.size(20.sp)
.make(),
],
),
20.w.widthBox,
MaterialButton(
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(37.w)),
color: kPrimaryColor,
padding: EdgeInsets.symmetric(horizontal: 50.w, vertical: 15.w),
onPressed: () {
Get.back(result: true);
},
child: '确定'.text.black.size(32.sp).bold.make(),
),
],
),
),
);
}
}

@ -153,6 +153,7 @@ class SignFunc {
return true;
}
///
static Future<List<MyHouseModel>> getMyHouseInfo() async {
BaseModel baseModel = await NetUtil().get(
SAASAPI.profile.house.userHouse,

@ -30,6 +30,7 @@ class UserProvider extends ChangeNotifier {
await updateUserInfo();
WebSocketUtil().setUser(userInfoModel!.id.toString());
WebSocketUtil().startWebSocket();
await updateMyHouseInfo();
///
_userConfig = await HiveStore.userBox!.get('${_userInfoModel!.id}') ??
@ -59,7 +60,7 @@ class UserProvider extends ChangeNotifier {
_token = null;
_userInfoModel = null;
_myHouses = [];
NetUtil().get(SAASAPI.login.logOut, showMessage: true);
NetUtil().post(SAASAPI.login.logOut, showMessage: true);
NetUtil().dio!.options.headers.remove('app-login-token');
HiveStore.appBox!.delete('token');
HiveStore.appBox!.delete('login');
@ -77,6 +78,7 @@ class UserProvider extends ChangeNotifier {
notifyListeners();
}
///
Future updateMyHouseInfo() async {
_myHouses = await SignFunc.getMyHouseInfo();
if (_myHouses.isEmpty) {
@ -99,6 +101,7 @@ class UserProvider extends ChangeNotifier {
UserInfoModel? get userInfoModel => _userInfoModel;
///
List<MyHouseModel> _myHouses = [];
List<MyHouseModel> get myHouses => _myHouses;

@ -18,7 +18,7 @@ class ActivityCard extends StatelessWidget {
this.home = false,
}) : super(key: key);
bool get outdate => ActivityFunc.dateCheck(model!.end) == '';
bool get outdate => model!.end?.isBefore(DateTime.now()) ?? true;
Widget build(BuildContext context) {
return ConstrainedBox(
@ -29,18 +29,20 @@ class ActivityCard extends StatelessWidget {
padding: EdgeInsets.zero,
onPressed: () => Get.to(() => ActivityDetailPage(id: model!.id)),
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24.w),
),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Stack(
clipBehavior: Clip.antiAliasWithSaveLayer,
children: [
Hero(
tag: ImgModel.first(model!.imgList),
child: Material(
color: Colors.grey,
borderRadius: BorderRadius.circular(16.w),
clipBehavior: Clip.antiAliasWithSaveLayer,
child: BeeImageNetwork(
imgs: model!.imgList ?? [],
width: double.infinity,
@ -48,63 +50,52 @@ class ActivityCard extends StatelessWidget {
),
),
),
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(
Positioned(
top: 0,
left: 0,
child: Container(
//color: Color(0x80FEBF76),
// shape: StadiumBorder(),
alignment: Alignment.center,
height: 39.w,
width: 98.w,
decoration: BoxDecoration(
color: outdate
? Colors.black.withOpacity(0.06)
: Color(0x80FEBF76),
borderRadius: BorderRadius.all(Radius.circular(4)),
color: outdate ? Color(0xFFE8E8E8) : Color(0xFFFDE019),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16.w),
bottomRight: Radius.circular(12.w)),
),
child: outdate
? '已结束'
.text
.size(22.sp)
.color(Colors.black.withOpacity(0.25))
.color(Color(0xFF999999))
.make()
: '报名中'
.text
.size(22.sp)
.color(Color(0xFFF48117))
.color(Color(0xFF333333))
.make(),
))
],
),
24.hb,
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
constraints: BoxConstraints(maxWidth: 340.w),
child: Text(
model == null ? '' : model!.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xD9000000),
fontSize: 28.sp,
fontWeight: FontWeight.bold),
),
onTap: () {
outdate
? null
: () {
Get.to(() => ActivityDetailPage(id: model!.id));
};
},
),
24.wb
Spacer(),
],
),
),
Spacer(),
[
Flexible(
@ -116,13 +107,14 @@ class ActivityCard extends StatelessWidget {
),
),
// Spacer(),
ActivityFunc.dateCheck(model!.end)
Offstage(
offstage: ActivityFunc.dateCheck(model!.end) == '已结束',
child: ActivityFunc.dateCheck(model!.end)
.text
.size(24.sp)
.black
.make(),
].row().pSymmetric(h: 24.w),
20.hb,
.make()),
].row(),
],
),
),

@ -149,8 +149,10 @@ class _ActivityDetailPageState extends State<ActivityDetailPage> {
),
),
bottomNavi: BottomButton(
child: '立即报名'.text.size(32.sp).color(Colors.black).bold.make(),
onPressed: () async {
child: '立即报名'.text.size(32.sp).bold.make(),
onPressed: !canTap
? null
: () async {
var re = await NetUtil().get(SAASAPI.activity.registration,
params: {'activityId': _model!.id}, showMessage: true);
if (re.success) {
@ -161,6 +163,13 @@ class _ActivityDetailPageState extends State<ActivityDetailPage> {
);
}
bool get canTap {
if (_model?.regisEndTime?.isBefore(DateTime.now()) ?? true) {
return false;
}
return true;
}
Container _headWidget() {
return Container(
color: Colors.white,

@ -5,7 +5,7 @@ class ActivityFunc {
}
var nowDate = DateTime.now();
if (date.isBefore(nowDate)) {
return '';
return '已结束';
} else {
var days = date.difference(nowDate).inDays;
if (days > 0) {

@ -15,6 +15,7 @@ import 'package:aku_new_community/ui/community/community_views/add_new_event_pag
import 'package:aku_new_community/ui/community/community_views/my_community_view.dart';
import 'package:aku_new_community/ui/community/community_views/new_community_view.dart';
import 'package:aku_new_community/ui/community/community_views/topic/topic_community_view.dart';
import 'package:aku_new_community/ui/community/community_views/topic/topic_detail_page.dart';
import 'package:aku_new_community/ui/community/community_views/widgets/chat_card.dart';
import 'package:aku_new_community/ui/home/public_infomation/public_infomation_card.dart';
import 'package:aku_new_community/ui/home/public_infomation/public_infomation_page.dart';
@ -26,12 +27,10 @@ import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
class CommunityPage extends StatefulWidget {
@ -295,7 +294,7 @@ class _CommunityPageState extends State<CommunityPage>
var result =
await Get.to(() => PublicInformationDetailPage(id: item.id));
CommunityFunc.addViews(item.id);
if (result) {
if (result != null && result) {
_easyRefreshController.callRefresh();
}
},
@ -400,7 +399,7 @@ class _CommunityPageState extends State<CommunityPage>
}, '全部'),
),
32.hb,
_searchHistoryWidget()
_newTopicListWidget()
],
),
);
@ -418,7 +417,7 @@ class _CommunityPageState extends State<CommunityPage>
minWidth: double.infinity,
color: Color(0xFFF3F3F3),
onPressed: () {
//Get.to(() => SearchGoodsPage());
// Get.to(() => TopicSearchPage());
},
child: Row(
children: [
@ -435,7 +434,8 @@ class _CommunityPageState extends State<CommunityPage>
);
}
_searchHistoryWidget() {
///
_newTopicListWidget() {
return Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 32.w, right: 32.w),
@ -466,7 +466,9 @@ class _CommunityPageState extends State<CommunityPage>
labelPadding: EdgeInsets.only(right: 12.w, left: 12.w),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onSelected: (bool value) {
// Get.to(() => TopicDetailPage(model: item));
Get.to(() => TopicDetailPage(
topicId: item.id,
));
},
label: Row(
mainAxisSize: MainAxisSize.min,

@ -61,6 +61,7 @@ class _EventDetailPageState extends State<EventDetailPage> {
List<CommentListModel> _comments = [];
List<bool> _folds = [];
List<bool> _likes = [];
List<int> _likeNums = [];
//
FocusNode _focusNode = FocusNode();
@ -141,6 +142,7 @@ class _EventDetailPageState extends State<EventDetailPage> {
body: EasyRefresh.custom(
controller: _refreshController,
header: MaterialHeader(),
footer: MaterialFooter(),
firstRefresh: true,
onRefresh: () async {
BaseModel model = await NetUtil().get(
@ -160,11 +162,8 @@ class _EventDetailPageState extends State<EventDetailPage> {
base.rows.map((e) => CommentListModel.fromJson(e)).toList();
_folds = List.filled(_size, true);
_comments.forEach((element) {
if (element.isLike) {
_likes.add(true);
} else {
_likes.add(false);
}
_likes.add(element.isLike);
_likeNums.add(element.likes);
});
setState(() {});
},
@ -183,11 +182,8 @@ class _EventDetailPageState extends State<EventDetailPage> {
_comments.addAll(_list);
_folds.addAll(List.filled(_list.length, true));
_list.forEach((element) {
if (element.isLike) {
_likes.add(true);
} else {
_likes.add(false);
}
_likes.add(element.isLike);
_likeNums.add(element.likes);
});
}
setState(() {});
@ -360,17 +356,48 @@ class _EventDetailPageState extends State<EventDetailPage> {
child: Row(
children: [
Spacer(),
GestureDetector(
onTap: () async {
var base = await NetUtil().get(
SAASAPI.community.commentLike,
params: {'commentId': model.id});
if (base.success) {
_likes[rootIndex] = !_likes[rootIndex];
if (_likes[rootIndex]) {
_likeNums[rootIndex] += 1;
} else {
_likeNums[rootIndex] -= 1;
}
BotToast.showText(
text: _likes[rootIndex] ? '点赞成功' : '取消点赞成功');
} else {
BotToast.showText(text: base.msg);
}
setState(() {});
},
child: Material(
color: Colors.transparent,
child: Row(
children: [
Image.asset(
R.ASSETS_ICONS_COMMUNITY_LIKE_PNG,
width: 40.w,
height: 40.w,
width: 32.w,
height: 32.w,
color: !_likes[rootIndex]
? Colors.black.withOpacity(0.45)
: kPrimaryColor,
),
5.wb,
'${model.likes}'
'${_likeNums[rootIndex]}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make(),
],
),
),
),
32.wb,
GestureDetector(
onTap: () {
@ -470,7 +497,12 @@ class _EventDetailPageState extends State<EventDetailPage> {
_focusNode.requestFocus();
_currentCommentIndex = rootIndex;
},
child: RichText(
child: Material(
color: Colors.transparent,
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
RichText(
text: TextSpan(
text: '${model.createName}',
style: TextStyle(
@ -483,7 +515,8 @@ class _EventDetailPageState extends State<EventDetailPage> {
child: Container(
width: 56.w,
height: 28.w,
margin: EdgeInsets.only(left: 4.w, right: 4.w, bottom: 4.w),
margin:
EdgeInsets.only(left: 4.w, right: 4.w, bottom: 4.w),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFFF8B133),
@ -493,6 +526,7 @@ class _EventDetailPageState extends State<EventDetailPage> {
style: TextStyle(
color: Colors.white,
fontSize: 24.sp,
height: 1.2,
fontWeight: FontWeight.bold),
),
)),
@ -518,6 +552,9 @@ class _EventDetailPageState extends State<EventDetailPage> {
fontSize: 28.sp,
))
])),
],
),
),
);
}
@ -567,7 +604,6 @@ class _EventDetailPageState extends State<EventDetailPage> {
color: kPrimaryColor,
minWidth: 120.w,
height: 55.w,
onPressed: () async {
var res = await NetUtil()
.post(SAASAPI.community.commentInsert, params: params);
@ -594,7 +630,6 @@ class _EventDetailPageState extends State<EventDetailPage> {
),
)
],
)
);
));
}
}

@ -22,11 +22,13 @@ class TopicSearchPage extends StatefulWidget {
class _TopicSearchPageState extends State<TopicSearchPage> {
List<TopicListModel> _models = [];
bool isHot = true;
TextEditingController _textEditingController = TextEditingController();
Future _getModels() async {
var re = await NetUtil().get(SAASAPI.community.topicList, params: {
'pageNum': 1,
'size': 10,
'title': _textEditingController.text
});
if (re.success) {
_models = (re.data['rows'] as List)
@ -42,6 +44,12 @@ class _TopicSearchPageState extends State<TopicSearchPage> {
super.initState();
}
@override
void dispose() {
_textEditingController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
var appbar = PreferredSize(
@ -80,6 +88,7 @@ class _TopicSearchPageState extends State<TopicSearchPage> {
.get(SAASAPI.community.topicList, params: {
'pageNum': 1,
'size': 20,
'title': _textEditingController.text,
});
if (re.success) {
_models = (re.data['rows'] as List)
@ -88,6 +97,7 @@ class _TopicSearchPageState extends State<TopicSearchPage> {
setState(() {});
}
},
controller: _textEditingController,
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.zero,

@ -132,7 +132,7 @@ class _ChatCardState extends State<ChatCard> {
: kPrimaryColor,
),
5.wb,
'${widget.model.likes}'
'${_likeNum}'
.text
.size(24.sp)
.color(Color(0xFF999999))
@ -282,9 +282,15 @@ class _ChatCardState extends State<ChatCard> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
32.hb,
if (!widget.model.content!.isEmptyOrNull)
Offstage(
offstage: widget.model.content.isEmptyOrNull,
child: Column(
children: [
widget.model.content!.text.size(32.sp).black.make(),
32.hb,
],
),
),
_renderImage(),
widget.model.topicTags.isEmpty
? SizedBox()

@ -172,9 +172,12 @@ class _ChatCardDetailState extends State<ChatCardDetail> {
},
likeBuilder: (bool isLiked) {
return Image.asset(
isLiked
? Assets.icons.communityLikeIs.path
: Assets.icons.communityLike.path,
Assets.icons.communityLike.path,
width: 32.w,
height: 32.w,
color: !_isLiked
? Colors.black.withOpacity(0.45)
: kPrimaryColor,
);
},
likeCount: _likeNum,

@ -80,51 +80,20 @@ class _TaskEvaluationDialogState extends State<TaskEvaluationDialog> {
),
),
80.hb,
Row(
children: [
MaterialButton(
onPressed: () {},
minWidth: 330.w,
height: 80.w,
elevation: 0,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
side: BorderSide(color: Colors.black.withOpacity(0.25)),
),
child: Text(
'暂不评价',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.65)),
),
),
Spacer(),
MaterialButton(
onPressed: () async {
BottomPluralButtonWidget(
leftTitle: '暂不评价',
onLeftTap: () {},
rightTitle: '确认提交',
onRightTap: () async {
if (_currentIndex == null) {
BotToast.showText(text: '请选择评价满意度');
return;
}
var re =
await widget.evaluate(_currentIndex!, _controller.text);
var re = await widget.evaluate(_currentIndex!, _controller.text);
if (re) {
Get.back();
}
},
minWidth: 330.w,
height: 80.w,
elevation: 0,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
),
child: Text(
'确认提交',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.85)),
),
)
],
)
],
),
@ -159,3 +128,69 @@ class _TaskEvaluationDialogState extends State<TaskEvaluationDialog> {
);
}
}
class BottomPluralButtonWidget extends StatelessWidget {
const BottomPluralButtonWidget({
Key? key,
required this.onLeftTap,
required this.onRightTap,
required this.leftTitle,
required this.rightTitle,
this.padding = false,
}) : super(key: key);
final VoidCallback onLeftTap;
final VoidCallback onRightTap;
final String leftTitle;
final String rightTitle;
final bool padding;
@override
Widget build(BuildContext context) {
return Container(
padding: padding
? EdgeInsets.only(
left: 32.w,
top: 32.w,
bottom: 32.w + MediaQuery.of(context).padding.bottom,
right: 32.w)
: EdgeInsets.zero,
color: padding ? Colors.white : Colors.transparent,
child: Row(
children: [
MaterialButton(
onPressed: onLeftTap,
minWidth: 330.w,
height: 80.w,
elevation: 0,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
side: BorderSide(color: Colors.black.withOpacity(0.25)),
),
child: Text(
leftTitle,
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.65)),
),
),
Spacer(),
MaterialButton(
onPressed: onRightTap,
minWidth: 330.w,
height: 80.w,
elevation: 0,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
),
child: Text(
rightTitle,
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.85)),
),
)
],
),
);
}
}

@ -1073,7 +1073,7 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
return false;
}
if (int.parse(_rewardController.text) == 0) {
BotToast.showText(text: '赏金不能为0');
BotToast.showText(text: '报酬不能为0');
return false;
}
if (_nameController.text.isEmpty) {

@ -5,6 +5,7 @@ import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class WorkOrderBillDialog extends StatelessWidget {
@ -76,7 +77,11 @@ class WorkOrderBillDialog extends StatelessWidget {
],
),
80.hb,
BeeLongButton(onPressed: () {}, text: '确认支付'),
BeeLongButton(
onPressed: () {
Get.back();
},
text: '确认支付'),
],
),
);

@ -2,12 +2,10 @@ import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/saas_model/work_order/work_order_detail_model.dart';
import 'package:aku_new_community/saas_model/work_order/work_order_progress_model.dart';
import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_evaluation_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/urge_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/work_order_bill_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/work_order_finish_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/dialogs/work_order_progress_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/history_report_page.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/team_list_page.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_func.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_map.dart';
@ -78,21 +76,8 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
children: [
GestureDetector(
onTap: () async {
var base = await NetUtil().get(
SAASAPI.workOrder.findScheduleById,
params: {'workOrderId': widget.id});
if (base.success) {
var models = (base.data as List)
.map((e) =>
WorkOrderProgressModel.fromJson(
e))
.toList();
await Get.bottomSheet(
WorkOrderProgressDialog(
models: models));
} else {
BotToast.showText(text: base.msg);
}
await WorkOrderFuc.getProgress(
workOrderId: widget.id);
},
child: Material(
color: Colors.transparent,
@ -147,6 +132,14 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
padding:
EdgeInsets.only(top: 120.w, left: 32.w, right: 32.w),
children: [
Offstage(
offstage: _model!.status < 5,
child: Column(
children: [
_historyReport(),
24.hb,
],
)),
Offstage(
offstage: _model!.servicePersonnelImgList == null ||
_model!.servicePersonnelImgList!.isEmpty,
@ -242,8 +235,8 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
case 6:
return BeeLongButton(
onPressed: () async {
var bills = await WorkOrderFuc.getBill(workOrderId: widget.id);
await Get.bottomSheet(WorkOrderBillDialog(models: bills));
await WorkOrderFuc.getBill(workOrderId: widget.id);
_refreshController.callRefresh();
},
text: '确认支付');
case 7:
@ -268,7 +261,9 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
Widget _historyReport() {
return GestureDetector(
onTap: () {},
onTap: () {
Get.to(HistoryReportPage(id: widget.id));
},
child: Material(
color: Colors.transparent,
child: Container(

@ -1,7 +1,14 @@
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/saas_model/work_order/work_order_bill_model.dart';
import 'package:aku_new_community/saas_model/work_order/work_order_progress_model.dart';
import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_navigation/src/extension_navigation.dart';
import 'dialogs/work_order_bill_dialog.dart';
import 'dialogs/work_order_progress_dialog.dart';
class WorkOrderFuc {
///
@ -48,20 +55,36 @@ class WorkOrderFuc {
return base.success;
}
///
static Future<List<WorkOrderBillModel>> getBill({
///
static Future getProgress({
required int workOrderId,
}) async {
var models = <WorkOrderBillModel>[];
var base = await NetUtil().get(SAASAPI.workOrder.cancel, params: {
'workOrderId': workOrderId,
});
var base = await NetUtil().get(SAASAPI.workOrder.findScheduleById,
params: {'workOrderId': workOrderId});
if (base.success) {
var models = (base.data as List)
.map((e) => WorkOrderProgressModel.fromJson(e))
.toList();
await Get.bottomSheet(WorkOrderProgressDialog(models: models));
} else {
BotToast.showText(text: base.msg);
}
}
///
static Future getBill({
required int workOrderId,
}) async {
var base = await NetUtil().get(SAASAPI.workOrder.workOrderBill,
params: {'workOrderId': workOrderId});
if (base.success) {
models = (base.data as List)
var models = (base.data as List)
.map((e) => WorkOrderBillModel.fromJson(e))
.toList();
await Get.bottomSheet(WorkOrderBillDialog(models: models));
} else {
BotToast.showText(text: base.msg);
}
return models;
}
///

@ -1,11 +1,3 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/application_objects.dart';
import 'package:aku_new_community/provider/app_provider.dart';
@ -13,6 +5,12 @@ import 'package:aku_new_community/ui/search/bee_search.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/login_util.dart';
import 'package:aku_new_community/widget/bee_back_button.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class AllApplicationPage extends StatefulWidget {
AllApplicationPage({Key? key}) : super(key: key);
@ -31,6 +29,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
_buildTile(
AO object, {
bool editMode = false,
bool online = false,
}) {
return MaterialButton(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.w)),
@ -40,7 +39,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRoom(object.title)) return;
if (object.page == null) {
if (object.page == null || !online) {
BotToast.showText(
text: '正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else {
@ -166,7 +165,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
);
}
Widget _buildView(List<AO> objects) {
Widget _buildView(List<AO> objects, bool online) {
final appProvider = Provider.of<AppProvider>(context);
return GridView.builder(
gridDelegate:
@ -174,7 +173,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
itemBuilder: (context, index) {
return Stack(
children: [
_buildTile(objects[index], editMode: _editMode),
_buildTile(objects[index], editMode: _editMode, online: online),
Positioned(
right: 0,
top: 0,
@ -211,8 +210,8 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
child: ListView(
padding: EdgeInsets.zero,
children: [
_buildListTile('为您推荐', 0),
_buildListTile('智慧管家', 1),
_buildListTile('智慧管家', 0),
_buildListTile('暂未上线', 1),
// _buildListTile('商城购物', 2),
],
),
@ -222,8 +221,8 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
scrollDirection: Axis.vertical,
controller: _pageController,
children: [
_buildView(recommendApp),
_buildView(smartManagerApp),
_buildView(smartManagerApp, true),
_buildView(recommendApp, false),
],
).expand(),
],

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

@ -1,10 +1,8 @@
import 'package:aku_new_community/utils/headers.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/utils/headers.dart';
class HomeTitle extends StatelessWidget {
final String title;
final String suffixTitle;
@ -21,27 +19,10 @@ class HomeTitle extends StatelessWidget {
Widget build(BuildContext context) {
return Row(
children: [
85.hb,
32.wb,
Stack(
children: [
// Positioned(
// left: 0,
// right: 0,
// bottom: 4.w,
// child: Container(
// color: kPrimaryColor,
// height: 8.w,
// ),
// ),
title.text.size(32.sp).bold.make(),
],
),
Spacer(),
MaterialButton(
shape: StadiumBorder(),
padding: EdgeInsets.symmetric(horizontal: 12.w),
onPressed: onTap,
GestureDetector(
onTap: onTap,
child: Row(
children: [
suffixTitle.text.size(24.sp).color(Color(0xFF999999)).make(),
@ -54,7 +35,6 @@ class HomeTitle extends StatelessWidget {
],
),
),
12.wb,
],
);
}

@ -1,7 +1,7 @@
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/models/market/market_all_category_model.dart';
import 'package:aku_new_community/ui/market/search/search_goods_page.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@ -19,13 +19,10 @@ class NewCategorySubCard extends StatelessWidget {
child: Column(
children: [
Spacer(),
FadeInImage.assetNetwork(
image: SAASAPI.image(
subModels.imgUrls.isNotEmpty ? subModels.imgUrls.first : ''),
//subModels.imgUrls!.isNotEmpty? subModels.imgUrls!.first :'',
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
BeeImageNetwork(
height: 75.w,
width: 75.w,
imgs: subModels.imgUrls,
),
12.hb,
Container(

@ -114,6 +114,8 @@ class _MarketPageState extends State<MarketPage>
_pageCount = baseListModel.total;
}
bool _onLoadVisible = true;
@override
void initState() {
super.initState();
@ -160,14 +162,17 @@ class _MarketPageState extends State<MarketPage>
topBouncing: false,
scrollController: _sliverListController,
controller: _refreshController,
onRefresh: () async {
_refresh();
},
onLoad: () async {
onRefresh: _refresh,
onLoad: !_onLoadVisible
? null
: () async {
_pageNum++;
await loadMarketInfo();
print(_goodsHomeModelList.length);
if (_goodsHomeModelList.length >= _pageCount) {
_refreshController.finishLoad(noMore: false);
_refreshController.finishLoad(noMore: true);
_onLoadVisible = false;
print(_onLoadVisible);
}
setState(() {});
},
@ -176,8 +181,9 @@ class _MarketPageState extends State<MarketPage>
);
}
_refresh() async {
Future _refresh() async {
await updateMarketInfo();
_onLoadVisible = true;
//_swiperModels = await CommunityFunc.swiper();
_marketSwiperModels = await CommunityFunc.marketSwiper();
_statistics = await CommunityFunc.getMarketStatistics();
@ -765,7 +771,7 @@ class _MarketPageState extends State<MarketPage>
imageErrorBuilder: (context, error, stackTrace) {
return Image.asset(
R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
fit: BoxFit.fill,
fit: BoxFit.cover,
);
},
),
@ -819,7 +825,7 @@ class _MarketPageState extends State<MarketPage>
BeeImageNetwork(
width: 88.w,
height: 88.w,
urls: item.imgUrls,
imgs: item.imgUrls,
),
8.hb,
Text(

@ -76,7 +76,7 @@ class _OrderCardState extends State<OrderCard> {
"payType": 1, //
"payPrice": widget.model.payPrice,
"residentId": UserTool.userProvider.userInfoModel!.id,
"payname": UserTool.userProvider.userInfoModel!.name,
"payName": UserTool.userProvider.userInfoModel!.name,
"payTel": UserTool.userProvider.userInfoModel!.tel,
});
if (baseModel.success) {

@ -1,13 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:waterfall_flow/waterfall_flow.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/models/market/goods_popular_model.dart';
import 'package:aku_new_community/models/search/search_goods_model.dart';
@ -19,6 +10,13 @@ import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/hive_store.dart';
import 'package:aku_new_community/utils/text_utils.dart';
import 'package:aku_new_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';
import 'package:provider/provider.dart';
import 'package:waterfall_flow/waterfall_flow.dart';
import '../search_goods_card.dart';
import 'good_detail_page.dart';
import 'goods_list_card.dart';
@ -435,7 +433,7 @@ class SearchGoodsPageState extends State<SearchGoodsPage> {
Container(
color: Color(0xFFF2F3F4),
child: BeeListView(
path: API.market.findGoodsList,
path: SAASAPI.market.good.recommend,
controller: _refreshController1,
refreshExtra: (model) =>
_models = model as List<SearchGoodsModel>,
@ -677,7 +675,7 @@ class SearchGoodsPageState extends State<SearchGoodsPage> {
///
_searchHistoryWidget() {
List<Widget> choiceChipList = [];
if (_searchHistory != null && _searchHistory.length > 0) {
if (_searchHistory.length > 0) {
for (var text in _searchHistory) {
choiceChipList.add(Padding(
padding: EdgeInsets.only(right: 10, bottom: 5),
@ -760,12 +758,10 @@ class SearchGoodsPageState extends State<SearchGoodsPage> {
///
getSearchListFromSharedPreferences() async {
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
_searchHistory = HiveStore.appBox!.get(
userProvider.userInfoModel?.id.toString() ??
'' + "userSearhHistory") ??
'';
if (_searchHistory == null) {
_searchHistory = [];
var history = HiveStore.appBox!.get(
userProvider.userInfoModel?.id.toString() ?? '' + "userSearhHistory");
if (history != null) {
_searchHistory = (history as List).cast<String>().toList();
}
setState(() {});
}

@ -197,7 +197,7 @@ class _SubmitOrderNormalPageState extends State<SubmitOrderNormalPage> {
"payPrice": totalPrice,
// 'points': widget.integral,
"residentId": UserTool.userProvider.userInfoModel!.id,
"payname": UserTool.userProvider.userInfoModel!.name,
"payName": UserTool.userProvider.userInfoModel!.name,
"payTel": UserTool.userProvider.userInfoModel!.tel,
},
showMessage: true);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save