# 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 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 additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. --> 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> <service android:name="com.amap.api.location.APSService"></service>
<meta-data android:name="com.amap.api.v2.apikey" <meta-data android:name="com.amap.api.v2.apikey"
android:value="f6361c0537bf2d6ddb898b10618d3726"/> 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" "scale" : "1x"
}, },
{ {
"filename" : "iTunesArtwork@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "iTunesArtwork@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "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 ///id
String get articleReturnList => '/user/articleBorrow/findBorrowByUserId'; String get articleReturnList => '/user/articleBorrow/findBorrowByUserId';
///list
String get dailyPaymentList => '/user/dailyPayment/list';
/// ///
String get findEstatelsPament => '/user/dailyPayment/findEstateIsPayment'; String get findEstatelsPament => '/user/dailyPayment/findEstateIsPayment';
@ -388,6 +386,9 @@ class _Manager {
///+ ///+
String get findUnpaidAmount => '/user/dailyPayment/findUnpaidAmount'; String get findUnpaidAmount => '/user/dailyPayment/findUnpaidAmount';
///list
String get dailyPaymentList => '/user/dailyPayment/list';
} }
class _Community { 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/goods_manage_page/select_borrow_return_page.dart';
import 'package:aku_new_community/pages/house_introduce/house_introduce.dart'; import 'package:aku_new_community/pages/house_introduce/house_introduce.dart';
import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart'; import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_choose_page.dart'; import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart';
import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart'; import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart'; import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart';
import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_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_KMM_PNG, () => OpeningCodePage()),
AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => VisitorAccessPage()), AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => VisitorAccessPage()),
AO('报事报修', R.ASSETS_ICONS_FUNC_BSBX_PNG, () => WorkOrderPage()), AO('报事报修', Assets.home.icBsbx.path, () => WorkOrderPage()),
AO('生活缴费', R.ASSETS_ICONS_FUNC_SHJF_PNG, () => LifePayChoosePage()), AO('生活缴费', Assets.home.icShjf.path, () => LifePayPageNew()),
AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()), AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()),
AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG, AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG,
() => AdvicePage(type: AdviceType.SUGGESTION)), () => AdvicePage(type: AdviceType.SUGGESTION)),
@ -88,7 +88,7 @@ List<AO> appObjects = [
AO('装修管理', R.ASSETS_ICONS_FUNC_ZXGL_PNG, () => NewRenovationPage()), AO('装修管理', R.ASSETS_ICONS_FUNC_ZXGL_PNG, () => NewRenovationPage()),
AO('借还管理', R.ASSETS_ICONS_FUNC_JHGL_PNG, () => SelectBorrowReturnPage()), AO('借还管理', R.ASSETS_ICONS_FUNC_JHGL_PNG, () => SelectBorrowReturnPage()),
AO('一键报警', R.ASSETS_ICONS_FUNC_YJBJ_PNG, () => AlarmPage()), AO('一键报警', R.ASSETS_ICONS_FUNC_YJBJ_PNG, () => AlarmPage()),
AO('设施预约', R.ASSETS_ICONS_FUNC_SSYY_PNG, () => FacilityAppointmentPage()), AO('设施预约', Assets.home.icSsyy.path, () => FacilityAppointmentPage()),
AO('快递包裹', R.ASSETS_ICONS_FUNC_KDBG_PNG, () => ExpressPackagePage()), AO('快递包裹', R.ASSETS_ICONS_FUNC_KDBG_PNG, () => ExpressPackagePage()),
AO('电子商务', R.ASSETS_ICONS_FUNC_DZSW_PNG, () => ElectronicCommercPage()), AO('电子商务', R.ASSETS_ICONS_FUNC_DZSW_PNG, () => ElectronicCommercPage()),
AO('服务浏览', R.ASSETS_ICONS_FUNC_FWLL_PNG, () => ServiceBrowsePage()), AO('服务浏览', R.ASSETS_ICONS_FUNC_FWLL_PNG, () => ServiceBrowsePage()),
@ -98,15 +98,15 @@ List<AO> appObjects = [
AO('地理信息', R.ASSETS_ICONS_FUNC_DLXX_PNG, () => GeographicInformationPage()), AO('地理信息', R.ASSETS_ICONS_FUNC_DLXX_PNG, () => GeographicInformationPage()),
AO('周边企业', R.ASSETS_ICONS_FUNC_ZBQY_PNG, () => SurroundingEnterprisesPage()), AO('周边企业', R.ASSETS_ICONS_FUNC_ZBQY_PNG, () => SurroundingEnterprisesPage()),
AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()), AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()),
AO('智慧养老', Assets.icons.provideAged.path, () => OldAgeSupportPageSimple()), AO('智慧养老', Assets.home.icZhyl.path, () => OldAgeSupportPageSimple()),
AO('周边服务', Assets.icons.nearbyService.path, null), AO('周边服务', Assets.home.icZbfw.path, null),
AO('小蜜蜂任务', Assets.icons.beeTask.path, () => TaskPage()), AO('任务发布', Assets.home.icRwfb.path, () => TaskPage()),
AO('自营商城', Assets.icons.shoppingMall.path, null), AO('自营商城', Assets.icons.shoppingMall.path, null),
AO('邻家宠物', Assets.icons.nearbyPet.path, null), AO('邻家宠物', Assets.home.icLjcw.path, null),
AO('共享停车', Assets.icons.sharePark.path, null), AO('共享停车', Assets.icons.sharePark.path, null),
AO('二手市场', Assets.icons.secondHandMarket.path, null), AO('二手市场', Assets.icons.secondHandMarket.path, null),
AO('共享投屏', Assets.icons.projectionScreen.path, null), AO('共享投屏', Assets.icons.projectionScreen.path, null),
AO('全部应用', Assets.icons.funcAll.path, () => AllApplicationPage()), AO('全部应用', Assets.home.icQbyy.path, () => AllApplicationPage()),
// AO( // AO(
// '小区教育', // '小区教育',
@ -157,28 +157,9 @@ List<AO> userAppObjects = [
AO allApp = AO allApp =
AO('全部应用', R.ASSETS_APPLICATIONS_ALL_APP_PNG, () => AllApplicationPage()); AO('全部应用', R.ASSETS_APPLICATIONS_ALL_APP_PNG, () => AllApplicationPage());
/// original value ///线 original value
List<String> _recommendApp = [ 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 => List<AO> get aboutCommunityApp =>
_aboutCommunityApp.map((e) => AO.fromRaw(e)).toList(); _aboutCommunityApp.map((e) => AO.fromRaw(e)).toList();
List<String> _wisdomServiceApp = ['智慧养老', '周边服务', '小蜜蜂任务', '共享投屏']; List<String> _wisdomServiceApp = ['智慧养老', '周边服务', '任务发布', '共享投屏'];
List<AO> get wisdomServiceApp => List<AO> get wisdomServiceApp =>
_wisdomServiceApp.map((e) => AO.fromRaw(e)).toList(); _wisdomServiceApp.map((e) => AO.fromRaw(e)).toList();

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

@ -34,6 +34,7 @@ class SAASAPI {
static _Information information = _Information(); static _Information information = _Information();
static _WorkOrder workOrder = _WorkOrder(); static _WorkOrder workOrder = _WorkOrder();
static _Pay pay = _Pay(); static _Pay pay = _Pay();
static _LifePay lifePay = _LifePay();
/// ///
static _ProfileApi profile = _ProfileApi(); static _ProfileApi profile = _ProfileApi();
@ -261,4 +262,25 @@ class _Pay {
///app ///app
String get jcookOrderCheckAlipay => '/app/user/alipay/jcookOrderCheckAlipay'; 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'); 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 { class $AssetsIconsGen {
const $AssetsIconsGen(); const $AssetsIconsGen();
@ -663,6 +716,10 @@ class $AssetsIconsGen {
AssetGenImage get leaseHouse => AssetGenImage get leaseHouse =>
const AssetGenImage('assets/icons/lease_house.png'); 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 /// File path: assets/icons/like.png
AssetGenImage get like => const AssetGenImage('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 $AssetsApplicationsGen applications = $AssetsApplicationsGen();
static const $AssetsBraceletGen bracelet = $AssetsBraceletGen(); static const $AssetsBraceletGen bracelet = $AssetsBraceletGen();
static const $AssetsHomeGen home = $AssetsHomeGen();
static const $AssetsIconsGen icons = $AssetsIconsGen(); static const $AssetsIconsGen icons = $AssetsIconsGen();
static const $AssetsImagesGen images = $AssetsImagesGen(); static const $AssetsImagesGen images = $AssetsImagesGen();
static const $AssetsJsonGen json = $AssetsJsonGen(); 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() @JsonSerializable()
class LifePayRecordModel extends Equatable { class LifePayRecordModel extends Equatable {
final int id; final int id;
final String chargesTemplateDetailName; final String chargesName;
final String roomName; final String communityName;
final String years; final String buildingName;
final num paidPrice; final String unitName;
final String createName; final String estateName;
final String billDateStart;
final String billDateEnd;
final String billCreateDate;
final num payAmount;
final String createDate; final String createDate;
final int payType; final int payType;
final String code; 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) => factory LifePayRecordModel.fromJson(Map<String, dynamic> json) =>
_$LifePayRecordModelFromJson(json); _$LifePayRecordModelFromJson(json);
@ -34,14 +28,34 @@ class LifePayRecordModel extends Equatable {
List<Object> get props { List<Object> get props {
return [ return [
id, id,
chargesTemplateDetailName, chargesName,
roomName, communityName,
years, buildingName,
paidPrice, unitName,
createName, estateName,
billDateStart,
billDateEnd,
billCreateDate,
payAmount,
createDate, createDate,
payType, payType,
code, 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 _$LifePayRecordModelFromJson(Map<String, dynamic> json) =>
LifePayRecordModel( LifePayRecordModel(
id: json['id'] as int, id: json['id'] as int,
chargesTemplateDetailName: json['chargesTemplateDetailName'] as String, chargesName: json['chargesName'] as String,
roomName: json['roomName'] as String, communityName: json['communityName'] as String,
years: json['years'] as String, buildingName: json['buildingName'] as String,
paidPrice: json['paidPrice'] as num, unitName: json['unitName'] as String,
createName: json['createName'] 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, createDate: json['createDate'] as String,
payType: json['payType'] as int, payType: json['payType'] as int,
code: json['code'] as String, 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'; import 'package:json_annotation/json_annotation.dart';
part 'market_all_category_model.g.dart'; part 'market_all_category_model.g.dart';
@ -6,7 +7,7 @@ part 'market_all_category_model.g.dart';
class MarketAllCategoryModel { class MarketAllCategoryModel {
final int id; final int id;
final String? name; final String? name;
final List<String> imgUrls; final List<ImgModel> imgUrls;
final List<MarketAllCategoryModel> categoryList; final List<MarketAllCategoryModel> categoryList;
factory MarketAllCategoryModel.fromJson(Map<String, dynamic> json) => factory MarketAllCategoryModel.fromJson(Map<String, dynamic> json) =>
_$MarketAllCategoryModelFromJson(json); _$MarketAllCategoryModelFromJson(json);

@ -11,8 +11,9 @@ MarketAllCategoryModel _$MarketAllCategoryModelFromJson(
MarketAllCategoryModel( MarketAllCategoryModel(
id: json['id'] as int, id: json['id'] as int,
name: json['name'] as String?, name: json['name'] as String?,
imgUrls: imgUrls: (json['imgUrls'] as List<dynamic>)
(json['imgUrls'] as List<dynamic>).map((e) => e as String).toList(), .map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
categoryList: (json['categoryList'] as List<dynamic>) categoryList: (json['categoryList'] as List<dynamic>)
.map( .map(
(e) => MarketAllCategoryModel.fromJson(e as Map<String, dynamic>)) (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:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
@ -7,7 +8,7 @@ part 'market_category_model.g.dart';
class MarketCategoryModel extends Equatable { class MarketCategoryModel extends Equatable {
final int id; final int id;
final String? name; final String? name;
final List<String> imgUrls; final List<ImgModel> imgUrls;
@override @override
List<Object?> get props => [id]; List<Object?> get props => [id];

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

@ -1,9 +1,8 @@
// Dart imports: // Dart imports:
import 'package:aku_new_community/constants/application_objects.dart'; import 'package:aku_new_community/constants/application_objects.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/extensions/color_ext.dart'; import 'package:aku_new_community/extensions/color_ext.dart';
import 'package:aku_new_community/model/common/img_model.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/models/home/home_activity_model.dart'; import 'package:aku_new_community/models/home/home_activity_model.dart';
import 'package:aku_new_community/models/home/home_announce_model.dart'; import 'package:aku_new_community/models/home/home_announce_model.dart';
import 'package:aku_new_community/models/home/home_swiper_model.dart'; import 'package:aku_new_community/models/home/home_swiper_model.dart';
@ -12,29 +11,31 @@ import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_new_community/pages/visitor_access_page/visitor_access_page.dart'; import 'package:aku_new_community/pages/visitor_access_page/visitor_access_page.dart';
import 'package:aku_new_community/provider/app_provider.dart'; import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/ui/community/activity/activity_card.dart'; import 'package:aku_new_community/ui/community/activity/activity_card.dart';
import 'package:aku_new_community/ui/community/activity/activity_detail_page.dart';
import 'package:aku_new_community/ui/community/activity/activity_list_page.dart'; import 'package:aku_new_community/ui/community/activity/activity_list_page.dart';
import 'package:aku_new_community/ui/community/community_func.dart'; import 'package:aku_new_community/ui/community/community_func.dart';
import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart';
import 'package:aku_new_community/ui/home/home_notification.dart'; import 'package:aku_new_community/ui/home/home_notification.dart';
import 'package:aku_new_community/ui/home/home_title.dart'; import 'package:aku_new_community/ui/home/home_title.dart';
import 'package:aku_new_community/ui/home/public_infomation/public_information_detail_page.dart';
import 'package:aku_new_community/ui/manager/advice/advice_page.dart'; import 'package:aku_new_community/ui/manager/advice/advice_page.dart';
import 'package:aku_new_community/ui/market/search/good_detail_page.dart'; import 'package:aku_new_community/ui/market/search/good_detail_page.dart';
import 'package:aku_new_community/ui/search/bee_search.dart'; import 'package:aku_new_community/ui/search/bee_search.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/login_util.dart'; import 'package:aku_new_community/utils/login_util.dart';
import 'package:aku_new_community/widget/animated/OverlayWidget.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart'; import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/others/rectIndicator.dart'; import 'package:aku_new_community/widget/others/rectIndicator.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/views/bee_gradient_divider.dart';
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:card_swiper/card_swiper.dart'; import 'package:card_swiper/card_swiper.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:jpush_flutter/jpush_flutter.dart'; import 'package:jpush_flutter/jpush_flutter.dart';
import 'package:palette_generator/palette_generator.dart';
import 'package:power_logger/power_logger.dart'; import 'package:power_logger/power_logger.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -69,7 +70,6 @@ class _HomePageState extends State<HomePage>
List<HomeSwiperModel> _swiperModels = []; List<HomeSwiperModel> _swiperModels = [];
SwiperController _swiperController = SwiperController(); SwiperController _swiperController = SwiperController();
ValueNotifier<Color> _barColor = ValueNotifier(Colors.transparent);
@override @override
void initState() { void initState() {
@ -85,14 +85,6 @@ class _HomePageState extends State<HomePage>
} }
_scrollController = ScrollController(); _scrollController = ScrollController();
_refreshController = EasyRefreshController(); _refreshController = EasyRefreshController();
_swiperController.addListener(() {
//onChangeIndex_currentSwiperIndexindex1+1index;
if (_swiperModels.length <= 1) {
_swiperBarColor(0);
} else {
_swiperBarColor((_currentSwiperIndex + 1) % 3);
}
});
SystemChrome.setSystemUIOverlayStyle( SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Colors.transparent)); SystemUiOverlayStyle(statusBarColor: Colors.transparent));
} }
@ -112,38 +104,61 @@ class _HomePageState extends State<HomePage>
commentCount = appProvider.messageCenterModel.commentCount ?? 0; commentCount = appProvider.messageCenterModel.commentCount ?? 0;
sysCount = appProvider.messageCenterModel.sysCount ?? 0; sysCount = appProvider.messageCenterModel.sysCount ?? 0;
sum = commentCount + sysCount; sum = commentCount + sysCount;
var head = ValueListenableBuilder( var head = Padding(
valueListenable: _barColor, padding: EdgeInsets.only(
builder: (context, Color color, child) { top: MediaQuery.of(context).padding.top + 20.w,
return Container( right: 32.w,
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), left: 32.w,
decoration: BoxDecoration( bottom: 20.w),
border: Border.all(width: 0, color: color),
color: color,
),
width: double.infinity,
child: child,
);
},
child: Padding(
padding: EdgeInsets.symmetric(vertical: 16.w, horizontal: 16.w),
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [ child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
if (appProvider.location != null) 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(
padding: const EdgeInsets.only(right: 5), padding: EdgeInsets.only(right: 16.w, left: 12.w),
child: Image.asset( child: Badge(
R.ASSETS_ICONS_ICON_MAIN_LOCATION_PNG, elevation: 0,
width: 32.w, badgeColor: Color(0xFFCF2525),
height: 32.w, 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( Text(
appProvider.location?['city'] == null appProvider.location?['city'] == null
? '' ? ''
: appProvider.location?['city'] as String? ?? '', : appProvider.location?['city'] as String? ?? '',
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 24.sp, fontSize: 28.sp,
color: Color(0xff333333), color: Color(0xff333333),
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -151,22 +166,22 @@ class _HomePageState extends State<HomePage>
Text( Text(
'(${appProvider.weatherType} ${appProvider.weatherTemp}℃)', '(${appProvider.weatherType} ${appProvider.weatherTemp}℃)',
style: TextStyle( style: TextStyle(
fontSize: 24.sp, fontSize: 28.sp,
color: Color(0xff999999), color: Color(0xff999999),
>>>>>>> b09ea45bd7aafc589e5c65d5846bf3243066ee5d
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
Spacer(), Spacer(),
// GestureDetector( GestureDetector(
// onTap: () { onTap: () {
// Get.to(() => BeeSearch()); Get.to(() => BeeSearch());
// }, },
// child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_FIND_PNG, child:
// height: 40.w, width: 40.w), Image.asset(Assets.home.icSearch.path, height: 48.w, width: 48.w),
// ), ),
Padding( 20.wb,
padding: EdgeInsets.only(right: 16.w, left: 12.w), Badge(
child: Badge(
elevation: 0, elevation: 0,
badgeColor: Color(0xFFCF2525), badgeColor: Color(0xFFCF2525),
padding: sum > 9 ? EdgeInsets.all(2.w) : EdgeInsets.all(5.w), padding: sum > 9 ? EdgeInsets.all(2.w) : EdgeInsets.all(5.w),
@ -185,23 +200,32 @@ class _HomePageState extends State<HomePage>
if (LoginUtil.isNotLogin) return; if (LoginUtil.isNotLogin) return;
Get.to(() => MessageCenterPage()); Get.to(() => MessageCenterPage());
}, },
child: Image.asset(R.ASSETS_ICONS_ICON_MAIN_MESSAGE_PNG, child: Image.asset(Assets.home.icMessage.path,
height: 40.w, width: 40.w), height: 48.w, width: 48.w),
)), )),
),
]), ]),
),
); );
return AnnotatedRegion<SystemUiOverlayStyle>( return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.dark, value: SystemUiOverlayStyle.dark,
child: Scaffold( child: Scaffold(
extendBody: true, extendBody: true,
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
body: Stack( backgroundColor: Color(0xFFFDE019),
children: [ appBar: PreferredSize(
EasyRefresh( preferredSize:
Size.fromHeight(MediaQuery.of(context).padding.top + 88.w),
child: head),
body: SafeArea(
child: Container(
height: MediaQuery.of(context).size.height,
decoration: BoxDecoration(
borderRadius:
BorderRadius.vertical(top: Radius.circular(32.w)),
color: Color(0xFFF9F9F9)),
clipBehavior: Clip.antiAliasWithSaveLayer,
child: EasyRefresh(
controller: _refreshController, controller: _refreshController,
header: BeeBallPauseHeader(bgColor: _barColor), header: MaterialHeader(),
firstRefresh: true, firstRefresh: true,
onRefresh: () async { onRefresh: () async {
_activityItemModels = await CommunityFunc.activityList(); _activityItemModels = await CommunityFunc.activityList();
@ -211,137 +235,104 @@ class _HomePageState extends State<HomePage>
setState(() {}); setState(() {});
}, },
child: CustomScrollView( child: CustomScrollView(
shrinkWrap: true,
controller: _scrollController, controller: _scrollController,
slivers: [ slivers: [
SliverToBoxAdapter( SliverToBoxAdapter(
child: Column( child: HomeSwiper(),
mainAxisSize: MainAxisSize.min,
children: [
head,
HomeSwiper(), //
// SizedBox(height: 100.w),
Container(
padding: EdgeInsets.only(top: 24.w, bottom: 32.w),
child: getFunction(), //ApplicationView(),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: const <BoxShadow>[
BoxShadow(
color: Color(0x14000000),
blurRadius: 0,
offset: Offset(0.0, 2.0),
spreadRadius: 0.1)
],
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(28),
bottomRight: Radius.circular(28))),
)
//ApplicationBox(child: ApplicationView()),
],
),
), ),
SliverToBoxAdapter( SliverToBoxAdapter(
child: Container( child: Container(
height: 40, margin: EdgeInsets.symmetric(horizontal: 32.w),
margin: EdgeInsets.only( padding:
left: 32.w, right: 32.w, top: 24.w), EdgeInsets.only(top: 20.w, left: 0.w, right: 0.w),
child: _applications(), //ApplicationView(),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.circular(16.w),
boxShadow: const <BoxShadow>[ ),
BoxShadow(
color: Color(0x14000000),
blurRadius: 4,
spreadRadius: 0.5)
],
), ),
child: HomeNotification(items: _boardItemModels)),
), ),
SliverToBoxAdapter( 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( child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
GestureDetector( Expanded(
flex: 2,
child: GestureDetector(
child: Container( child: Container(
margin: EdgeInsets.only(top: 24.w), padding:
padding: EdgeInsets.only(left: 32.w, top: 24.w), EdgeInsets.only(left: 34.w, top: 40.w),
width: 140,
height: 150,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.w),
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.fill,
image: image: AssetImage(
AssetImage(R.ASSETS_IMAGES_CARD_YELLOW_PNG), Assets.home.imgFkyq.path),
)), )),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Text( Text(
'访客邀请', '访客邀请',
style: TextStyle( style: TextStyle(
color: Color(0xD9000000), color: Color(0xD9000000),
fontSize: 26.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
10.hb, 10.hb,
Text( Text(
'一键分享', '让拜访更加便捷',
style: TextStyle( style: TextStyle(
color: Color(0x73000000), color: Color(0x73000000),
fontSize: 20.sp, 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: () { onTap: () {
Get.to(VisitorAccessPage()); Get.to(() => VisitorAccessPage());
}, },
), ),
25.wb, ),
Container( BeeGradientDivider.vertical(),
margin: EdgeInsets.only(top: 24.w), Expanded(
flex: 3,
child: Column( child: Column(
children: [ children: [
GestureDetector( Expanded(
flex: 1,
child: GestureDetector(
child: Container( child: Container(
width: 190, width: double.infinity,
height: 69,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(16.w),
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.cover,
image: AssetImage( image: AssetImage(
R.ASSETS_IMAGES_CARD_PINK_PNG), Assets.home.imgYjbj.path),
)), )),
child: Row( padding: EdgeInsets.only(
mainAxisAlignment: left: 32.w, top: 40.w),
MainAxisAlignment.start, child: Column(
children: [
20.wb,
Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
20.hb,
Text( Text(
'一键报警', '一键报警',
style: TextStyle( style: TextStyle(
color: Color(0xD9000000), color: Color(0xD9000000),
fontSize: 26.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
10.hb, 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: () { onTap: () {
Get.to(AlarmPage()); Get.to(() => AlarmPage());
}, },
), ),
GestureDetector( ),
BeeGradientDivider.horizontal(),
Expanded(
flex: 1,
child: GestureDetector(
child: Container( child: Container(
margin: EdgeInsets.only(top: 20.w), padding: EdgeInsets.only(
width: 190, top: 40.w, left: 32.w),
height: 69, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(16.w),
image: DecorationImage( image: DecorationImage(
fit: BoxFit.fill, fit: BoxFit.cover,
image: AssetImage( image: AssetImage(
R.ASSETS_IMAGES_CARD_BLUE_PNG), Assets.home.imgJyzx.path),
)), )),
child: Row( child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
20.wb,
Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
20.hb,
Text( Text(
'建议咨询', '建议咨询',
style: TextStyle( style: TextStyle(
color: Color(0xD9000000), color: Color(0xD9000000),
fontSize: 26.sp, fontSize: 28.sp,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
10.hb, 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: () { onTap: () {
Get.to(AdvicePage( Get.to(AdvicePage(
type: AdviceType.SUGGESTION)); type: AdviceType.SUGGESTION));
}, },
),
) )
], ],
), ),
@ -427,7 +401,14 @@ class _HomePageState extends State<HomePage>
], ],
), ),
), ),
),
SliverToBoxAdapter( 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( child: Column(
children: [ children: [
HomeTitle( HomeTitle(
@ -435,11 +416,11 @@ class _HomePageState extends State<HomePage>
suffixTitle: '查看全部', suffixTitle: '查看全部',
onTap: () => Get.to(() => ActivityListPage()), onTap: () => Get.to(() => ActivityListPage()),
), ),
24.hb,
_activityItemModels == [] _activityItemModels == []
? SizedBox() ? SizedBox()
: Container( : Container(
height: 480.w, height: 460.w,
padding: EdgeInsets.only(left: 32.w),
child: ListView.separated( child: ListView.separated(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
@ -466,12 +447,15 @@ class _HomePageState extends State<HomePage>
// : ActivityCard(model: _activityItemModel) // : ActivityCard(model: _activityItemModel)
// .pSymmetric(h: 24.w, v: 24.w), // .pSymmetric(h: 24.w, v: 24.w),
], ],
),
)), )),
SliverToBoxAdapter(
child: 48.hb,
)
], ],
), ),
), ),
OverlayLivingBtnWidget() ),
],
), ),
)); ));
} }
@ -479,11 +463,10 @@ class _HomePageState extends State<HomePage>
Widget HomeSwiper() { Widget HomeSwiper() {
return Container( return Container(
width: double.infinity, width: double.infinity,
height: 320.w, clipBehavior: Clip.antiAlias,
decoration: margin: EdgeInsets.all(32.w),
BoxDecoration(border: Border.all(width: 0, color: _barColor.value)), height: 248.w,
child: AspectRatio( decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.w)),
aspectRatio: 375 / 160,
child: Swiper( child: Swiper(
key: UniqueKey(), key: UniqueKey(),
controller: _swiperController, controller: _swiperController,
@ -521,7 +504,6 @@ class _HomePageState extends State<HomePage>
}, },
itemCount: _swiperModels.length, itemCount: _swiperModels.length,
), ),
),
); );
} }
@ -531,41 +513,49 @@ class _HomePageState extends State<HomePage>
launch(model.customizeUrl ?? ''); launch(model.customizeUrl ?? '');
break; break;
case 2: case 2:
Get.to(GoodDetailPage(goodId: model.id)); model.associationId == null
? null
: Get.to(() => GoodDetailPage(
goodId: model.associationId!,
));
break; break;
case 3: case 3:
// Get.to(page) model.associationId == null
? null
: Get.to(() => PublicInformationDetailPage(
id: model.associationId!,
));
break; break;
case 4: case 4:
model.associationId == null
? null
: Get.to(() => NoticeDetailPage(
id: model.associationId!,
));
break; break;
case 5: case 5:
model.associationId == null
? null
: Get.to(() => ActivityDetailPage(
id: model.associationId!,
));
break; break;
default: default:
BotToast.showText(text: '类型错误'); () {};
}
}
Future _swiperBarColor(int index) async {
if (_swiperModels.isNotEmpty) {
var color =
await PaletteGenerator.fromImageProvider(CachedNetworkImageProvider(
SAASAPI.image(ImgModel.first(_swiperModels[index].imgList)),
));
_barColor.value = color.dominantColor?.color ?? Colors.transparent;
} else {
_barColor.value = Colors.transparent;
} }
} }
Widget getSwiperImage(HomeSwiperModel swiperModel) { Widget getSwiperImage(HomeSwiperModel swiperModel) {
return Container( return Container(
clipBehavior: Clip.antiAliasWithSaveLayer,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.w)),
child: BeeImageNetwork( child: BeeImageNetwork(
imgs: swiperModel.imgList ?? [], imgs: swiperModel.imgList ?? [],
), ),
); );
} }
Widget getFunction() { Widget _applications() {
return Column( return Column(
children: [ children: [
Row( Row(
@ -578,30 +568,36 @@ class _HomePageState extends State<HomePage>
getFunctionBtn(AO.fromRaw('智慧养老')), getFunctionBtn(AO.fromRaw('智慧养老')),
], ],
), ),
32.hb, 24.hb,
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
getFunctionBtn(AO.fromRaw('周边服务')), getFunctionBtn(AO.fromRaw('周边服务')),
getFunctionBtn(AO.fromRaw('小蜜蜂任务', replaceTitle: '任务发布')), getFunctionBtn(AO.fromRaw('任务发布', replaceTitle: '任务发布')),
getFunctionBtn(AO.fromRaw('邻家宠物')), getFunctionBtn(AO.fromRaw('邻家宠物')),
getFunctionBtn(AO.fromRaw('全部应用')), getFunctionBtn(AO.fromRaw('全部应用')),
], ],
), ),
44.hb,
BeeDivider.horizontal(),
10.hb,
HomeNotification(items: _boardItemModels),
10.hb,
], ],
); );
} }
Widget getFunctionBtn(AO ao) { Widget getFunctionBtn(AO ao) {
return MaterialButton( return Expanded(
shape: StadiumBorder(), flex: 1,
padding: EdgeInsets.zero, child: GestureDetector(
onPressed: () { onTap: () {
if (LoginUtil.isNotLogin) return; if (LoginUtil.isNotLogin) return;
// if (!LoginUtil.haveRoom(ao.title)) return; // if (!LoginUtil.haveRoom(ao.title)) return;
if (ao.page == null) { if (ao.page == null) {
BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5)); BotToast.showText(
text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else { } else {
Get.to(ao.page); Get.to(ao.page);
} }
@ -611,13 +607,14 @@ class _HomePageState extends State<HomePage>
children: [ children: [
Image.asset( Image.asset(
ao.path, ao.path,
height: 80.w, height: 96.w,
width: 80.w, width: 96.w,
), ),
16.hb, 8.hb,
ao.title.text.size(22.sp).color(Color(0xA6000000)).bold.make(), 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:flutter/material.dart';
import 'package:aku_new_community/utils/headers.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'; import 'widget/bill_card.dart';
class LifePayBillPage extends StatefulWidget { class LifePayBillPage extends StatefulWidget {
LifePayBillPage({Key? key}) : super(key: key); final LifePayRecordModel model;
LifePayBillPage({Key? key, required this.model}) : super(key: key);
@override @override
_LifePayBillPageState createState() => _LifePayBillPageState(); _LifePayBillPageState createState() => _LifePayBillPageState();
@ -35,6 +40,14 @@ class _LifePayBillPageState extends State<LifePayBillPage> {
); );
} }
Map<int, String> getPayType = {
1: '支付宝',
2: '微信',
3: '现金',
4: 'pos',
5: '预缴扣除'
};
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
@ -53,13 +66,71 @@ class _LifePayBillPageState extends State<LifePayBillPage> {
), ),
child: Column( child: Column(
children: [ children: [
_cardList('收费项目', '公共能耗费'), _cardList('收费项目', widget.model.chargesName),
SizedBox(height: 30.w), 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/base/base_style.dart';
import 'package:aku_new_community/constants/api.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/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/pages/things_page/widget/bee_list_view.dart';
import 'package:aku_new_community/utils/headers.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:common_utils/common_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
import 'life_pay_bill_page/life_pay_bill_page.dart';
class LifePayRecordPage extends StatefulWidget { class LifePayRecordPage extends StatefulWidget {
LifePayRecordPage({Key? key}) : super(key: key); LifePayRecordPage({Key? key}) : super(key: key);
@ -41,10 +45,10 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return BeeScaffold(
title: '生活缴费', title: '缴费记录',
body: BeeListView( body: BeeListView(
path: API.manager.paymentRecord, path: SAASAPI.lifePay.paymentRecordList,
extraParams: {"estateId": UserTool.appProvider.selectedHouse!.estateId}, extraParams: {"estateId": UserTool.userProvider.defaultHouse!.id},
controller: _refreshController, controller: _refreshController,
convert: (models) { convert: (models) {
return models.rows return models.rows
@ -82,17 +86,35 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
} }
Widget _buildRecordCard(LifePayRecordModel model) { Widget _buildRecordCard(LifePayRecordModel model) {
return Column( return GestureDetector(
onTap: (){
Get.to(()=>LifePayBillPage(model: model,));
},
child: Column(
children: [ 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( Row(
children: [ children: [
model.chargesTemplateDetailName.text model.chargesName.text
.size(30.sp) .size(30.sp)
.color(ktextPrimary) .color(ktextPrimary)
.bold .bold
.make(), .make(),
Spacer(), Spacer(),
'${S.of(context)!.tempPlotName} ${model.roomName}' '${S.of(context)!.tempPlotName} ${model.unitName+model.estateName}'
.text .text
.size(24.sp) .size(24.sp)
.color(Color(0xFF999999)) .color(Color(0xFF999999))
@ -100,30 +122,18 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
], ],
), ),
16.w.heightBox, 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( Row(
children: [ children: [
'缴纳金额'.text.color(ktextSubColor).size(28.sp).make(), '缴纳金额'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(), Spacer(),
'${model.paidPrice}'.text.color(ktextPrimary).size(28.sp).make(), '${model.payAmount}'.text.color(ktextPrimary).size(28.sp).make(),
], ],
), ),
Row( Row(
children: [ children: [
'缴费时间'.text.color(ktextSubColor).size(28.sp).make(), '付款方式'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(), Spacer(),
'${DateUtil.formatDateStr(model.createDate, format: "yyyy/MM/dd HH:mm")}' '${getPayType[model.payType]}'
.text .text
.color(ktextPrimary) .color(ktextPrimary)
.size(28.sp) .size(28.sp)
@ -132,27 +142,26 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
), ),
Row( Row(
children: [ children: [
'付款方式'.text.color(ktextSubColor).size(28.sp).make(), '流水号'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(), Spacer(),
'${getPayType[model.payType]}' '${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
], ],
), ),
Row( Row(
children: [ children: [
'订单'.text.color(ktextSubColor).size(28.sp).make(), '流水'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(), Spacer(),
'${model.code}'.text.color(ktextPrimary).size(28.sp).make(), '${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
], ],
), ),
].sepWidget(separate: 24.w.heightBox), ].sepWidget(separate: 24.w.heightBox),
) )
.box .box
.color(Colors.white) .color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 32.w, horizontal: 20.w)) .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/base/base_style.dart';
import 'package:aku_new_community/constants/api.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_finish_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_util.dart'; import 'package:aku_new_community/pages/life_pay/pay_util.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
@ -30,6 +31,7 @@ class LifePrePayPage extends StatefulWidget {
class _LifePrePayPageState extends State<LifePrePayPage> { class _LifePrePayPageState extends State<LifePrePayPage> {
late TextEditingController _editingController; late TextEditingController _editingController;
String _payMethod = '支付宝'; String _payMethod = '支付宝';
num amount = 0;
@override @override
void initState() { void initState() {
@ -66,6 +68,14 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
16.w.widthBox, 16.w.widthBox,
TextField( TextField(
controller: _editingController, controller: _editingController,
onChanged: (String value){
if(value.isEmpty){
amount = 0;
}else{
amount = double.parse(value);
}
},
decoration: InputDecoration( decoration: InputDecoration(
hintText: '0.0', hintText: '0.0',
hintStyle: TextStyle( hintStyle: TextStyle(
@ -156,24 +166,29 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
Function cancel = BotToast.showLoading(); Function cancel = BotToast.showLoading();
try { try {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().post(API.pay.dailPaymentPrePay, params: { await NetUtil().post(SAASAPI.pay.createPrepaymentOrder,
"estateId": UserTool.appProvider.selectedHouse!.estateId, params: {
"payType": 1, 'estateId': UserTool.userProvider.defaultHouse!.id,
"payPrice": _editingController.text 'payAmount':amount
}); },
showMessage: true);
if (baseModel.success) { if (baseModel.success) {
bool result = await PayUtil() bool result = await PayUtil().callAliPay(
.callAliPay(baseModel.msg, API.pay.dailPaymentPrePayCheck); (baseModel.data as String),
SAASAPI.pay.prepaymentOrderCheckAlipay);
if (result) { if (result) {
Get.off(() => PayFinishPage()); Get.off(() => PayFinishPage());
}
} else { } else {
BotToast.showText(text: baseModel.msg); ///
BotToast.showText(text: '充值失败');
} }
}
cancel();
} catch (e) { } catch (e) {
cancel();
LoggerData.addData(e); LoggerData.addData(e);
} }
cancel();
}, },
child: '立即充值'.text.size(32.sp).bold.black.make()), child: '立即充值'.text.size(32.sp).bold.black.make()),
); );

@ -45,8 +45,6 @@ class PayFinishPage extends StatelessWidget {
), ),
70.w.heightBox, 70.w.heightBox,
'支付成功'.text.size(48.sp).color(Colors.white).bold.make(), '支付成功'.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/base/base_style.dart';
import 'package:aku_new_community/models/life_pay/life_pay_list_model.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/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/utils/headers.dart';
import 'package:aku_new_community/widget/bee_scaffold.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/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 { class LifePayDetailPage extends StatefulWidget {
final LifePayListModel model; 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; return true;
} }
///
static Future<List<MyHouseModel>> getMyHouseInfo() async { static Future<List<MyHouseModel>> getMyHouseInfo() async {
BaseModel baseModel = await NetUtil().get( BaseModel baseModel = await NetUtil().get(
SAASAPI.profile.house.userHouse, SAASAPI.profile.house.userHouse,

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

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

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

@ -5,7 +5,7 @@ class ActivityFunc {
} }
var nowDate = DateTime.now(); var nowDate = DateTime.now();
if (date.isBefore(nowDate)) { if (date.isBefore(nowDate)) {
return ''; return '已结束';
} else { } else {
var days = date.difference(nowDate).inDays; var days = date.difference(nowDate).inDays;
if (days > 0) { 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/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/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_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/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_card.dart';
import 'package:aku_new_community/ui/home/public_infomation/public_infomation_page.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/utils/network/net_util.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class CommunityPage extends StatefulWidget { class CommunityPage extends StatefulWidget {
@ -295,7 +294,7 @@ class _CommunityPageState extends State<CommunityPage>
var result = var result =
await Get.to(() => PublicInformationDetailPage(id: item.id)); await Get.to(() => PublicInformationDetailPage(id: item.id));
CommunityFunc.addViews(item.id); CommunityFunc.addViews(item.id);
if (result) { if (result != null && result) {
_easyRefreshController.callRefresh(); _easyRefreshController.callRefresh();
} }
}, },
@ -400,7 +399,7 @@ class _CommunityPageState extends State<CommunityPage>
}, '全部'), }, '全部'),
), ),
32.hb, 32.hb,
_searchHistoryWidget() _newTopicListWidget()
], ],
), ),
); );
@ -418,7 +417,7 @@ class _CommunityPageState extends State<CommunityPage>
minWidth: double.infinity, minWidth: double.infinity,
color: Color(0xFFF3F3F3), color: Color(0xFFF3F3F3),
onPressed: () { onPressed: () {
//Get.to(() => SearchGoodsPage()); // Get.to(() => TopicSearchPage());
}, },
child: Row( child: Row(
children: [ children: [
@ -435,7 +434,8 @@ class _CommunityPageState extends State<CommunityPage>
); );
} }
_searchHistoryWidget() { ///
_newTopicListWidget() {
return Container( return Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 32.w, right: 32.w), 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), labelPadding: EdgeInsets.only(right: 12.w, left: 12.w),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onSelected: (bool value) { onSelected: (bool value) {
// Get.to(() => TopicDetailPage(model: item)); Get.to(() => TopicDetailPage(
topicId: item.id,
));
}, },
label: Row( label: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

@ -61,6 +61,7 @@ class _EventDetailPageState extends State<EventDetailPage> {
List<CommentListModel> _comments = []; List<CommentListModel> _comments = [];
List<bool> _folds = []; List<bool> _folds = [];
List<bool> _likes = []; List<bool> _likes = [];
List<int> _likeNums = [];
// //
FocusNode _focusNode = FocusNode(); FocusNode _focusNode = FocusNode();
@ -141,6 +142,7 @@ class _EventDetailPageState extends State<EventDetailPage> {
body: EasyRefresh.custom( body: EasyRefresh.custom(
controller: _refreshController, controller: _refreshController,
header: MaterialHeader(), header: MaterialHeader(),
footer: MaterialFooter(),
firstRefresh: true, firstRefresh: true,
onRefresh: () async { onRefresh: () async {
BaseModel model = await NetUtil().get( BaseModel model = await NetUtil().get(
@ -160,11 +162,8 @@ class _EventDetailPageState extends State<EventDetailPage> {
base.rows.map((e) => CommentListModel.fromJson(e)).toList(); base.rows.map((e) => CommentListModel.fromJson(e)).toList();
_folds = List.filled(_size, true); _folds = List.filled(_size, true);
_comments.forEach((element) { _comments.forEach((element) {
if (element.isLike) { _likes.add(element.isLike);
_likes.add(true); _likeNums.add(element.likes);
} else {
_likes.add(false);
}
}); });
setState(() {}); setState(() {});
}, },
@ -183,11 +182,8 @@ class _EventDetailPageState extends State<EventDetailPage> {
_comments.addAll(_list); _comments.addAll(_list);
_folds.addAll(List.filled(_list.length, true)); _folds.addAll(List.filled(_list.length, true));
_list.forEach((element) { _list.forEach((element) {
if (element.isLike) { _likes.add(element.isLike);
_likes.add(true); _likeNums.add(element.likes);
} else {
_likes.add(false);
}
}); });
} }
setState(() {}); setState(() {});
@ -360,17 +356,48 @@ class _EventDetailPageState extends State<EventDetailPage> {
child: Row( child: Row(
children: [ children: [
Spacer(), 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( Image.asset(
R.ASSETS_ICONS_COMMUNITY_LIKE_PNG, R.ASSETS_ICONS_COMMUNITY_LIKE_PNG,
width: 40.w, width: 32.w,
height: 40.w, height: 32.w,
color: !_likes[rootIndex]
? Colors.black.withOpacity(0.45)
: kPrimaryColor,
), ),
5.wb, 5.wb,
'${model.likes}' '${_likeNums[rootIndex]}'
.text .text
.size(24.sp) .size(24.sp)
.color(Color(0xFF999999)) .color(Color(0xFF999999))
.make(), .make(),
],
),
),
),
32.wb, 32.wb,
GestureDetector( GestureDetector(
onTap: () { onTap: () {
@ -470,7 +497,12 @@ class _EventDetailPageState extends State<EventDetailPage> {
_focusNode.requestFocus(); _focusNode.requestFocus();
_currentCommentIndex = rootIndex; _currentCommentIndex = rootIndex;
}, },
child: RichText( child: Material(
color: Colors.transparent,
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
RichText(
text: TextSpan( text: TextSpan(
text: '${model.createName}', text: '${model.createName}',
style: TextStyle( style: TextStyle(
@ -483,7 +515,8 @@ class _EventDetailPageState extends State<EventDetailPage> {
child: Container( child: Container(
width: 56.w, width: 56.w,
height: 28.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, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFF8B133), color: Color(0xFFF8B133),
@ -493,6 +526,7 @@ class _EventDetailPageState extends State<EventDetailPage> {
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 24.sp, fontSize: 24.sp,
height: 1.2,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
)), )),
@ -518,6 +552,9 @@ class _EventDetailPageState extends State<EventDetailPage> {
fontSize: 28.sp, fontSize: 28.sp,
)) ))
])), ])),
],
),
),
); );
} }
@ -567,7 +604,6 @@ class _EventDetailPageState extends State<EventDetailPage> {
color: kPrimaryColor, color: kPrimaryColor,
minWidth: 120.w, minWidth: 120.w,
height: 55.w, height: 55.w,
onPressed: () async { onPressed: () async {
var res = await NetUtil() var res = await NetUtil()
.post(SAASAPI.community.commentInsert, params: params); .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> { class _TopicSearchPageState extends State<TopicSearchPage> {
List<TopicListModel> _models = []; List<TopicListModel> _models = [];
bool isHot = true; bool isHot = true;
TextEditingController _textEditingController = TextEditingController();
Future _getModels() async { Future _getModels() async {
var re = await NetUtil().get(SAASAPI.community.topicList, params: { var re = await NetUtil().get(SAASAPI.community.topicList, params: {
'pageNum': 1, 'pageNum': 1,
'size': 10, 'size': 10,
'title': _textEditingController.text
}); });
if (re.success) { if (re.success) {
_models = (re.data['rows'] as List) _models = (re.data['rows'] as List)
@ -42,6 +44,12 @@ class _TopicSearchPageState extends State<TopicSearchPage> {
super.initState(); super.initState();
} }
@override
void dispose() {
_textEditingController.dispose();
super.dispose();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var appbar = PreferredSize( var appbar = PreferredSize(
@ -80,6 +88,7 @@ class _TopicSearchPageState extends State<TopicSearchPage> {
.get(SAASAPI.community.topicList, params: { .get(SAASAPI.community.topicList, params: {
'pageNum': 1, 'pageNum': 1,
'size': 20, 'size': 20,
'title': _textEditingController.text,
}); });
if (re.success) { if (re.success) {
_models = (re.data['rows'] as List) _models = (re.data['rows'] as List)
@ -88,6 +97,7 @@ class _TopicSearchPageState extends State<TopicSearchPage> {
setState(() {}); setState(() {});
} }
}, },
controller: _textEditingController,
decoration: InputDecoration( decoration: InputDecoration(
border: InputBorder.none, border: InputBorder.none,
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,

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

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

@ -80,51 +80,20 @@ class _TaskEvaluationDialogState extends State<TaskEvaluationDialog> {
), ),
), ),
80.hb, 80.hb,
Row( BottomPluralButtonWidget(
children: [ leftTitle: '暂不评价',
MaterialButton( onLeftTap: () {},
onPressed: () {}, rightTitle: '确认提交',
minWidth: 330.w, onRightTap: () async {
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 {
if (_currentIndex == null) { if (_currentIndex == null) {
BotToast.showText(text: '请选择评价满意度'); BotToast.showText(text: '请选择评价满意度');
return; return;
} }
var re = var re = await widget.evaluate(_currentIndex!, _controller.text);
await widget.evaluate(_currentIndex!, _controller.text);
if (re) { if (re) {
Get.back(); 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; return false;
} }
if (int.parse(_rewardController.text) == 0) { if (int.parse(_rewardController.text) == 0) {
BotToast.showText(text: '赏金不能为0'); BotToast.showText(text: '报酬不能为0');
return false; return false;
} }
if (_nameController.text.isEmpty) { 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:aku_new_community/widget/buttons/bee_long_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/src/extensions/string_ext.dart'; import 'package:velocity_x/src/extensions/string_ext.dart';
class WorkOrderBillDialog extends StatelessWidget { class WorkOrderBillDialog extends StatelessWidget {
@ -76,7 +77,11 @@ class WorkOrderBillDialog extends StatelessWidget {
], ],
), ),
80.hb, 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/extensions/num_ext.dart';
import 'package:aku_new_community/gen/assets.gen.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_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/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/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_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/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_func.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_map.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: [ children: [
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
var base = await NetUtil().get( await WorkOrderFuc.getProgress(
SAASAPI.workOrder.findScheduleById, workOrderId: widget.id);
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);
}
}, },
child: Material( child: Material(
color: Colors.transparent, color: Colors.transparent,
@ -147,6 +132,14 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
padding: padding:
EdgeInsets.only(top: 120.w, left: 32.w, right: 32.w), EdgeInsets.only(top: 120.w, left: 32.w, right: 32.w),
children: [ children: [
Offstage(
offstage: _model!.status < 5,
child: Column(
children: [
_historyReport(),
24.hb,
],
)),
Offstage( Offstage(
offstage: _model!.servicePersonnelImgList == null || offstage: _model!.servicePersonnelImgList == null ||
_model!.servicePersonnelImgList!.isEmpty, _model!.servicePersonnelImgList!.isEmpty,
@ -242,8 +235,8 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
case 6: case 6:
return BeeLongButton( return BeeLongButton(
onPressed: () async { onPressed: () async {
var bills = await WorkOrderFuc.getBill(workOrderId: widget.id); await WorkOrderFuc.getBill(workOrderId: widget.id);
await Get.bottomSheet(WorkOrderBillDialog(models: bills)); _refreshController.callRefresh();
}, },
text: '确认支付'); text: '确认支付');
case 7: case 7:
@ -268,7 +261,9 @@ class _WorkOrderDetailPageState extends State<WorkOrderDetailPage> {
Widget _historyReport() { Widget _historyReport() {
return GestureDetector( return GestureDetector(
onTap: () {}, onTap: () {
Get.to(HistoryReportPage(id: widget.id));
},
child: Material( child: Material(
color: Colors.transparent, color: Colors.transparent,
child: Container( child: Container(

@ -1,7 +1,14 @@
import 'package:aku_new_community/constants/saas_api.dart'; 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_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/base_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package: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 { class WorkOrderFuc {
/// ///
@ -48,20 +55,36 @@ class WorkOrderFuc {
return base.success; return base.success;
} }
/// ///
static Future<List<WorkOrderBillModel>> getBill({ static Future getProgress({
required int workOrderId, required int workOrderId,
}) async { }) async {
var models = <WorkOrderBillModel>[]; var base = await NetUtil().get(SAASAPI.workOrder.findScheduleById,
var base = await NetUtil().get(SAASAPI.workOrder.cancel, params: { params: {'workOrderId': workOrderId});
'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) { if (base.success) {
models = (base.data as List) var models = (base.data as List)
.map((e) => WorkOrderBillModel.fromJson(e)) .map((e) => WorkOrderBillModel.fromJson(e))
.toList(); .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/base/base_style.dart';
import 'package:aku_new_community/constants/application_objects.dart'; import 'package:aku_new_community/constants/application_objects.dart';
import 'package:aku_new_community/provider/app_provider.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/headers.dart';
import 'package:aku_new_community/utils/login_util.dart'; import 'package:aku_new_community/utils/login_util.dart';
import 'package:aku_new_community/widget/bee_back_button.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 { class AllApplicationPage extends StatefulWidget {
AllApplicationPage({Key? key}) : super(key: key); AllApplicationPage({Key? key}) : super(key: key);
@ -31,6 +29,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
_buildTile( _buildTile(
AO object, { AO object, {
bool editMode = false, bool editMode = false,
bool online = false,
}) { }) {
return MaterialButton( return MaterialButton(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.w)), shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.w)),
@ -40,7 +39,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
: () { : () {
if (LoginUtil.isNotLogin) return; if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRoom(object.title)) return; if (!LoginUtil.haveRoom(object.title)) return;
if (object.page == null) { if (object.page == null || !online) {
BotToast.showText( BotToast.showText(
text: '正在准备上线中,敬请期待', align: Alignment(0, 0.5)); text: '正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else { } 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); final appProvider = Provider.of<AppProvider>(context);
return GridView.builder( return GridView.builder(
gridDelegate: gridDelegate:
@ -174,7 +173,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Stack( return Stack(
children: [ children: [
_buildTile(objects[index], editMode: _editMode), _buildTile(objects[index], editMode: _editMode, online: online),
Positioned( Positioned(
right: 0, right: 0,
top: 0, top: 0,
@ -211,8 +210,8 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
child: ListView( child: ListView(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
children: [ children: [
_buildListTile('为您推荐', 0), _buildListTile('智慧管家', 0),
_buildListTile('智慧管家', 1), _buildListTile('暂未上线', 1),
// _buildListTile('商城购物', 2), // _buildListTile('商城购物', 2),
], ],
), ),
@ -222,8 +221,8 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
controller: _pageController, controller: _pageController,
children: [ children: [
_buildView(recommendApp), _buildView(smartManagerApp, true),
_buildView(smartManagerApp), _buildView(recommendApp, false),
], ],
).expand(), ).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/models/home/home_announce_model.dart';
import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart'; import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart';
import 'package:aku_new_community/utils/bee_date_util.dart'; import 'package:aku_new_community/utils/bee_date_util.dart';
@ -35,11 +36,7 @@ class _HomeNotificationState extends State<HomeNotification> {
return Row( return Row(
children: [ children: [
24.wb, 24.wb,
Image.asset( Assets.home.icGonggao.image(width: 48.w, height: 48.w),
R.ASSETS_IMAGES_NOTICE_PNG,
height: 45.w,
width: 61.w,
),
24.wb, 24.wb,
widget.items.isEmpty widget.items.isEmpty
? Spacer() ? Spacer()
@ -48,7 +45,7 @@ class _HomeNotificationState extends State<HomeNotification> {
options: CarouselOptions( options: CarouselOptions(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
viewportFraction: 1.0, viewportFraction: 1.0,
aspectRatio: 300 / 40, aspectRatio: 343 / 44,
autoPlay: true, autoPlay: true,
onPageChanged: (index, _) { onPageChanged: (index, _) {
//print(index.toString()); //print(index.toString());
@ -77,9 +74,8 @@ class _HomeNotificationState extends State<HomeNotification> {
child: Text( child: Text(
e.title, e.title,
style: TextStyle( style: TextStyle(
color: Color(0xA6000000), color: Color(0xFF333333),
fontSize: 22.sp, fontSize: 24.sp,
fontWeight: FontWeight.bold,
), ),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@ -89,14 +85,14 @@ class _HomeNotificationState extends State<HomeNotification> {
child: Text( child: Text(
BeeDateUtil(DateUtil.getDateTime(e.createDate)).timeAgo, BeeDateUtil(DateUtil.getDateTime(e.createDate)).timeAgo,
style: TextStyle( style: TextStyle(
color: Color(0x73000000), color: Color(0xFF999999),
fontSize: 20.sp, fontSize: 24.sp,
), ),
)), )),
8.wb, 8.wb,
Icon( Icon(
CupertinoIcons.chevron_forward, CupertinoIcons.chevron_forward,
size: 24.w, size: 32.w,
color: Color(0xFF999999), color: Color(0xFF999999),
), ),
], ],

@ -1,10 +1,8 @@
import 'package:aku_new_community/utils/headers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/utils/headers.dart';
class HomeTitle extends StatelessWidget { class HomeTitle extends StatelessWidget {
final String title; final String title;
final String suffixTitle; final String suffixTitle;
@ -21,27 +19,10 @@ class HomeTitle extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Row(
children: [ 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(), title.text.size(32.sp).bold.make(),
],
),
Spacer(), Spacer(),
MaterialButton( GestureDetector(
shape: StadiumBorder(), onTap: onTap,
padding: EdgeInsets.symmetric(horizontal: 12.w),
onPressed: onTap,
child: Row( child: Row(
children: [ children: [
suffixTitle.text.size(24.sp).color(Color(0xFF999999)).make(), 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/models/market/market_all_category_model.dart';
import 'package:aku_new_community/ui/market/search/search_goods_page.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/utils/headers.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -19,13 +19,10 @@ class NewCategorySubCard extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
Spacer(), Spacer(),
FadeInImage.assetNetwork( BeeImageNetwork(
image: SAASAPI.image(
subModels.imgUrls.isNotEmpty ? subModels.imgUrls.first : ''),
//subModels.imgUrls!.isNotEmpty? subModels.imgUrls!.first :'',
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
height: 75.w, height: 75.w,
width: 75.w, width: 75.w,
imgs: subModels.imgUrls,
), ),
12.hb, 12.hb,
Container( Container(

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

@ -76,7 +76,7 @@ class _OrderCardState extends State<OrderCard> {
"payType": 1, // "payType": 1, //
"payPrice": widget.model.payPrice, "payPrice": widget.model.payPrice,
"residentId": UserTool.userProvider.userInfoModel!.id, "residentId": UserTool.userProvider.userInfoModel!.id,
"payname": UserTool.userProvider.userInfoModel!.name, "payName": UserTool.userProvider.userInfoModel!.name,
"payTel": UserTool.userProvider.userInfoModel!.tel, "payTel": UserTool.userProvider.userInfoModel!.tel,
}); });
if (baseModel.success) { 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/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/constants/saas_api.dart';
import 'package:aku_new_community/models/market/goods_popular_model.dart'; import 'package:aku_new_community/models/market/goods_popular_model.dart';
import 'package:aku_new_community/models/search/search_goods_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/hive_store.dart';
import 'package:aku_new_community/utils/text_utils.dart'; import 'package:aku_new_community/utils/text_utils.dart';
import 'package:aku_new_community/widget/bee_scaffold.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 '../search_goods_card.dart';
import 'good_detail_page.dart'; import 'good_detail_page.dart';
import 'goods_list_card.dart'; import 'goods_list_card.dart';
@ -435,7 +433,7 @@ class SearchGoodsPageState extends State<SearchGoodsPage> {
Container( Container(
color: Color(0xFFF2F3F4), color: Color(0xFFF2F3F4),
child: BeeListView( child: BeeListView(
path: API.market.findGoodsList, path: SAASAPI.market.good.recommend,
controller: _refreshController1, controller: _refreshController1,
refreshExtra: (model) => refreshExtra: (model) =>
_models = model as List<SearchGoodsModel>, _models = model as List<SearchGoodsModel>,
@ -677,7 +675,7 @@ class SearchGoodsPageState extends State<SearchGoodsPage> {
/// ///
_searchHistoryWidget() { _searchHistoryWidget() {
List<Widget> choiceChipList = []; List<Widget> choiceChipList = [];
if (_searchHistory != null && _searchHistory.length > 0) { if (_searchHistory.length > 0) {
for (var text in _searchHistory) { for (var text in _searchHistory) {
choiceChipList.add(Padding( choiceChipList.add(Padding(
padding: EdgeInsets.only(right: 10, bottom: 5), padding: EdgeInsets.only(right: 10, bottom: 5),
@ -760,12 +758,10 @@ class SearchGoodsPageState extends State<SearchGoodsPage> {
/// ///
getSearchListFromSharedPreferences() async { getSearchListFromSharedPreferences() async {
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false); final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
_searchHistory = HiveStore.appBox!.get( var history = HiveStore.appBox!.get(
userProvider.userInfoModel?.id.toString() ?? userProvider.userInfoModel?.id.toString() ?? '' + "userSearhHistory");
'' + "userSearhHistory") ?? if (history != null) {
''; _searchHistory = (history as List).cast<String>().toList();
if (_searchHistory == null) {
_searchHistory = [];
} }
setState(() {}); setState(() {});
} }

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

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

Loading…
Cancel
Save