From fedce0238148983bf0be2d685cee973620dc0569 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Wed, 12 May 2021 10:26:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E5=9F=8E=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/icons/category.png | Bin 0 -> 1444 bytes assets/icons/second_hand.png | Bin 0 -> 772 bytes lib/const/resource.dart | 7 +++++ lib/ui/market/goods/goods_card.dart | 5 ++- lib/ui/market/goods/goods_detail_page.dart | 2 +- lib/ui/market/market_page.dart | 29 +++++++++++++++--- .../market/second_hand/second_hand_page.dart | 27 ++++++++++++++++ 7 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 assets/icons/category.png create mode 100644 assets/icons/second_hand.png create mode 100644 lib/ui/market/second_hand/second_hand_page.dart diff --git a/assets/icons/category.png b/assets/icons/category.png new file mode 100644 index 0000000000000000000000000000000000000000..151c089902d4ab99e7a4ec4fb5645e7065d1d6c0 GIT binary patch literal 1444 zcmb_c_g4}K0LIgDa3Gg6#MSVXmV4pIQKY43A(dyAlG;Bn~VGm)@x;&r|FK zMM4D}Y3M2DtEU;Fl9;P=?-bWlIr<-Z?;G#?e*ND2vTu61fs~+10001V&HakE)Un^F za9pbJU~9hA6ryakeBi-@V*tQ0 z__Zr8x3DrR&ST?h{U~wk!f&6K;))TGzkF3iTBM{h zUeh0sq$egXieEz5?RSdvOW#J`-Ekb{F24j3+b3zGlMV4Chq%(_p2E>DIjMX3@|SsD zL$d#5EssjZLpxEdPOLR>q}aO;g$bu*_*W_=3EmV4h+GYO1Zay@66Q&};fArv zP<244P2VaB_gs`D{wNc^mortiY4H_ex=QhB(^d^)5!QAz`<*b5g!Z%}y(ec=L-S#4 z555FDp{WQ|ogi-Ap>v2=O8ndLTnJ~(kww`sG zifWL=I|t6mtm)5D)I6AQin6Gd)Qnt=)&1~!0sqFfaMAu0Wh@}zW& zZCdBM&Ip0#tH!#&T+YM_GzGP1Dp5ME$^8sRkrE<&D;Or{OF#>89| z0r{j=Gi57c+pubw>GV4hbY=^w9;7z=@IEmW9`}o5$h49j(Pda0FuFYu7SdcUX; zF5H^XKWuPKhqx-}OT``8Z5-R1ot!aMR8o!xw)E<2*n{17WZQN%*3`=Olr@b&Pu3h688)`|LGz1v69o$NqFyu7(M1?DB4f_1Bb#&HmDA^5_cO6A(F}rE8 zM@L44FiQ7kgYnqUFCs0`eXsT8Js7$$bOANBPj1~YqT#>&PVI=VArUx($$X|q)>iZ( z`bDm>HBQDp>-$4QhS~v1V*Fc%9_I{(zM@sClL&e(*Y~$DEP&+u6|PWRoq_+A-3TZR zZB?O;o{K~SA5B0kcIp(f1N}(;8ctnc{@Lapf_57c%pf)m<~cO6V1jfbzV(fdyG3*N zf)w@*3sRQFMqA`R-iUpCjdX944Ckrl!^PgUsDiqUz_&F#TT;f7U$WzI`tVVEQhxtN&7v*C9um^UV5s4YY49^3|Dm8|B!0EBme*a literal 0 HcmV?d00001 diff --git a/assets/icons/second_hand.png b/assets/icons/second_hand.png new file mode 100644 index 0000000000000000000000000000000000000000..090b58f3b8cc845a7bb556ccf6e6fa9a30333961 GIT binary patch literal 772 zcmeAS@N?(olHy`uVBq!ia0vp^6+m3X!3HE}{1@EF4W-}%1FUDs=Cx-<9PE#IW)8;>6h@4KP*=-&D*xAT|Y zv|^jn`=D#r|J#v&4!`7Bzh?K{I@y!m|IVwG3+|q*5U3?s;bM;sFp2a#NitmJcW__DLx*PWS*YBk(};nF`0Ow2-ky&i0P zRP_47jX5DP&o$)3xD==f# zsm`n2cTUgN3z6e1HQZ}_Z0GyzHy>+Ug?C%O)cni(d{_R?@3ouldG^X|J865?_Ovb6 qJas Get.to(() => GoodsDetailPage(id: item.id)), + onPressed: () => Get.to( + () => GoodsDetailPage(id: item.id), + preventDuplicates: false, + ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/ui/market/goods/goods_detail_page.dart b/lib/ui/market/goods/goods_detail_page.dart index 526ef1f5..039ffcdb 100644 --- a/lib/ui/market/goods/goods_detail_page.dart +++ b/lib/ui/market/goods/goods_detail_page.dart @@ -180,7 +180,7 @@ class _GoodsDetailPageState extends State { decoration: BoxDecoration( color: Color(0x80000000), borderRadius: BorderRadius.circular(40.w)), - child: '${_currentIndex + 1}/3' + child: '${_currentIndex + 1}/${imgList.length}' .text .size(24.sp) .color(Colors.white) diff --git a/lib/ui/market/market_page.dart b/lib/ui/market/market_page.dart index a078163b..d942cb72 100644 --- a/lib/ui/market/market_page.dart +++ b/lib/ui/market/market_page.dart @@ -1,5 +1,6 @@ // import 'package:aku_community/base/base_style.dart'; +import 'package:aku_community/ui/market/second_hand/second_hand_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -67,6 +68,26 @@ class _MarketPageState extends State ), title: '商城', actions: [ + MaterialButton( + minWidth: 108.w, + padding: EdgeInsets.zero, + onPressed: () async { + Get.to(() => SecondHandPage()); + }, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + children: [ + Image.asset( + R.ASSETS_ICONS_SECOND_HAND_PNG, + width: 48.w, + height: 48.w, + ), + 4.hb, + '二手'.text.size(20.sp).black.make(), + ], + ), + ), MaterialButton( minWidth: 108.w, padding: EdgeInsets.zero, @@ -81,10 +102,10 @@ class _MarketPageState extends State mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.max, children: [ - Icon( - Icons.grid_view, - color: Color(0xFF333333), - size: 48.w, + Image.asset( + R.ASSETS_ICONS_CATEGORY_PNG, + width: 48.w, + height: 48.w, ), 4.hb, '分类'.text.size(20.sp).black.make(), diff --git a/lib/ui/market/second_hand/second_hand_page.dart b/lib/ui/market/second_hand/second_hand_page.dart new file mode 100644 index 00000000..802bd08f --- /dev/null +++ b/lib/ui/market/second_hand/second_hand_page.dart @@ -0,0 +1,27 @@ +import 'package:aku_community/widget/bee_scaffold.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SecondHandPage extends StatefulWidget { + SecondHandPage({Key? key}) : super(key: key); + + @override + _SecondHandPageState createState() => _SecondHandPageState(); +} + +class _SecondHandPageState extends State { + @override + Widget build(BuildContext context) { + return BeeScaffold( + title: '二手市场', + actions: [ + IconButton( + icon: Icon( + CupertinoIcons.add_circled, + ), + onPressed: () {}, + ), + ], + ); + } +}