From cdf8fed47250f7a95969c05a97089b6922547f0e Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Thu, 7 Apr 2022 18:29:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=9F=8E=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/newIcon/all_classes.png | Bin 0 -> 3277 bytes assets/newIcon/ic_dingdan.png | Bin 0 -> 503 bytes assets/newIcon/ic_gouwuc.png | Bin 0 -> 1500 bytes lib/constants/application_objects.dart | 7 +- lib/gen/assets.gen.dart | 6 + lib/pages/home/home_page.dart | 9 +- lib/pages/personal/personal_page.dart | 10 + lib/pages/setting_page/settings_page.dart | 2 +- lib/pages/sign/login/set_nick_name_page.dart | 143 +++++++------ lib/provider/user_provider.dart | 8 +- lib/ui/market/market_page.dart | 196 ++++++++++-------- .../widget/animated_home_background.dart | 7 +- lib/ui/profile/new_house/my_house_page.dart | 2 +- 13 files changed, 224 insertions(+), 166 deletions(-) create mode 100644 assets/newIcon/all_classes.png create mode 100644 assets/newIcon/ic_dingdan.png create mode 100644 assets/newIcon/ic_gouwuc.png diff --git a/assets/newIcon/all_classes.png b/assets/newIcon/all_classes.png new file mode 100644 index 0000000000000000000000000000000000000000..bd601fab88de2e5b9bb24bc4252bc0a75cc3377b GIT binary patch literal 3277 zcmb_fM^qCE7EK^PD4}-{K8hf{Hz^_zsR0D(MOr|ljf5si5K&M=6Dc9IPiTTP0TqEz zRHQel(v=?gw4jEPz~G!Ye>St2#Vqc*@4m8ln^&G$TN*={1epK;0L0Y9$mX1*egjMo z001q$>5a|>5Mg6%0H_%fCY}o;xTC2r3umm}KW5(2a`+%6@fL^u0P#e`T_{B;FHX z7$z&_&*WGFO~3K_%Pm7Mt~x;>Bj^`S=`3v%eqOo6c`C4n}5V_zf4Jn^JL58OZe|t!w_HCFbhEb5WMu zoeeBjE%a@nS@%|DXfXP$pdzlKO7B#o?^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dWBUq z=>r`zZ`iX3n-sbm<7U0>w-~nT<$E1!q@0r!>Dp-ZcRz2qTrp$N8r%h3pC9(_hU}5@ z%&j5X{9;o}2%h#v{Qli9AE$2ikriCu@98ZFIpi5?l_tT%`k%xo!+Fs+qd0S2a7ub+ zFQc6|mqo^pZd9oJa4LbxwUzRiXla4b0=U7)} TqggKD_bXuvwKS?R@QC{-XeS8M literal 0 HcmV?d00001 diff --git a/assets/newIcon/ic_dingdan.png b/assets/newIcon/ic_dingdan.png new file mode 100644 index 0000000000000000000000000000000000000000..260d8b5bcfeecf6d05d006e6c65fa3e12fd6db9a GIT binary patch literal 503 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAifV{wqX6T`Z5GB1Igv;dzFS0D`m z4h{~MmX_w`=Eh)P3I;%?2^bg|8Nt~=8K4-1i$(&ua1jU_LSEAoGz40sSQ6wH%)rRR z!pX-kXJBe>?d6kK)!N=SZRW~-7wi7DSu6qh~IE?4&N&e5Bt)KZbGwSe#OTQ9l#>H$=w!LygY-75YL!j@9 zCJ$NJ;!AZ4y`p}7S+Q=#@>8#r3rpknu4tZiOSmb?$zGtdbwQIV&(8Wg9`^DPNs4DO zB5k&(%55y3c7sdU?EjCV?LTMFZ~3^kO!U5&k?9M&36mFOsZX&`cl3Dc~q) zEML<6`3zI8t+~jy;AWz^Z!E`$KVcs#Si~4SV*hg&8TS}Zum1OU_3EZgGcQ>_=H2;u zp%%ybz(3zyFVre*xO8CF+PSq4B^af1?yRuof7G@=PH7(}Q?%Q`Ysnj0W#6%Og9@~#SJ&S>S_@%d9BD8@Wp{an^LB{Ts5Z^gYd literal 0 HcmV?d00001 diff --git a/assets/newIcon/ic_gouwuc.png b/assets/newIcon/ic_gouwuc.png new file mode 100644 index 0000000000000000000000000000000000000000..f7a461238c74c4c0194ff8a238a5875cd1adbaa3 GIT binary patch literal 1500 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAifV{wqX6T`Z5GA|hzm;?fRLR^7@ zK=A+ne;^qe8tUNSprxhd>FH@{X=!Y1tf!~v=H>zerlvqHP>sI6K2RBi3zW68vI45Nu&@BChX?|>Km`!(Mn*;^CMFOzL=dP3 zC;~JJjRBMe0-$<`I8Y6Q0q4Sv0*XKcA&TKzfVM!?AR7*3L%0w(05w9m5H~}qFlxZ_&&RVc&$+DHJR%_<_{q~}uiw0V_x{7j&tJa&`1$MipTGZ3d(}1oll6X27srr@ z!*8em4i^d(IIhUp$;CM-;IzBz#Hmr4@25}wwrKgxsTr>N+>>9doRO&+6*<#Wvvpcz z*Pd_jIq5HcTt0WVyTIn}f$z(!zghpb++Cdh?46c~Wa^jyp6@w0ngo9RT2hr7=B3~s z;i2(pb?8ziE{@_~wc&H+CK%MlO>GNj=FRsoz4>1x->>q$UyWnXgA8{AwGEcWiMD6Joy}7;G`1w?f6q=S ztN6IDe8)!R)l2_+b8v+fh3kLPHwT; z6EAa}{>9M{GwY{sGI!G)1LpO|7ye$a`J8=|;tIx1FAvRIyF5AcnUiv5Ubw=GIXf;@ zGMFSUcl;LjzuPusR+-X^jvYo7j3%WWb{_va^8YPtDBxG(c(!_{xPx%0$_u$~U(Buv zZ_R!7vT=6BpIp^DcWx`K$h7nipZ2Hel38F`;N7{qgjCPZ37Aq||1EEdK1<)prRN^5 zTyaF_>(YN)BbpaHKO?d9odt(7e=3dl zpX}dG<=e-8-KjcN|7CxYZONj}9bbygxtC<|6c;J!=^FPh`xdF^x8kzKX64gT_D53; zH$K$<)VeyZc-QOb7ROGu-RIVYY8wgt*Jk3gJ@49QKX*g(bEWh9!yBGIa%#NvEi2Qz g%uP~v$3Ld!&*mQb%X+&Bm appObjects = [ AO('借还管理', Assets.newIcon.icJhgl.path, () => Get.to(SelectBorrowReturnPage())), // AO('一键报警', Assets.newIcon.yj, () => AlarmPage()), - AO('设施预约', Assets.home.icSsyy.path, () => FacilityAppointmentPage()), + AO('设施预约', Assets.home.icSsyy.path, () { + BotToast.showText(text: '此功能升级中,敬请期待'); + return; + Get.to(() => FacilityAppointmentPage()); + }), AO('快递包裹', Assets.newIcon.icKdbg.path, () => Get.to(() => ExpressPackagePage())), AO('电子商务', Assets.newIcon.icDzsw.path, diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index b1b6006e..27a6cada 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -635,6 +635,8 @@ class $AssetsJsonGen { class $AssetsNewIconGen { const $AssetsNewIconGen(); + AssetGenImage get allClasses => + const AssetGenImage('assets/newIcon/all_classes.png'); AssetGenImage get avatarPlaceholder => const AssetGenImage('assets/newIcon/avatar_placeholder.png'); AssetGenImage get hyhd => const AssetGenImage('assets/newIcon/hyhd.png'); @@ -642,10 +644,14 @@ class $AssetsNewIconGen { const AssetGenImage('assets/newIcon/ic_daifuk.png'); AssetGenImage get icDaishouh => const AssetGenImage('assets/newIcon/ic_daishouh.png'); + AssetGenImage get icDingdan => + const AssetGenImage('assets/newIcon/ic_dingdan.png'); AssetGenImage get icDlxx => const AssetGenImage('assets/newIcon/ic_dlxx.png'); AssetGenImage get icDzsw => const AssetGenImage('assets/newIcon/ic_dzsw.png'); AssetGenImage get icEssc => const AssetGenImage('assets/newIcon/ic_essc.png'); AssetGenImage get icFwll => const AssetGenImage('assets/newIcon/ic_fwll.png'); + AssetGenImage get icGouwuc => + const AssetGenImage('assets/newIcon/ic_gouwuc.png'); AssetGenImage get icGxtc => const AssetGenImage('assets/newIcon/ic_gxtc.png'); AssetGenImage get icGxtp => const AssetGenImage('assets/newIcon/ic_gxtp.png'); AssetGenImage get icHdtp => const AssetGenImage('assets/newIcon/ic_hdtp.png'); diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 9656d96d..323a4a53 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -8,7 +8,6 @@ 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/pages/message_center_page/message_center_page.dart'; 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/provider/app_provider.dart'; import 'package:aku_new_community/ui/community/activity/activity_card.dart'; import 'package:aku_new_community/ui/community/activity/activity_detail_page.dart'; @@ -21,7 +20,6 @@ import 'package:aku_new_community/ui/home/public_infomation/public_information_d import 'package:aku_new_community/ui/market/search/good_detail_page.dart'; import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/login_util.dart'; -import 'package:aku_new_community/utils/websocket/tips_dialog.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'; @@ -239,7 +237,8 @@ class _HomePageState extends State borderRadius: BorderRadius.circular(16.w), image: DecorationImage( fit: BoxFit.fill, - image: AssetImage( Assets.home.imgFkyq.path), + image: AssetImage( + Assets.home.imgFkyq.path), )), child: Column( crossAxisAlignment: @@ -358,7 +357,7 @@ class _HomePageState extends State ), onTap: () async { BotToast.showText( - text: '本小区尚未配置门禁设备', + text: '此功能升级中,稍后上线', align: Alignment(0, 0.5)); // Get.to(AdvicePage( // type: AdviceType.SUGGESTION)); @@ -405,7 +404,7 @@ class _HomePageState extends State child: Builder( builder: (context) { return ActivityCard( - home: true, + home: true, model: _activityItemModels[index]); }, diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index e5ba31b3..ecb2f6c5 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -35,6 +35,8 @@ class PersonalIndex extends StatefulWidget { class _PersonalIndexState extends State with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin { + EasyRefreshController _refreshController = EasyRefreshController(); + Widget _orderButton({ required String name, required String path, @@ -66,6 +68,12 @@ class _PersonalIndexState extends State super.initState(); } + @override + void dispose() { + _refreshController.dispose(); + super.dispose(); + } + @override Widget build(BuildContext context) { super.build(context); @@ -77,6 +85,7 @@ class _PersonalIndexState extends State child: Scaffold( body: EasyRefresh( header: MaterialHeader(), + controller: _refreshController, onRefresh: () async { await userProvider.updateUserInfo(); await userProvider.updateMyHouseInfo(); @@ -183,6 +192,7 @@ class _PersonalIndexState extends State tomorrowIntegral: 2)); await UserTool.userProvider .changeTodayClocked(); + _refreshController.callRefresh(); } else { BotToast.showText(text: base.msg); } diff --git a/lib/pages/setting_page/settings_page.dart b/lib/pages/setting_page/settings_page.dart index d414cbfe..f7b81a23 100644 --- a/lib/pages/setting_page/settings_page.dart +++ b/lib/pages/setting_page/settings_page.dart @@ -78,7 +78,7 @@ class _SettingsPageState extends State { ), onPressed: () { userProvider.logout(); - Get.to(() => OtherLoginPage()); + Get.offAll(() => OtherLoginPage()); }, ), ], diff --git a/lib/pages/sign/login/set_nick_name_page.dart b/lib/pages/sign/login/set_nick_name_page.dart index 30e05262..d9354e2c 100644 --- a/lib/pages/sign/login/set_nick_name_page.dart +++ b/lib/pages/sign/login/set_nick_name_page.dart @@ -25,77 +25,84 @@ class _SetNickNamePageState extends State { @override Widget build(BuildContext context) { - return BeeScaffold( - title: '', - bodyColor: Colors.white, - body: ListView( - children: [ - 24.w.heightBox, - Row( - children: [ - 48.w.widthBox, - '请设置您的昵称' - .text - .size(36.sp) - .bold - .color(Colors.black.withOpacity(0.65)) - .make(), - Spacer(), - ], - ), - 16.w.heightBox, - Row( - children: [ - 48.w.widthBox, - '昵称不可设置侮辱性词汇、特殊符号、敏感字符' - .text - .size(28.sp) - .color(Colors.black.withOpacity(0.45)) - .make(), - Spacer(), - ], - ), - 95.w.heightBox, - Container( - width: 686.w, - height: 94.w, - margin: EdgeInsets.symmetric(horizontal: 32.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(60.w), - color: Colors.black.withOpacity(0.06), + return WillPopScope( + onWillPop: () async { + return false; + }, + child: BeeScaffold( + title: '', + bodyColor: Colors.white, + body: ListView( + children: [ + 24.w.heightBox, + Row( + children: [ + 48.w.widthBox, + '请设置您的昵称' + .text + .size(36.sp) + .bold + .color(Colors.black.withOpacity(0.65)) + .make(), + Spacer(), + ], ), - child: TextField( - onChanged: (text) async { - _nickIsRepeat = !(await SignFunc.checkNickRepeat(text)); - setState(() {}); - }, - maxLength: 20, - controller: _nickController, - decoration: InputDecoration( - isDense: false, - contentPadding: - EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w), - border: InputBorder.none, - counterText: '', - hintText: '请输入您的昵称,不超过20个字符', - hintStyle: TextStyle( - color: Colors.black.withOpacity(0.25), fontSize: 28.sp)), + 16.w.heightBox, + Row( + children: [ + 48.w.widthBox, + '昵称不可设置侮辱性词汇、特殊符号、敏感字符' + .text + .size(28.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + Spacer(), + ], ), - ), - _nickIsRepeat ? _nickRepeat() : 100.w.heightBox, - Padding( - padding: EdgeInsets.symmetric(horizontal: 24.w), - child: LoginButtonWidget( - onTap: () async { - var result = await SignFunc.setNickName(_nickController.text); - if (result) { - await UserTool.userProvider.updateUserInfo(); - await SignFunc.checkNameAndAccount(); - } + 95.w.heightBox, + Container( + width: 686.w, + height: 94.w, + margin: EdgeInsets.symmetric(horizontal: 32.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(60.w), + color: Colors.black.withOpacity(0.06), + ), + child: TextField( + onChanged: (text) async { + _nickIsRepeat = !(await SignFunc.checkNickRepeat(text)); + setState(() {}); }, - text: '确定'), - ), - ], + maxLength: 20, + controller: _nickController, + decoration: InputDecoration( + isDense: false, + contentPadding: + EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w), + border: InputBorder.none, + counterText: '', + hintText: '请输入您的昵称,不超过20个字符', + hintStyle: TextStyle( + color: Colors.black.withOpacity(0.25), + fontSize: 28.sp)), + ), + ), + _nickIsRepeat ? _nickRepeat() : 100.w.heightBox, + Padding( + padding: EdgeInsets.symmetric(horizontal: 24.w), + child: LoginButtonWidget( + onTap: () async { + var result = + await SignFunc.setNickName(_nickController.text); + if (result) { + await UserTool.userProvider.updateUserInfo(); + await SignFunc.checkNameAndAccount(); + } + }, + text: '确定'), + ), + ], + ), ), ); } diff --git a/lib/provider/user_provider.dart b/lib/provider/user_provider.dart index 01220767..f8530546 100644 --- a/lib/provider/user_provider.dart +++ b/lib/provider/user_provider.dart @@ -56,12 +56,14 @@ class UserProvider extends ChangeNotifier { if (!kIsWeb && !Platform.isMacOS) JPush().deleteAlias(); final appProvider = Provider.of(Get.context!, listen: false); appProvider.setCurrentHouse(null); - _isLogin = false; + if (_isLogin) { + NetUtil().post(SAASAPI.login.logOut, showMessage: true); + NetUtil().dio!.options.headers.remove('app-login-token'); + _isLogin = false; + } _token = null; _userInfoModel = null; _myHouses = []; - NetUtil().post(SAASAPI.login.logOut, showMessage: true); - NetUtil().dio!.options.headers.remove('app-login-token'); HiveStore.appBox!.delete('token'); HiveStore.appBox!.delete('login'); WebSocketUtil().closeWebSocket(); diff --git a/lib/ui/market/market_page.dart b/lib/ui/market/market_page.dart index cf71be51..edc5051c 100644 --- a/lib/ui/market/market_page.dart +++ b/lib/ui/market/market_page.dart @@ -54,9 +54,10 @@ class _MarketPageState extends State int _size = 10; int _pageCount = 0; double MessageHeight = 76.w; - double bannerHeight = 354.w; + double bannerHeight = 260.w; double buttonsHeight = 334.w; double searchHeight = 74.w; + double hotGoodHeight = 288.w; MarketStatisticsModel? _statistics; double tabBarHeight = 40.w; @@ -114,8 +115,6 @@ class _MarketPageState extends State _pageCount = baseListModel.total; } - bool _onLoadVisible = true; - @override void initState() { super.initState(); @@ -153,37 +152,47 @@ class _MarketPageState extends State final mediaWidth = MediaQuery.of(context).size.width; return Scaffold( - body: EasyRefresh.custom( - firstRefresh: false, - enableControlFinishLoad: false, - header: BallPulseHeader( - backgroundColor: Colors.red.withOpacity(0.8), color: Colors.white), - footer: MaterialFooter(), - topBouncing: false, - scrollController: _sliverListController, - controller: _refreshController, - onRefresh: _refresh, - onLoad: !_onLoadVisible - ? null - : () async { - _pageNum++; - await loadMarketInfo(); - print(_goodsHomeModelList.length); - if (_goodsHomeModelList.length >= _pageCount) { - _refreshController.finishLoad(noMore: true); - _onLoadVisible = false; - print(_onLoadVisible); - } - setState(() {}); - }, - slivers: _buildBody(context), + body: Stack( + children: [ + Container( + height: 530.w, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.centerLeft, + end: Alignment.centerRight, + colors: [ + Color(0xFFFFFFFF), + Color(0xFFFFF9D1), + ], + )), + ), + EasyRefresh.custom( + firstRefresh: false, + enableControlFinishLoad: false, + header: MaterialHeader(), + footer: MaterialFooter(), + topBouncing: false, + scrollController: _sliverListController, + controller: _refreshController, + onRefresh: _refresh, + onLoad: () async { + _pageNum++; + await loadMarketInfo(); + print(_goodsHomeModelList.length); + if (_goodsHomeModelList.length >= _pageCount) { + _refreshController.finishLoad(noMore: true); + } + setState(() {}); + }, + slivers: _buildBody(context), + ) + ], ), ); } Future _refresh() async { await updateMarketInfo(); - _onLoadVisible = true; //_swiperModels = await CommunityFunc.swiper(); _marketSwiperModels = await CommunityFunc.marketSwiper(); _statistics = await CommunityFunc.getMarketStatistics(); @@ -303,17 +312,16 @@ class _MarketPageState extends State return [ HomeSliverAppBar( key: _sliverAppBarGlobalKey, - actions: _actionsWidget(), - title: _buildTitle(), - backgroundColor: Colors.red, + title: geSearch(), + backgroundColor: Color(0xFFF9F9F9), expandedHeight: MessageHeight + bannerHeight + buttonsHeight + - searchHeight + + // searchHeight + tabBarHeight + + hotGoodHeight + ScreenUtil().statusBarHeight + - kToolbarHeight + - 280.w, + kToolbarHeight, //积分商城高度 // 172 * 2.w, flexibleSpace: _flexibleSpaceBar(context), @@ -361,14 +369,14 @@ class _MarketPageState extends State ); } - _actionsWidget() { + List _actionsWidget() { return [ GestureDetector( onTap: () { Get.to(() => ShopCarPage()); // 购物车 }, - child: - Image.asset(R.ASSETS_ICONS_SHOP_CAR_PNG, height: 40.w, width: 40.w), + child: Image.asset(Assets.newIcon.icGouwuc.path, + height: 48.w, width: 48.w), ), Padding( padding: EdgeInsets.only(left: 32.w, right: 32.w), @@ -378,8 +386,8 @@ class _MarketPageState extends State initIndex: 0, )); }, - child: Image.asset(R.ASSETS_ICONS_SHOP_ORDER_PNG, - height: 40.w, width: 40.w), + child: Image.asset(Assets.newIcon.icDingdan.path, + height: 48.w, width: 48.w), ), ), ]; @@ -421,15 +429,10 @@ class _MarketPageState extends State fontSize: 28.sp, color: Colors.white, ), - //textAlign: TextAlign.center, ), ]), - // Expanded( - // child: ges, - // ) ], ), - // child: ges, ), // 20.hb, @@ -449,20 +452,32 @@ class _MarketPageState extends State // color: Colors.white, child: Stack( children: [ - AnimatedHomeBackground( - key: _animatedBackgroundState, - height: 530.w, - backgroundColor: Colors.white, + // AnimatedHomeBackground( + // key: _animatedBackgroundState, + // height: 530.w, + // backgroundColor: Colors.white, + // ), + Container( + height: 265.w, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + colors: [ + Color(0xFFFFFFFF), + Color(0xFFFFF9D1), + ], + )), ), Column( children: [ Container( height: ScreenUtil().statusBarHeight + kToolbarHeight, ), - geSearch(), - 20.hb, - getNum(), + // geSearch(), 20.hb, + // getNum(), + // 20.hb, HomeSwiper(), 20.hb, _buttonTitle(), @@ -582,30 +597,37 @@ class _MarketPageState extends State } geSearch() { - return Container( - margin: EdgeInsets.symmetric(horizontal: 24.w), - child: MaterialButton( - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - height: 74.w, - shape: StadiumBorder(), - elevation: 0, - minWidth: double.infinity, - color: Color(0xFFF3F3F3), - onPressed: () { - Get.to(() => SearchGoodsPage()); - }, - child: Row( - children: [ - Icon( - Icons.search, - size: 32.w, - color: Color(0xFF666666), + return Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: GestureDetector( + onTap: () async { + Get.to(() => SearchGoodsPage()); + }, + child: Container( + height: 72.w, + margin: EdgeInsets.only(left: 32.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(36.w), + color: Colors.white), + child: Row( + children: [ + 32.wb, + Assets.home.icSearch.image( + width: 48.w, + height: 48.w, + ), + 10.wb, + '请输入关键字'.text.size(28.sp).color(ktextSubColor).make(), + ], + ), ), - 10.wb, - '请输入关键字'.text.size(28.sp).color(ktextSubColor).make().expand(), - ], + ), ), - ), + 32.wb, + ..._actionsWidget() + ], ); } @@ -710,11 +732,11 @@ class _MarketPageState extends State Widget HomeSwiper() { return Container( - padding: EdgeInsets.symmetric(horizontal: 20.w), + margin: EdgeInsets.symmetric(horizontal: 20.w), width: double.infinity, height: bannerHeight, child: AspectRatio( - aspectRatio: 355 / 177, + aspectRatio: 343 / 129, child: Swiper( key: UniqueKey(), itemBuilder: (BuildContext context, int index) { @@ -850,7 +872,7 @@ class _MarketPageState extends State mainAxisAlignment: MainAxisAlignment.center, children: [ Image.asset( - R.ASSETS_ICONS_TEST_KINGCION_PNG, + Assets.newIcon.allClasses.path, height: 88.w, width: 88.w, ), @@ -858,7 +880,7 @@ class _MarketPageState extends State Text( '全部分类', style: TextStyle(fontSize: 28.sp, color: ktextPrimary), - ) + ), ], ), ); @@ -909,13 +931,21 @@ class _MarketPageState extends State _recommend() { return Container( - height: 184.w, + height: hotGoodHeight, margin: EdgeInsets.only(left: 20.w, right: 20.w), - padding: EdgeInsets.only(top: 8.w, left: 16.w, right: 16.w), + padding: EdgeInsets.only( + top: 32.w, + left: 32.w, + right: 32.w, + ), alignment: Alignment.center, decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.circular(12.w), + gradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [Color(0xFFFFF6F6), Color(0xFFFFFFFF)]), + borderRadius: BorderRadius.circular(16.w), ), child: Column( children: [ @@ -926,7 +956,7 @@ class _MarketPageState extends State '爆款推荐', style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 28.sp, + fontSize: 32.sp, color: ktextPrimary), ), ], @@ -935,7 +965,7 @@ class _MarketPageState extends State padding: EdgeInsets.zero, physics: NeverScrollableScrollPhysics(), gridDelegate: - SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 6), + SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4), itemBuilder: (context, index) { return Row( mainAxisAlignment: MainAxisAlignment.center, @@ -969,7 +999,7 @@ class _MarketPageState extends State ], ); }, - itemCount: _goodsPopularModelList.length, + itemCount: 4, shrinkWrap: true, ), // Row( diff --git a/lib/ui/market/widget/animated_home_background.dart b/lib/ui/market/widget/animated_home_background.dart index ee6e1839..36f8c596 100644 --- a/lib/ui/market/widget/animated_home_background.dart +++ b/lib/ui/market/widget/animated_home_background.dart @@ -36,15 +36,14 @@ class AnimatedHomeBackgroundState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.vertical(bottom: Radius.circular(64)), gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, + begin: Alignment.centerLeft, + end: Alignment.centerRight, colors: [ // displayColor, // displayColor, //Color(0xFFF8F7F8), - Color(0xFFC5483A), - Color(0xFFC24739), + Color(0xFFFFFFFF), Color(0xFFFFF9D1), ], ), ), diff --git a/lib/ui/profile/new_house/my_house_page.dart b/lib/ui/profile/new_house/my_house_page.dart index d28a838f..86907a74 100644 --- a/lib/ui/profile/new_house/my_house_page.dart +++ b/lib/ui/profile/new_house/my_house_page.dart @@ -123,7 +123,7 @@ class _MyHousePageState extends State { 8.w.heightBox, Row( children: [ - '${model.buildingName}${model.unitName}${model.estateName}' + '${model.buildingName}栋${model.unitName}单元${model.estateName}' .text .size(36.sp) .color(Colors.black.withOpacity(0.85))