From ae22cd8b6f542e8a66e4731be91c28f7c6f20d40 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Tue, 9 Feb 2021 10:27:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=86=99=E6=80=A7=E5=88=AB=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=EF=BC=8C=E7=BC=B4=E8=B4=B9=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/life_pay/life_pay_page.dart | 21 ++++----- lib/pages/personal/user_profile_page.dart | 55 ++++++++--------------- 2 files changed, 30 insertions(+), 46 deletions(-) diff --git a/lib/pages/life_pay/life_pay_page.dart b/lib/pages/life_pay/life_pay_page.dart index 353a9501..04077cbd 100644 --- a/lib/pages/life_pay/life_pay_page.dart +++ b/lib/pages/life_pay/life_pay_page.dart @@ -260,16 +260,17 @@ class _LifePayPageState extends State { return BeeScaffold( title: '生活缴费', actions: [ - InkWell( - onTap: () { - LifePayRecordPage().to(); - }, - child: Container( - padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), - alignment: Alignment.center, - child: '缴费记录'.text.black.size(28.sp).make(), - ), - ), + //TODO 缴费记录 无接口 + // InkWell( + // onTap: () { + // LifePayRecordPage().to(); + // }, + // child: Container( + // padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w), + // alignment: Alignment.center, + // child: '缴费记录'.text.black.size(28.sp).make(), + // ), + // ), ], body: BeeListView( path: API.manager.dailyPaymentList, diff --git a/lib/pages/personal/user_profile_page.dart b/lib/pages/personal/user_profile_page.dart index b073c9fe..e36b9a32 100644 --- a/lib/pages/personal/user_profile_page.dart +++ b/lib/pages/personal/user_profile_page.dart @@ -2,6 +2,7 @@ import 'dart:io'; // Flutter imports: +import 'package:akuCommunity/widget/picker/bee_custom_picker.dart'; import 'package:akuCommunity/widget/picker/bee_date_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -130,42 +131,24 @@ class _UserProfilePageState extends State { _buildTile( '性别', userProvider.userInfoModel.sexValue.text.make(), - onPressed: () { - showCupertinoDialog( - context: context, - builder: (context) { - return CupertinoAlertDialog( - title: '请选择'.text.isIntrinsic.make(), - content: SizedBox( - child: CupertinoPicker( - itemExtent: 50, - onSelectedItemChanged: (index) { - _sex = index + 1; - }, - children: [ - '男'.text.isIntrinsic.make().centered(), - '女'.text.isIntrinsic.make().centered(), - ], - useMagnifier: true, - ), - height: 300.w, - ), - actions: [ - CupertinoDialogAction( - child: '取消'.text.isIntrinsic.make(), - onPressed: Get.back, - ), - CupertinoDialogAction( - child: '确定'.text.isIntrinsic.make(), - onPressed: () { - userProvider.setSex(_sex); - Get.back(); - }, - ), - ], - ); - }, - ); + onPressed: () async { + int result = await Get.bottomSheet(BeeCustomPicker( + onPressed: () => Get.back(result: _sex), + body: CupertinoPicker( + itemExtent: 50, + onSelectedItemChanged: (index) { + _sex = index + 1; + }, + children: [ + '男'.text.isIntrinsic.make().centered(), + '女'.text.isIntrinsic.make().centered(), + ], + useMagnifier: true, + ).expand(), + )); + if (result != null) { + userProvider.setSex(_sex); + } }, ), _buildTile(