收货地址显示;家庭成员头像显示;缴费记录时间显示

pull/1/head
戴余标 3 years ago
parent 452deaf97d
commit 835a266194

@ -101,12 +101,14 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
), ),
child: DateUtil.formatDate(DateUtil.getDateTime(model.createDate), child: DateUtil.formatDate(DateUtil.getDateTime(model.createDate),
format: 'MM-dd HH-mm') format: 'MM-dd HH:mm')
.text .text
.size(24.sp) .size(24.sp)
.color(Colors.black.withOpacity(0.45)) .color(Colors.black.withOpacity(0.45))
.make(), .make(),
), ),
Column(
children: [
Row( Row(
children: [ children: [
model.chargesName.text model.chargesName.text
@ -127,7 +129,11 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
children: [ children: [
'缴纳金额'.text.color(ktextSubColor).size(28.sp).make(), '缴纳金额'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(), Spacer(),
'${model.payAmount}'.text.color(ktextPrimary).size(28.sp).make(), '${model.payAmount}'
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
], ],
), ),
Row( Row(
@ -161,6 +167,8 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
.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(),
],
),
); );
} }
} }

@ -68,6 +68,7 @@ class _MyAddressItemState extends State<MyAddressItem> {
if (result) { if (result) {
await appProvider.getMyAddress(); await appProvider.getMyAddress();
widget.refreshController!.callRefresh(); widget.refreshController!.callRefresh();
Get.back();
} }
}, },
child: Container( child: Container(

@ -1,5 +1,7 @@
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
import '../../model/common/img_model.dart';
part 'my_family_member_list_model.g.dart'; part 'my_family_member_list_model.g.dart';
@JsonSerializable() @JsonSerializable()
@ -29,6 +31,7 @@ class Member {
final int id; final int id;
final String name; final String name;
final int identity; final int identity;
final List<ImgModel> avatarImgList;
factory Member.fromJson(Map<String, dynamic> json) => _$MemberFromJson(json); factory Member.fromJson(Map<String, dynamic> json) => _$MemberFromJson(json);
@ -36,5 +39,6 @@ class Member {
required this.id, required this.id,
required this.name, required this.name,
required this.identity, required this.identity,
required this.avatarImgList,
}); });
} }

@ -23,4 +23,7 @@ Member _$MemberFromJson(Map<String, dynamic> json) => Member(
id: json['id'] as int, id: json['id'] as int,
name: json['name'] as String, name: json['name'] as String,
identity: json['identity'] as int, identity: json['identity'] as int,
avatarImgList: (json['imgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
); );

@ -74,8 +74,9 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
if (appProvider.defaultAddressModel == null) { if (appProvider.defaultAddressModel == null) {
return '选择收货地址'; return '选择收货地址';
} else { } else {
return (appProvider.defaultAddressModel!.locationName ?? '') + return (_goodDetail!.stockStatus == 1) ? '有货' : '无货';
(appProvider.defaultAddressModel!.addressDetail ?? ''); // (appProvider.defaultAddressModel!.locationName ?? '') +
// (appProvider.defaultAddressModel!.addressDetail ?? '');
} }
} else { } else {
return (_addressModel!.locationName ?? '') + return (_addressModel!.locationName ?? '') +
@ -393,6 +394,7 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
var result = await Get.to(() => AddressListPage( var result = await Get.to(() => AddressListPage(
canBack: true, canBack: true,
)); ));
_addressModel = null;
if (result != null) { if (result != null) {
_addressModel = result; _addressModel = result;
_refreshController.callRefresh(); _refreshController.callRefresh();
@ -418,8 +420,9 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
width: 430.w, width: 430.w,
child: Text( child: Text(
receiveAddress, receiveAddress,
style: style: receiveAddress == '无货'
TextStyle(fontSize: 24.sp, color: ktextPrimary), ? TextStyle(fontSize: 24.sp, color: kDangerColor)
: TextStyle(fontSize: 24.sp, color: ktextPrimary),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
@ -433,27 +436,27 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
16.wb, 16.wb,
], ],
), ),
Row( // Row(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
120.wb, // 120.wb,
20.hb, // 20.hb,
Offstage( // Offstage(
offstage: receiveAddress == '选择收货地址', // offstage: receiveAddress == '选择收货地址',
child: (_goodDetail!.stockStatus == 1) // child: (_goodDetail!.stockStatus == 1)
? '有货' // ? '有货'
.text // .text
.color(Color(0xFFE52E2E)) // .color(Color(0xFFE52E2E))
.size(28.sp) // .size(28.sp)
.make() // .make()
: '无货' // : '无货'
.text // .text
.color(Color(0xFFE52E2E)) // .color(Color(0xFFE52E2E))
.size(28.sp) // .size(28.sp)
.make(), // .make(),
) // )
], // ],
), // ),
], ],
), ),
), ),
@ -779,5 +782,4 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
return count + ''; return count + '';
} }
} }

@ -12,6 +12,9 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import '../../../model/common/img_model.dart';
import '../../../widget/bee_avatar_widget.dart';
class MemberView extends StatefulWidget { class MemberView extends StatefulWidget {
const MemberView({Key? key}) : super(key: key); const MemberView({Key? key}) : super(key: key);
@ -65,7 +68,7 @@ class _MemberViewState extends State<MemberView> {
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w), padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
child: '${model.buildingName}${model.unitName}单元${model.estateName}房间' child: '${model.buildingName}${model.unitName}单元${model.estateName}'
.text .text
.size(32.sp) .size(32.sp)
.color(Colors.black.withOpacity(0.85)) .color(Colors.black.withOpacity(0.85))
@ -79,7 +82,7 @@ class _MemberViewState extends State<MemberView> {
crossAxisCount: 4, crossAxisCount: 4,
children: [ children: [
...model.members ...model.members
.map((e) => _avatar(Identify.values[e.identity], e.name)) .map((e) => _avatar(e.avatarImgList,Identify.values[e.identity], e.name))
.toList() .toList()
], ],
shrinkWrap: true, shrinkWrap: true,
@ -92,6 +95,7 @@ class _MemberViewState extends State<MemberView> {
} }
Widget _avatar( Widget _avatar(
List<ImgModel> imgModel,
Identify identify, Identify identify,
String name, String name,
) { ) {
@ -108,8 +112,11 @@ class _MemberViewState extends State<MemberView> {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40.w), borderRadius: BorderRadius.circular(40.w),
border: Border.all(color: kPrimaryColor, width: 4.w)), border: Border.all(color: kPrimaryColor, width: 4.w)),
child: Assets.newIcon.avatarPlaceholder child: BeeAvatarWidget(
.image(width: 80.w, height: 80.w), width: 80.w,
height: 80.w,
imgs: imgModel,
),
), ),
Positioned( Positioned(
bottom: -20.w, bottom: -20.w,

Loading…
Cancel
Save