From c96ee3f1ff3526f98a90da31cdc44e4167dc47f6 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Thu, 16 Sep 2021 16:21:33 +0800 Subject: [PATCH] fix some issues --- lib/models/life_pay/life_pay_record_model.dart | 3 ++- lib/models/life_pay/life_pay_record_model.g.dart | 2 +- lib/ui/profile/house/house_owners_page.dart | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/models/life_pay/life_pay_record_model.dart b/lib/models/life_pay/life_pay_record_model.dart index 07de1ebe..31d32d3f 100644 --- a/lib/models/life_pay/life_pay_record_model.dart +++ b/lib/models/life_pay/life_pay_record_model.dart @@ -1,5 +1,6 @@ import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; + part 'life_pay_record_model.g.dart'; @JsonSerializable() @@ -7,7 +8,7 @@ class LifePayRecordModel extends Equatable { final int id; final String chargesTemplateDetailName; final String roomName; - final int years; + final String years; final num paidPrice; final String createName; final String createDate; diff --git a/lib/models/life_pay/life_pay_record_model.g.dart b/lib/models/life_pay/life_pay_record_model.g.dart index b912a9df..361eda36 100644 --- a/lib/models/life_pay/life_pay_record_model.g.dart +++ b/lib/models/life_pay/life_pay_record_model.g.dart @@ -11,7 +11,7 @@ LifePayRecordModel _$LifePayRecordModelFromJson(Map json) { id: json['id'] as int, chargesTemplateDetailName: json['chargesTemplateDetailName'] as String, roomName: json['roomName'] as String, - years: json['years'] as int, + years: json['years'] as String, paidPrice: json['paidPrice'] as num, createName: json['createName'] as String, createDate: json['createDate'] as String, diff --git a/lib/ui/profile/house/house_owners_page.dart b/lib/ui/profile/house/house_owners_page.dart index 8db03f81..1be176cc 100644 --- a/lib/ui/profile/house/house_owners_page.dart +++ b/lib/ui/profile/house/house_owners_page.dart @@ -149,7 +149,7 @@ class _HouseOwnersPageState extends State { }, child: ListView( children: [ - UserTool.appProveider.selectedHouse == null + _emptyHouse ? 280.hb : Padding( padding: EdgeInsets.all(32.w), @@ -162,7 +162,7 @@ class _HouseOwnersPageState extends State { ), ), if (!_emptyHouse) 88.hb, - if (!_haveAuthedHouse) + if (_emptyHouse) Stack( children: [ Padding( @@ -185,7 +185,7 @@ class _HouseOwnersPageState extends State { child: Text('添加房屋'), ), ), - if (!isOwner && !_emptyHouse) _contractRelevant() + if (!isOwner && _haveAuthedHouse) _contractRelevant() ], ), ),