From a0ddb25f1d3f918a2ffe44052ea29ce4660ff7e5 Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Tue, 30 Mar 2021 19:32:40 +0800 Subject: [PATCH 1/4] =?UTF-8?q?1=E3=80=81=E9=87=8D=E5=90=AFApp=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/custom_page/custom_item_page.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pages/custom_page/custom_item_page.dart b/lib/pages/custom_page/custom_item_page.dart index 7620bde..4412267 100644 --- a/lib/pages/custom_page/custom_item_page.dart +++ b/lib/pages/custom_page/custom_item_page.dart @@ -137,7 +137,9 @@ class __CustomItemPageContainerState extends State<_CustomItemPageContainer> wit if (current is CustomItemPageAppRestartState) { // 重启App Logger.log('开始重新启动App CustomItemPageAppRestartState'); - EventUtil.instance.fire(ReloadEvent()); + Timer(Duration(milliseconds: 1000), () { + EventUtil.instance.fire(ReloadEvent()); + }); return false; } return true; From 2adbbd87bddc8aa7c994bee50118c7520e51534d Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Wed, 31 Mar 2021 10:02:07 +0800 Subject: [PATCH 2/4] =?UTF-8?q?1=E3=80=81=E6=A8=A1=E7=89=88=E6=9B=B4?= =?UTF-8?q?=E6=96=B0bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/custom_page/custom_item_page.dart | 4 +--- lib/widgets/restart_widget/restart_widget.dart | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/pages/custom_page/custom_item_page.dart b/lib/pages/custom_page/custom_item_page.dart index 4412267..7620bde 100644 --- a/lib/pages/custom_page/custom_item_page.dart +++ b/lib/pages/custom_page/custom_item_page.dart @@ -137,9 +137,7 @@ class __CustomItemPageContainerState extends State<_CustomItemPageContainer> wit if (current is CustomItemPageAppRestartState) { // 重启App Logger.log('开始重新启动App CustomItemPageAppRestartState'); - Timer(Duration(milliseconds: 1000), () { - EventUtil.instance.fire(ReloadEvent()); - }); + EventUtil.instance.fire(ReloadEvent()); return false; } return true; diff --git a/lib/widgets/restart_widget/restart_widget.dart b/lib/widgets/restart_widget/restart_widget.dart index 703063a..2ac7ba2 100644 --- a/lib/widgets/restart_widget/restart_widget.dart +++ b/lib/widgets/restart_widget/restart_widget.dart @@ -68,11 +68,11 @@ class _RestartWidgetState extends State { @override Widget build(BuildContext context) { - const bool inProduction = const bool.fromEnvironment("dart.vm.product"); - if (!inProduction) { - ///debug阶段可重启 - isFirst=true; - } + // const bool inProduction = const bool.fromEnvironment("dart.vm.product"); + // if (!inProduction) { + // ///debug阶段可重启 + // isFirst=true; + // } return StreamBuilder(stream: outData,builder: (context,asyn){ if(asyn.data==null&&!isFirst){ return Scaffold( From bdf24bd95219ab48843201407e5e53a066729256 Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Wed, 31 Mar 2021 18:28:38 +0800 Subject: [PATCH 3/4] =?UTF-8?q?1=E3=80=81=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E4=BD=8D=E6=95=B0=E7=9A=84=E4=BF=AE=E6=94=B9=E6=94=AF=E6=8C=81?= =?UTF-8?q?4=EF=BD=9E6=E4=BD=8D=202=E3=80=81appUI=E9=87=8D=E5=90=AF?= =?UTF-8?q?=E7=9A=84bug=E4=BF=AE=E6=94=B9=203=E3=80=81=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=90=9C=E7=B4=A2=E7=9A=84key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../security_bind_alipay_page.dart | 2 +- .../security_mobile/security_mobile_unbind.dart | 2 +- .../security_password/security_password.dart | 3 ++- .../security_unbind_alipay/security_unbin_alipay.dart | 2 +- lib/widgets/custom/search/custom_search_widget.dart | 10 ++++++++-- lib/widgets/restart_widget/restart_widget.dart | 2 ++ 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/pages/security_page/security_bind_alipay/security_bind_alipay_page.dart b/lib/pages/security_page/security_bind_alipay/security_bind_alipay_page.dart index e4c3de1..6653791 100644 --- a/lib/pages/security_page/security_bind_alipay/security_bind_alipay_page.dart +++ b/lib/pages/security_page/security_bind_alipay/security_bind_alipay_page.dart @@ -80,7 +80,7 @@ class _SecurityBindAlipayContainerState void _verifiy() { bool canConfirm = _nameController.text.length > 0 && _accountController.text.length > 0 && - _codeController.text.length == 6; + _codeController.text.length >= 4 && _codeController.text.length <= 4; if (canConfirm != _canConfirm) { setState(() { _canConfirm = canConfirm; diff --git a/lib/pages/security_page/security_mobile/security_mobile_unbind.dart b/lib/pages/security_page/security_mobile/security_mobile_unbind.dart index 9d44f54..8381dd0 100644 --- a/lib/pages/security_page/security_mobile/security_mobile_unbind.dart +++ b/lib/pages/security_page/security_mobile/security_mobile_unbind.dart @@ -130,7 +130,7 @@ class _SecurityMobileUnbindState extends State { } void _verifiy() { - bool canConfirm = _codeController.text.length == 6; + bool canConfirm = _codeController.text.length >= 4 && _codeController.text.length <= 6; if (canConfirm != _canConfirm) { setState(() { _canConfirm = canConfirm; diff --git a/lib/pages/security_page/security_password/security_password.dart b/lib/pages/security_page/security_password/security_password.dart index d02d79b..1b0715b 100644 --- a/lib/pages/security_page/security_password/security_password.dart +++ b/lib/pages/security_page/security_password/security_password.dart @@ -145,7 +145,8 @@ class _SecurityPasswordState extends State { } void _verifiy() { - bool canConfirm = _passwordController.text.length >= 6 && _confirmController.text.length >= 6 && _codeController.text.length == 6; + bool canConfirm = _passwordController.text.length >= 6 && _confirmController.text.length >= 6 && + _codeController.text.length >= 4 && _codeController.text.length <= 6; if (canConfirm != _canConfirm) { setState(() { _canConfirm = canConfirm; diff --git a/lib/pages/security_page/security_unbind_alipay/security_unbin_alipay.dart b/lib/pages/security_page/security_unbind_alipay/security_unbin_alipay.dart index 82b5300..3e96b9a 100644 --- a/lib/pages/security_page/security_unbind_alipay/security_unbin_alipay.dart +++ b/lib/pages/security_page/security_unbind_alipay/security_unbin_alipay.dart @@ -36,7 +36,7 @@ class _SecurityUnbinAlipayState extends State { } void _verifiy() { - bool canConfirm = _codeController.text.length == 6; + bool canConfirm = _codeController.text.length >= 4 && _codeController.text.length <= 6; if (canConfirm != _canConfirm) { setState(() { _canConfirm = canConfirm; diff --git a/lib/widgets/custom/search/custom_search_widget.dart b/lib/widgets/custom/search/custom_search_widget.dart index 11a98db..1c5bd42 100644 --- a/lib/widgets/custom/search/custom_search_widget.dart +++ b/lib/widgets/custom/search/custom_search_widget.dart @@ -48,12 +48,18 @@ class CustomSearchWidget extends StatelessWidget { if (EmptyUtil.isEmpty(model)) return Container(); Widget rlt; switch (model.moduleType) { - case 'search_1': + case 'search_1': // 右1图标 rlt = _buildStyle1Widget(context); break; - case 'search_2': + case 'search_2': // 无图标 rlt = _buildStyle2Widget(context); break; + case 'search_3': // 左1右1图标 + rlt = Container(); + break; + case 'search_4': // 右按钮 + rlt = Container(); + break; default: rlt = Container(); break; diff --git a/lib/widgets/restart_widget/restart_widget.dart b/lib/widgets/restart_widget/restart_widget.dart index 2ac7ba2..98dbd0e 100644 --- a/lib/widgets/restart_widget/restart_widget.dart +++ b/lib/widgets/restart_widget/restart_widget.dart @@ -73,6 +73,7 @@ class _RestartWidgetState extends State { // ///debug阶段可重启 // isFirst=true; // } + isFirst = true; return StreamBuilder(stream: outData,builder: (context,asyn){ if(asyn.data==null&&!isFirst){ return Scaffold( @@ -82,6 +83,7 @@ class _RestartWidgetState extends State { isFirst=false; return widget?.child; } + // return widget?.child; }); } From edbbb387b6e23c9c7c10360f6dc94b9a8cac19fa Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Wed, 31 Mar 2021 19:46:54 +0800 Subject: [PATCH 4/4] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E5=A4=9A?= =?UTF-8?q?=E7=9C=BC=E5=AF=BC=E8=88=AA=E7=9A=84=E5=AD=97=E4=BD=93=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/multi_nav/custom_quick_entry.dart | 85 +------------------ .../custom/search/custom_search_widget.dart | 14 ++- 2 files changed, 16 insertions(+), 83 deletions(-) diff --git a/lib/widgets/custom/multi_nav/custom_quick_entry.dart b/lib/widgets/custom/multi_nav/custom_quick_entry.dart index 7a2690b..943ab8f 100644 --- a/lib/widgets/custom/multi_nav/custom_quick_entry.dart +++ b/lib/widgets/custom/multi_nav/custom_quick_entry.dart @@ -118,7 +118,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> // 图标的高度 double iconHeight = 40.0; // 标题的高度 - double titleHeight = 20.0; + double titleHeight = 21.0; // 子元素的高度 double itemHeight = iconHeight; @@ -412,7 +412,7 @@ class __CustomQuickEntryContainerState extends State<_CustomQuickEntryContainer> padding: const EdgeInsets.only(top: 5), child: Text( item?.title ?? '', - style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)), + style: TextStyle(fontSize: 12, color: HexColor.fromHex(model?.titleColor)), ), ), ), @@ -514,83 +514,6 @@ class MyNetWorkImage extends StatelessWidget { child: CachedNetworkImage(width: width, imageUrl: imgUrl), ); } - -// Widget _getMainWidget(CustomQuickEntryModel model) { -// // 数据总数 -// int totalDataSize = model?.listStyle?.length ?? 0; -// -// // 展示的总行数 -// int totalRowSize = 1;int.parse(model?.rowSize ?? '1'); -// -// // 展示的列数 -// int columSize = 5;int.parse(model?.columnSize ?? '5'); -// -// // 图标的高度 -// double iconHeight = 40.0; -// // 标题的高度 -// double titleHeight = 20.0; -// -// // 子元素的高度 -// double itemHeight = iconHeight; -// -// // 如果有一级标题 -// if (!EmptyUtil.isEmpty(model?.isShowTitle) && model.isShowTitle == '1') { -// itemHeight = iconHeight + titleHeight; -// } -// -// //如果有二级标题 -// if (!EmptyUtil.isEmpty(model?.isShowSubTitle) && model.isShowSubTitle == '1') { -// itemHeight = iconHeight + titleHeight * 2; -// } -// -// // 进度条的边距 -// double barMargin = 15.0; -// // 总页数 -// int totalPage = totalDataSize % (totalRowSize * columSize) == 0 ? totalDataSize ~/ (totalRowSize * columSize) : (totalDataSize ~/ (totalRowSize * columSize)) + 1; -// -// // 总体高度 = 行数 * (子元素高度 + 边距高度) + 进度条的高度 -// double totalHeight = totalRowSize * (itemHeight + barMargin) + 4; -// if (!EmptyUtil.isEmpty(model?.pagination) && model.pagination != 'type_null' /*model.pagination_open == '0'*/) { -// totalHeight = totalRowSize * (itemHeight + barMargin); -// } -// -// return Container( -// color: HexColor.fromHex(widget?.model['bg_color']), -// // color: Colors.yellow, -// child: Container( -// margin: EdgeInsets.only(top: 15, bottom: totalPage > 1 ? 15 : 0), -// height: totalHeight, -// // 总体高度 -// width: double.infinity, -// color: HexColor.fromHex(widget?.model['bg_color']), -// child: Swiper( -// controller: _controller, -// itemCount: totalPage, -// loop: false, -// itemBuilder: (context, index) { -// return Container( -// height: double.infinity, -// width: double.infinity, -// padding: const EdgeInsets.symmetric(horizontal: 12.5), -// child: _getPageWidget( -// iconHeight: iconHeight, -// titleHeight: titleHeight, -// totalDataSize: totalDataSize, -// totalPage: totalPage, -// currentPage: index, -// totalRowSize: totalRowSize, -// columSize: columSize, -// model: model, -// itemHeight: itemHeight, -// ), -// ); -// }, -// pagination: totalPage <= 1 ? null : _getSwiperPaginationContorl(model, totalPage), -// ), -// ), -// ); -// } - } class CustomQuickCateEntry extends StatefulWidget { @@ -694,7 +617,7 @@ class _CustomQuickCateEntryState extends State with Ticker // 图标的高度 double iconHeight = 40; // 标题的高度 - double titleHeight = 20.0; + double titleHeight = 21.0; // 子元素的高度 double itemHeight = iconHeight; @@ -997,7 +920,7 @@ class _CustomQuickCateEntryState extends State with Ticker padding: const EdgeInsets.only(top: 5), child: Text( item?.title ?? '', - style: TextStyle(fontSize: 10, color: HexColor.fromHex(model?.titleColor)), + style: TextStyle(fontSize: 12, color: HexColor.fromHex(model?.titleColor)), ), ), ), diff --git a/lib/widgets/custom/search/custom_search_widget.dart b/lib/widgets/custom/search/custom_search_widget.dart index 1c5bd42..48c827d 100644 --- a/lib/widgets/custom/search/custom_search_widget.dart +++ b/lib/widgets/custom/search/custom_search_widget.dart @@ -55,10 +55,10 @@ class CustomSearchWidget extends StatelessWidget { rlt = _buildStyle2Widget(context); break; case 'search_3': // 左1右1图标 - rlt = Container(); + rlt = _buildStyle3Widget(context); break; case 'search_4': // 右按钮 - rlt = Container(); + rlt = _buildStyle4Widget(context); break; default: rlt = Container(); @@ -68,6 +68,16 @@ class CustomSearchWidget extends StatelessWidget { return rlt; } + /// 左1右1图标 + Widget _buildStyle3Widget(BuildContext context) { + return Container(); + } + + /// 右按钮 + Widget _buildStyle4Widget(BuildContext context) { + return Container(); + } + /// 右1图标 Widget _buildStyle1Widget(BuildContext context) { return Row(