From 878df42af8e2266c3943ca31118d3da563d93ffe Mon Sep 17 00:00:00 2001 From: fmk Date: Thu, 29 Jul 2021 17:58:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI=EF=BC=8C=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/icon_system_message.png | Bin 0 -> 1924 bytes assets/image/2x/icon_system_order.png | Bin 0 -> 371 bytes assets/image/2x/icon_system_recharge.png | Bin 0 -> 1334 bytes assets/image/3x/icon_system_message.png | Bin 0 -> 3670 bytes assets/image/3x/icon_system_order.png | Bin 0 -> 643 bytes assets/image/3x/icon_system_recharge.png | Bin 0 -> 2469 bytes assets/image/icon_system_message.png | Bin 0 -> 849 bytes assets/image/icon_system_order.png | Bin 0 -> 188 bytes assets/image/icon_system_recharge.png | Bin 0 -> 525 bytes lib/generated/intl/messages_en.dart | 11 + lib/generated/intl/messages_zh_CN.dart | 11 + lib/generated/intl/messages_zh_Hans_CN.dart | 11 + lib/generated/intl/messages_zh_Hant_CN.dart | 13 +- lib/generated/intl/messages_zh_TW.dart | 13 +- lib/generated/l10n.dart | 110 +++ lib/home/main_home_page.dart | 17 +- lib/home/points_mall_page.dart | 78 +- lib/l10n/intl_en.arb | 12 + lib/l10n/intl_zh_CN.arb | 12 + lib/l10n/intl_zh_Hans_CN.arb | 13 +- lib/l10n/intl_zh_Hant_CN.arb | 14 + lib/l10n/intl_zh_TW.arb | 12 + lib/main.dart | 2 +- lib/message/main_message_page.dart | 213 +++--- lib/message/mine_message.dart | 53 +- lib/message/real_time_info_page.dart | 2 +- lib/message/system_message.dart | 260 +++++-- lib/mine/coupons_page.dart | 10 +- lib/mine/mine_wallet_page.dart | 1 + lib/mine/roll_center_page.dart | 10 +- lib/mine/user_info_page.dart | 8 +- lib/mine/vip_detail_page.dart | 2 +- lib/order/exchange_history_page.dart | 2 +- lib/order/write_off_page.dart | 5 + lib/retrofit/data/exchange_order.dart | 3 + lib/retrofit/data/goods_category.dart | 86 +++ lib/retrofit/data/message.dart | 101 +++ lib/retrofit/retrofit_api.dart | 13 + lib/retrofit/retrofit_api.g.dart | 763 -------------------- lib/union/union_details_page.dart | 60 +- lib/utils/flutter_utils.dart | 2 +- lib/utils/font_weight.dart | 17 + lib/view_widget/message_item.dart | 139 ++-- lib/view_widget/mine_vip_view.dart | 2 + lib/view_widget/new_coupon_widget.dart | 75 +- pubspec.lock | 330 +++++---- pubspec.yaml | 2 +- 47 files changed, 1229 insertions(+), 1259 deletions(-) create mode 100644 assets/image/2x/icon_system_message.png create mode 100644 assets/image/2x/icon_system_order.png create mode 100644 assets/image/2x/icon_system_recharge.png create mode 100644 assets/image/3x/icon_system_message.png create mode 100644 assets/image/3x/icon_system_order.png create mode 100644 assets/image/3x/icon_system_recharge.png create mode 100644 assets/image/icon_system_message.png create mode 100644 assets/image/icon_system_order.png create mode 100644 assets/image/icon_system_recharge.png create mode 100644 lib/retrofit/data/goods_category.dart create mode 100644 lib/retrofit/data/message.dart delete mode 100644 lib/retrofit/retrofit_api.g.dart create mode 100644 lib/utils/font_weight.dart diff --git a/assets/image/2x/icon_system_message.png b/assets/image/2x/icon_system_message.png new file mode 100644 index 0000000000000000000000000000000000000000..117a9241d710d5c659d1d919440cbaa568cf3b37 GIT binary patch literal 1924 zcmbW2=RX^Y9>yh9+Mu!Qa1khX)J+v$3)9n3@<`o)P&Uo##Ar z|EwFTY-}KNQ$xK6A}VMK3|}5F)?p zd<(ss7b;23JPxT99n)Ouy*d3PiMTG>5#n*VwTREaHOq{(0Z;fyO>1P~nxy=Kmyf=b z;Rcs+gKNaWvRYki5kibR zU^Omd7F6^uycdL#U5)m(4z8?1vsXRed5!(#_}c3_s_;JQ-$%Sx4tv^Wx{|XQZQLx< zE1SZt9e)J_ybt2SLC^}GLcfwqi?(7tMlIrJ^$}^nVJ+tl0>J-1K~dhKcj--{i(Xni zR8UM&jr$?EJBi(H^}SB;cX;#pUXC6tcbw~JZRlz>Oz8q25MYawk^QA2FvhS<))i)J zinZEvxP216hI(mr99aZLF<8!QTqsunW2+GK|54!sD461#P&Q{FGFk>J_j*?uc8X=T z9Ed4rZY(%(lXLOc8CnL)mBAd)0q7f{Y}?bA0ove?dLTZJkZ$(2h8B zhm--~HVFQNO8@y@;M;Wp`s^HH%@T;@Dz_;S${Cdb`V%Wm(jvSpk{=Iq(1;ju`ckx& z`_+0&e}icYc4Wd~R40l4h6ux-b1AYdd9p*@FHRUF)q>cVf@Orx=ua zpaDHMghcNCVy^Lh#^{WEcf@dI03I7bqj7nIoB*0!!P$dZx2vGAkvXoNRvU-<4bD}& znSfIWOB8x{;1w86=%t=tTTNgVhWThW+$ry5=m{L&x^;Wva?|js&r9oDTx=+eHeymg)WdWSdagbIC!v|PbF?5AK!iiL; z!Wp3QLpZVYIn|u6M!_yMo7rr9fhPFODJ&hLni3=4f&~jiAbURNuZvgS+6gCm%!BrZ z2+vjoS}(bVY@Ba)&b{Z#Xqh#tbzYd&pc*Pzb4#?l&aCFgi~OM{ z(Yake$#GjxrsIlY{meSX`fn0X+-FKh2$-2*bM&vDq5sYEqSLmzSGEaUb?4`9NVt#H zg*Gl+b@Lh2CqSFtlCqg$#$2>(Av>-k2e9z+4Vz9Km5fDXZcWF~qISmXc;A_l^TtKSPN+9I7 zLPCWvZtpE=U%pYiX+qRSVu4mcCH*JW*;Z{)Q9odL<7npb;*?$2CQ>ff%?KKg%fl^V zrV0>991{mWJ2QlreB$vLQ)F9^k|p8y<$-iWFK*=7+gF*wBl<7Y`I}NM4iOO=Csn)Y z0O78Z&Yq6);a~zrdt$nsM=!r+d$HkoI6;)RQHq3i-SR3rt%jM>}#6_8!m}s?WXsG_86_& zj#z$tljWiBZl=0Pv>p2d?XR>)e^9Dxvuy+>HtpCaV?&PHi8G;N3UB*BcOmSFiX`J}wE(gUgor?jHs`fgXWR+`aB;c#k7*^MG@# zM>@K=D{yg-n!k{*WfLH3CSoY~pA_v~h&VcYaiZCGr|nA{wx+~@&70qg5xB1h@05w3 zS6|WKge~q3D0-2#>RqTz==*Jt*5SkeuBB7OwS^c`gHv;O&7_DRz@7sg-ifPQ>zCqY z&P~}>p)yxoCaVuf6~9X=fO7y<4$eVv;nmdyjX((-iJ8RtihN~5ht8(ED#&7w2k*Oo z&^;(W$^?IF>tX_tYyw=o3Bp?cD{~-7p9lIfG?*Np!}=${E-9$X!y=$9tXj5mR+NWK zna!Obr*R^u$bb02%OdG_Y6)(oym=*RQjNn1E3tT?>68ALamxB;tD9U6SU*oZ`D|U; NOpWdte$Yof`vqfN3H;hYcfcKpRN(Jgs0S>75zvejFQ0w`w!j=XN^5Hz2;dJuTUxwi+y&@M zNoWYHfC;bxX27{5z)xu%U^{aRL!ae@b-+Dp4lFndA=afI$S{kh%wkzZzom1R}+MOHbZHP9Ud% zJD|Nr%@4780zSk(#KIm>U2npgMPaIQs`wv}4)N>v&NqHeK>Hqu=$69NezjwlS%B?L3Sc^5 zizvMvFjJKH6L=t2ejNA&_zRc^SOeGr*b$g5>;DEG2CfBe0lsSsrY(S}fMbCp0mDW4 z2T)m+xC!{GixM*c+XVbpfWMXBfh&Qdf$v8Pq%D9;fdjMo^HJI`_yCv@SORz-_;~~c zrUsS-tXv;puWuvQMetlD``;F^Tet5Lwpb0e@9U|#G8=shj` zCNOWTufpa;krja#0FB_9pSmGv1K>Ac`XpfO-aCM8fkT0dfc1epfjNMCQabgBXPpe3 z7B9RVKqmArm7)Sz8CWybsw0Lr04#q>^P2+T5a8mhStTK+6%|A2aNxrHHjLf@EDEy% zzgAj48Y64~Jl0PSj0B*BkX6M0Er-f7DX9x4@vq49#q!)_cJ0m$B?k_`o?v6r?bdv& zR8e-(JijYSnxOWHMY7f~d2T!bm=jveCRN06IRdz#q1dXxy-CjU%3RvG5$gl>faTK! zeFHeFk&IfsPIf!Dbzd>|r60Qi&om4$PylvcIgn-Y@@@&&ct3N>q+wU{r-1^nB%TC3 z0i4kAfJyygls4u~<|0-yllLg#b-*T8WS{`7^->BeOHW(VMksm2`Y6)81ORPRp2OFUYJ=r~=yR9Dn6-BNN z->JLsB%CqHM^0;BhWA*Gi`aeF%b&T`QQA-mdA>8ie83mk)mnd8!swuI`fg|X-g9NN zQt{7#1*(rM$#&`Gf!Dfi)&{_XfSi5Tgo}Gi7wn`?WO}Hk&&Id!l`}G^6n#9moGnK> zKQF9QA0-s$43q7f2eh;ne+1aD+I5{gUoGKPUUjNMhM;sgOO3;v#(ZbO z+o?@N0XQ3M4&2{ZZ!^3bFciHzT6;8;Se;Cx1zXlhpB)9a%r%HysP3e$vp)#buqtwE z2Kf5Cr2uE+6*AzMTOYPjXe=IZf356{yKgFwVPWz)%NDVgADj`?(b9pwu2TCX`OPgE zsg%N-idHgK0OgS5fK$UJUjb}rUQ~4w`H|IZ>n!qy&K@$-RZPdtdIjL--hmn}HXbXB zq2lmvJlA6NvI+^(%PjAP{9gcLmVN;6aPz_`%rJ6Dx2c&Y=Y%e(sH3L$sD_c1%(bPX zk2`>(!2H1R2?=lNYSB9qHwm5;yf4x(4>XmL+t|5xk4G$%Cc1Y%eU-@tpsz}H+H445 sV5T17prHqb9_Y~m!w~AxfIWZyAJwuPK-w2DzyJUM07*qoM6N<$f}UY-umAu6 literal 0 HcmV?d00001 diff --git a/assets/image/3x/icon_system_message.png b/assets/image/3x/icon_system_message.png new file mode 100644 index 0000000000000000000000000000000000000000..1d02c78ecaf707a2ae78b4c23afc4f2285deb6da GIT binary patch literal 3670 zcmc(i*HaUW(#8`KAOwK`(n5=LLXjp_O6XXSPNak`y$XVq5L%>b1Pm=y0To1)-ir~G zW7kva8@w-?7-fLch3RQ21fry+UmzSsymE77ymG9tgE9wF z#GrdVa$jTz0tXc9-}b`Iy~hTr$5;lz_bvKkxxKzqAtA_h(&ziR5iPW+VfFCp<@}S5 zXz{kqh{ENANR@-OnLlf(`lZYvnaOK6>^dGYh*tj;IQ3z_^ntp`;sKjmR^!^MVQjex z^*3Jo#m$X4*d{=zZmcxJfit(|8a|`lg~Yz@1wuvUBjp^4S6Ek%?(%^3$3CTM3p?KX zT7hF!WlWEERHun27q$CCf>lXHEr3KX7lsZwS7+aStIL^e#RZRO&F%hy!oa|dj<73U zV#kljT^RSi2r>vI<8yuld&YkXR;ui`+>n!ZNTu>)9L^s16~fo0|0rI-6^V8m>(H>f z`?$&^nwsf^K$2C|^<5kdnKstrK;K=R_?Gz4ar9*g@Sv<_0jn6T$0A|s8f?6|@!HlH zOQ%S+b$OrRsew5zGV;aS@LgBVx$3LsE9OON)wOJcM0-Z z->Ssn5+td|vz`m2T}jAV;Q(ou1laiY;wWCO!p9$QPsH-A@?`&)ZHeawFrt9leVf3YF^}oOy5`M{krQ^wpK(O!$-?RwdoyJWjYg+ddmk+oa zw49q_(Pb4nsZyD$+XAY`2|dG-6}7_b@(4-Oo5dk{5rkA%6Smdj8mnz`O_t7REjHUnw-QknU(i?kntI6+pCXHz}m0Z)L3PQX68e;C8-74 z0%3FEVMsB18MYRZ$NNwA=+H=Rugh4jG-sU0ukT6XBkyIKLf+7TZph;+-)Zz6XQ+Wg zG*>j42xp574UKiNWm=T22Y0^<`KgmF`jP%FtAyK=gi!Q|d_gjxXQ-Pxqtv{q*vbA& zUp?qWFycCo{WcNfLg3_)l2PA0rXJL6Vt215)n*!1ezgX}NO|}l{81Gtd<xe{M%5bWoz zupjJUwVz!n)WS>u)Ti!EhA-g+=0z?8$@`*nT2I`~EvZI&YQ;GYC6wM=S@!C16hf5> zAH(yf-I^TnV6SkQC-`@XK2bF74XC3;P?0!&C-x^kaWVn&-{60KH@*FF#aT3`1eM8(74D0KS^cdk!Hp7Lzv)8<} zx+8j~m%YSQ{yTy`hq|Jv`0Y!fI*N-?4|p=~ccXIHhVt3pp$M^;VznPbngtb#>md8cg zW4YX>@cXPLOAfSk2SGnB)*2C6xez7L?8`rx_RwaFwnNNCup!?lj(=l+Z&vwj(b=m~E64 z%vHqdM3)XC@tuyOCGHjHR?xbv}ZLCK3nQP6h{0ID0qQ<%JR zk7>I->i!wH{Fm+U`Fw&O<+lbj&bDtyQ!wDE;vJol-_Fcd=n5!EJARl!{fbA2Q{-~r zwof0b=F4gmpQp!^_m?ni9qQ_{t80%Ia~MI?g~|^m1b90C)U)o8xCIin4x(|$7J3R>Ax~(0t zcW%uoGU2~d{YMZ3aD-gXJZG2nal4p0};3b~pQxtQv;RDQ54L z3_{l}< z`u%nIWBDRFSBANx8WTzOv$k~nM2L1ix%vof`kcdfI@cdrXJK4Px{;eHFrz>nUvI6p zdI{pos5sA=|3HyGTJ7(ZY9eu`yFx0su13%NTX|3m1?PEUU9>eGvVMA$awtR-4w{?abs!4tEZ-^x?#(@IUme+)?r=JU{w*47-`KAULk@B5!Q;aHcmr&Vc zZsVL{*0A{Hqf?0n*DRHwiHQxF)OuL2s~rEFK>Ioyb^qs7o8?qOEiAlF<^g( zS*wcwP;Mn4WwInwDp(|fE_G)OYB8?*%HYZ86t1+6*DcU{qMomE8$Mf(TO@@{dF@@? zoLYr4Zj!*XXBp76aM4ALp{L1MXThT(Ci`i6>fz33F)^vjzu#PwKvE?F;H3w73C}QR zC6U&uFa=w#2?3S?7STTgi$BqBA#8KkkLff{Jv+rT`E`Z$0E)OX>U5O3aiv?7NGZu*W+jYHv<2Kr(h}%Gv z_Gs0WG9(|z5hqRjJ}e7UR17c##va#|mIaWEM~)C)C)Fy5Ta44|zeYrr;hzl{Q8mQQ z1x|Y%z}Q*41w!(aM|f;P5+)KT&dqz9TN6G`zq^06Oa}4%Mfrl_?lo=E`ex5193(}` zO$#lVqY9_QoA&EO$sh&jfP5V#tT}RsF=huNt5H<$cv|e1?hN>XxtOyCo(gLch3Z@2 zraONgXmn>!yMd=q61MVO)_1;ZHqSc;E*bm^2Ztn}bL;B_j10C`yo9H_%+#)m@NPO} zoT?BxzFenEth-~5l^A*~N5XNAs{Gc2>0aX-K_lqoQdbcPq{qc72-SOZz8aGwCj_b zB1l`>&2suGNV_a1W59uodZq$4Ui~t>c2YBnxj$tE86Pe&9Wu=+RX|ozH~o| zuz#MvLg$SwEEceS(;gbH=*2i&RhOkNJj?x3ny%hW${toRLx`9(RGRvto>4VfO_dq# z?etA~WjM=DE`7co%rTJcW6iLnvNGQFFN*&^f~Rjee#ACojvEzY@Sor?-xa5DrRfXK z@~a$l!KKZi5)BmqdzORnNTjL)-6=05T<({Gt7BlV{B=*`{1f99HbK- zKsTX`Fl6d)XgFQgL1TAWX%f-^+A_D+6U1kMl^iAbl4!%!g$5@e?5C!>j4>Nm&A^kS-M^A{$ku-Rb2u;#|Lkl-!w@ol|8C^W z3H}>__=gd3tK&<;644*?K1rh4P&1EOClE+Wo3~`e!JFwtKtQ$`7lHyF?9hW|4|S9{ dzFMBqW&yd=A3FW&yZ9FYMta7&)!L4+{|5$Cyj=hQ literal 0 HcmV?d00001 diff --git a/assets/image/3x/icon_system_order.png b/assets/image/3x/icon_system_order.png new file mode 100644 index 0000000000000000000000000000000000000000..5d536deab79530a05e36954d3f0c3382ad64faa9 GIT binary patch literal 643 zcmV-}0(||6P)@di|chUf@#IGb!X*?aDu znTyN6<>t=Zng4t?410(0jIz`aG&ebD$pEo5XpH2c7Z+MCO06X-6*gOtN;U%oCV-0 z*RNHeGhi~_Je1i6@R}QplU*;c8OtlUJO`$7eOm zQ&d!eDzU%PgVy5M-&YYS!R>SWMPa+;9q56m>=*oKZ`tOrfW>&mr(2$CLy%=qd;wO0oo>}>J2aJDDcOcy{Hq~? zG$?9N%&71$6PHGqefMHRm)O3e2UV1R(yav2B%Oq$@Pc1KkPdMs7E#B569VZVc|st) zicsQVS1+@a5J|5?*>>FeT3aXS`et4-atTzTf0Wene_kenM39Yq5hQ{{kWB#*WYbSQ dNCepk`T!BHpGmE>c3%Jh002ovPDHLkV1nFx8o~eo literal 0 HcmV?d00001 diff --git a/assets/image/3x/icon_system_recharge.png b/assets/image/3x/icon_system_recharge.png new file mode 100644 index 0000000000000000000000000000000000000000..04579a679f6f7dd4eb73cf843397629744882259 GIT binary patch literal 2469 zcmV;W30n4vP) z1&B1;5e4A$;_e9{?k>dL-Cc>h5O)tGd2!2yKgsi z!Q=n`nd$C(Pgk8fRdwGXnQbWohs^jaM_>kMg@?=l%>Yd!k=cW051Kt_8UnKiO~Y^I zpxJ|F51NL+KJ}oZB{^Y|GbOoXl8YrdX_Dh7IZ~3}B>82M&n0<(lFugjd6M5J`OmH* zGPwC(bI=)*Tr|l=>c7(^Is6Vb46IKk`Dl`l6>xvs!F7{=vKIgyImzXd+&am*lAIvP zQIl-)?0=SbeLu;olDs_0uO_3gn zzpvD0|54YUBFV)I+_O~p9c6HzzbAQfl9wgyJrz_j10ImC6+%3xrDb7pgCu9J(ECx64<&hL65uU*foDu|-6S#~4*GGD z_a%96cO7|ffh3oy7lreHBHV6N65%ib$l~dglhk4#o8-wALj8h-gb+Myd5`aGfUbE< zlG`U4OWU%a>rOwA1HVr4yd;mTm(revuUzwjBqvJpuOxR*@{Enp*)Y}i&w65#d)5bl zx>}OI3>I_ZB(E(o=qo_*m}7R~z>98M`~)}~y=szIl-Ibfg%%zXYBqnfO83M4-#N)s z>vsg^DVKQZQtYON*w>QqB6gJ|?-+TSR1Y9z`qLyp{a%twmjnQm&AvU!Jqn~-mUjpp zMo~YvJnq^Z-+eX7*+J8{h1`Zse$8rS(B3HdCLI8QMaiZ3g74NSAhBuqk-;FnM+tP ze1fE9LuAivoF~bS-|9BTTOM7Z>0@DZ&IJYRfdQx|XsJgp?a>pMPb zzu`I0tdx(>Xdz|HYZiFMfdNS9T{FoGi$Cl~rn_-@QZE+i9lGU?Nq*67T*`h<-N(m( z#xZwF@`r;C(D{?xx6(E-*^HLKKQA7nV87{w z)l&j~Z@o~|_Rxl1+om?m#D1H7`P0aynM|W%Hvr@rms+5f*Ismakvoel>vMZ5T@PnxUA>wz}+)6>pV}>0*6H%E=DprLzZ|aw{4nTnUVR;)O*1+$R zgQQ@L#QS`H!%g|e0;d9G()pMqcd67&(aJ1iQ-=1u)-;oeRNz8%89?+6V2zksm@XP6 zlK?WB{*b@(Fta++Vk4UhkcXbP+8C;Kjrb?kB3n~_(Zc#vy$T>?+W=a&QL0@VL~~ye zE7Zt=Rcl#z&usvN2zd}-nEJ>_7zZpnG=PXrKWP-iZ9=PHWjX;mkxrl?S8dyGtZ)I@ zl2~l2T_?dr#c{rkZ5sf!hs!|p24bd%G_kzRMJG52%ZHSP@ps{Az-U9NbNwDt!AuPK zLMD2S81_6p}b_#c|xA?x)PIarJ)8O z+DZrlmuEhF!QlqiQ0RD2sC(f`8oCJJlWm(GtfRV77m7{nv79OHvf#e+F z7-2fP#|utdAu4m}K5C_oc^_{j8}yLcGlU?(oC(^R?FK*==TruMp^K0);|0b$)c080 z#Wy_A?@eF*W_TvrcQO@mh+}x5-*^G|i~8QG?G`{5X~W1?rfLPPY^7eKRh({J$28n{ z+12X+L%UW;dl@`vhzfOy@13aMTFUlaBU zAb{8)jv)wdQRLcyA_-LG#>hMa`3fb9xRoXV{d7%Aa1Ee#-S!fowi(Z)T{OAQQC0r3 zb?_>r?Q{p7)i>q-F9B+sYE{0G5T)#YU+9gF(Z+aFh14P?y{jM{79KR*kPN47LNJ=O zlL+c4tqj#Tfw>jYw+WK_0iaFRy=T|V0Ih&}251IoS~SicG<(qOLDLYJJ!l$!GY8Ec jG<(oA1ZEGKhTs1HLNP374%kDb00000NkvXXu0mjfa+|0` literal 0 HcmV?d00001 diff --git a/assets/image/icon_system_message.png b/assets/image/icon_system_message.png new file mode 100644 index 0000000000000000000000000000000000000000..e11399f1a61a2fdc520d4012229d60049a82c74b GIT binary patch literal 849 zcmV-X1FrmuP)Urv^sA=Z|&p>>m=IhLo)YRxAe581qdO~Ka9V(*3AfMf_Q1t3Oer%CC(v-rHUz$DJUSj@Sms1X-|P_&hk z?PI-+hFyk>bPfO!UN0w^7K7F7QSl%Gs zpa@PwsDn2OA6`Yrc;AMJ-_Q&j5(YTn6^m^DIG7k3s~{VPl_+^!$2?#^TUQiplfu=? zX$4%O`ExDcJ={W#HaS-ZdwQY*pd znyd?Wv#Ax_t%c~E=tq{%UgQQQA+NOzU6TW}plKQIkyfo}oQ~l{w+Ix3W zIvJ!sV#v29Af_P?9~VDqY+0wk)Eb=^l!CBY84mjHgUmk;Q8$lZZfTx*z+3|(RV1jd zb6HCXN+S*=c@lE}~-|nC-OxZFyt7hI-#?yEmH*vJa8rU zBpQa4xbU=|7A);ZP!Cx1EFdtm0reJsJ3oVWUuKc%y$3n|@!%P9*L*eGnOb4@77=a? z-p3E}r}lwY>%oz4i+oW!wmbPUYxA>~l4xNt6d|dgOj4y`Scy_5ZZH2F2=z-z?w^1t z=Rln6u15FN^R>pQ@qJp$n#Qeau_6nsMY*b`S;MShH3MuU*hr{HLhlY`^zPV8?+zCA b?dbLw8P>6y_ojM(00000NkvXXu0mjfmTiVZ literal 0 HcmV?d00001 diff --git a/assets/image/icon_system_order.png b/assets/image/icon_system_order.png new file mode 100644 index 0000000000000000000000000000000000000000..5342cb3e4df26c590f12530dfef51d5f8101d61a GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj&7LlfAs*guuWl4=au8^F*srJ3 z==A1b2baf+lO1e5ZyKFc4(h2qFWkg7eNK)|_2+N*Ym29z2~Dkw-^pfvr;t;rCiy_| zYJbJ33yEA(F&`adO@Dm&Tvt{dBs?YcgVX0!apR~t9g`;bxqMr<;`olnZ|UJvY~O4; mUTUzkKlN$d%;THcMYWmBv?MRJD9Qny!{F)a=d#Wzp$P!^s7jmw literal 0 HcmV?d00001 diff --git a/assets/image/icon_system_recharge.png b/assets/image/icon_system_recharge.png new file mode 100644 index 0000000000000000000000000000000000000000..5617d7de65c2571d10899a2bcaf5e5bc0e3720bf GIT binary patch literal 525 zcmV+o0`mQdP)JfmqJ3htXyIil1ryf8gHJN=Y2J+`EUNu?SH=K_B&6VQC@YUY~R=b%)myh$9#;# zBV54+ycjOc!=j} zo?>fdG(~`qXu=!x<35(+0iLI!GuVcin25KSg-=5vMSx%Y>97D?O7E|x!IfylxxD|0 zS6GJE)d0eQ9&Era9LLl&6wf1~fPJYIunL`7>?m&3A@;c#kNvofqqPEN;}&`mX}FlV z-jQht@7r;`R={)&;9UZaWZxf4z#K%B(F9f1;9KT;HFl#JQTWPrDuD;ni3NCHrpR{@ zT8Q-YVR;^k)I7$GybndM!4%v?L!~1{Z5my(4@)qZEgOXl)dpZ^rY1NsI-&*vJycd` z@!d(xOGSUk{V+b`a;kh%j)~Y?su>jli0EQeY{HiGa53uhdJ)dzUUt&=e+|7d|AUx0 zC-4jhQdBW}qVOTUXx+k91`vlQq}aA&aw backgroundColor: Color(0xFFFAFAFA), elevation: 0, toolbarOpacity: 0, - toolbarHeight: 50, + toolbarHeight: 50.h, automaticallyImplyLeading: false, actions: [ Container( - margin: EdgeInsets.only(right: 17), + margin: EdgeInsets.only(right: 17.w), child: GestureDetector( onTap: () { - Navigator.of(context).pushNamed("/router/msg_page"); + // Navigator.of(context).pushNamed("/router/msg_page"); + Navigator.of(context).pushNamed('/router/system_msg_page'); }, child: Image.asset( "assets/image/icon_notices.png", - width: 24, - height: 24, + width: 24.w, + height: 24.h, ), ), ) @@ -75,15 +76,15 @@ class _MainHomePage extends State isScrollable: true, indicatorWeight: 2, indicatorColor: Color(0xFF39B54A), - labelPadding: EdgeInsets.only(left: 8, right: 8), + labelPadding: EdgeInsets.only(left: 8.w, right: 8.w), indicatorSize: TabBarIndicatorSize.label, unselectedLabelStyle: TextStyle( - fontSize: 16, + fontSize: 16.sp, fontWeight: FontWeight.normal, ), labelStyle: TextStyle( color: Colors.black, - fontSize: 17, + fontSize: 17.sp, fontWeight: FontWeight.bold, ), labelColor: Colors.black, diff --git a/lib/home/points_mall_page.dart b/lib/home/points_mall_page.dart index b8ea20cc..d7f70f9b 100644 --- a/lib/home/points_mall_page.dart +++ b/lib/home/points_mall_page.dart @@ -10,6 +10,7 @@ import 'package:huixiang/main.dart'; import 'package:huixiang/retrofit/data/banner.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/goods.dart'; +import 'package:huixiang/retrofit/data/goods_category.dart'; import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; @@ -38,8 +39,8 @@ class _PointsMallPage extends State var _itemText = S.current.morenpaixu; ApiService client; - RefreshController _refreshController = - RefreshController(initialRefresh: false, initialLoadStatus: LoadStatus.canLoading); + RefreshController _refreshController = RefreshController( + initialRefresh: false, initialLoadStatus: LoadStatus.canLoading); List sortString = [ S.current.morenpaixu, // S.current.duihuanlianggaodaodi, @@ -73,7 +74,8 @@ class _PointsMallPage extends State refreshUserInfo() { SharedPreferences.getInstance().then((value) => { client = ApiService(Dio(), - context: context, token: value.getString('token')), + context: context, token: value.getString('token'), showLoading: false), + SmartDialog.showLoading(msg: S.current.zhengzaijiazai), creditGoods(categoryId), queryUser(), }); @@ -87,7 +89,8 @@ class _PointsMallPage extends State //是否降序排列 bool orderDesc = true; PageInfo page; - List gooods = []; + List goods = []; + List gooodsCategorys = []; UserInfo userinfo; List bannerData = []; @@ -115,6 +118,25 @@ class _PointsMallPage extends State } creditGoods(categoryId) async { + BaseData dataCategory = await client.goodsCategory({ + "current": 1, + "map": {}, + "model": {"pageNum": 1, "pageSize": 20, "searchKey": ""}, + "order": "descending", + "size": 20, + "sort": "id" + }).catchError((onError) { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + }); + + if (dataCategory != null && dataCategory.isSuccess) { + PageInfo pageInfo = PageInfo.fromJson(dataCategory.data); + gooodsCategorys.clear(); + gooodsCategorys.add(GoodsCategory(name: S.of(context).quanbu)); + gooodsCategorys.addAll(pageInfo.records.map((e) => GoodsCategory.fromJson(e)).toList()); + } + var param = { "categoryId": categoryId ?? "", "orderDesc": orderDesc, @@ -123,13 +145,17 @@ class _PointsMallPage extends State "pageSize": 10, "state": 1 }; - BaseData baseData = await client.creditGoods(param); + BaseData baseData = await client.creditGoods(param).catchError((onError) { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + }); + SmartDialog.dismiss(); if (baseData != null && baseData.isSuccess) { page = PageInfo.fromJson(baseData.data); if (pageNum == 1) { - gooods.clear(); + goods.clear(); } - gooods.addAll(page.list.map((e) => Goods.fromJson(e))); + goods.addAll(page.list.map((e) => Goods.fromJson(e))); setState(() { _refreshController.refreshCompleted(); _refreshController.loadComplete(); @@ -145,10 +171,11 @@ class _PointsMallPage extends State } } - int categoryId; + String categoryId; _refresh() { pageNum = 1; + SmartDialog.showLoading(msg: S.current.zhengzaijiazai); creditGoods(categoryId); queryUser(); } @@ -174,6 +201,7 @@ class _PointsMallPage extends State controller: _refreshController, onRefresh: _refresh, onLoading: () { + SmartDialog.showLoading(msg: S.current.zhengzaijiazai); creditGoods(categoryId); }, child: SingleChildScrollView( @@ -194,7 +222,8 @@ class _PointsMallPage extends State Container( alignment: Alignment.centerLeft, child: DefaultTabController( - length: 4, + length: gooodsCategorys == null + ? 0 : gooodsCategorys.length, child: TabBar( isScrollable: true, //可滚动 @@ -211,14 +240,13 @@ class _PointsMallPage extends State unselectedLabelColor: Color(0xff4D4D4D), indicatorSize: TabBarIndicatorSize.label, //指示器与文字等宽 - tabs: [ - Tab(text: S.current.quanbu), - Tab(text: S.current.yinshi), - Tab(text: S.current.shenghuoyule), - Tab(text: S.current.bangong), - ], + tabs: gooodsCategorys == null + ? [] + : gooodsCategorys + .map((e) => Tab(text: e.name)) + .toList(), onTap: (index) { - categoryId = index == 0 ? null : index; + categoryId = gooodsCategorys[index].id; pageNum = 1; creditGoods(categoryId); }, @@ -226,7 +254,7 @@ class _PointsMallPage extends State ), ), GridView.builder( - itemCount: gooods.length, + itemCount: goods == null ? 0 : goods.length, padding: EdgeInsets.only( left: 16.w, right: 16.w, top: 16.h, bottom: 16.h), shrinkWrap: true, @@ -239,14 +267,15 @@ class _PointsMallPage extends State //垂直子Widget之间间距 mainAxisSpacing: 16.w, //子Widget宽高比例 0.59 - childAspectRatio: 166.w / (281.h / 2 + (281.h / 2) * AppUtils.textScale(context)), + childAspectRatio: 166.w / + (281.h / 2 + (281.h / 2) * AppUtils.textScale(context)), ), itemBuilder: (contetx, index) { return GestureDetector( onTap: () { _toDetails(index); }, - child: buildItem(gooods[index]), + child: buildItem(goods[index]), ); }) ], @@ -258,7 +287,7 @@ class _PointsMallPage extends State _toDetails(index) async { await Navigator.of(context).pushNamed('/router/integral_store_page', - arguments: {"goodsId": gooods[index].id}); + arguments: {"goodsId": goods[index].id}); SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); String token = sharedPreferences.getString("token"); if (token != null) queryUser(); @@ -288,6 +317,7 @@ class _PointsMallPage extends State orderDesc = false; break; } + SmartDialog.showLoading(msg: S.current.zhengzaijiazai); creditGoods(categoryId); setState(() { _itemText = item; @@ -328,7 +358,11 @@ class _PointsMallPage extends State ), Expanded( child: Container( - margin: EdgeInsets.only(left: 12.w, right: 12.w, top: 10.h,), + margin: EdgeInsets.only( + left: 12.w, + right: 12.w, + top: 10.h, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, @@ -541,7 +575,7 @@ class _PointsMallPage extends State bannerClick(bannerData[position]); }, child: Container( - margin: EdgeInsets.only(bottom: 40), + margin: EdgeInsets.only(bottom: 40.h), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(8))), child: MImage( diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 9988653e..ea5c30fb 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -393,6 +393,18 @@ "jifenbuzu": "您的积分不足", "haowu": "好物", "huixiangtoutiao": "回乡头条", + "shangyidengji": "上一等级", + "bodadianhua": "拨打电话", + "genghuantouxiang": "更换头像", + "paizhao": "拍照", + "xiangce": "相册", + "xianxiashiyong": "线下使用", + "duihuanquan": "兑换券", + "quhexiao": "去核销", + "biaojiweiyidu": "标为已读", + "xitongtongzhi": "系统通知", + "dingdanxiaoxi": "订单消息", + "chongzhixiaoxi": "充值消息", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index 89a2d283..7c29030d 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -394,6 +394,18 @@ "jifenbuzu": "您的积分不足", "haowu": "好物", "huixiangtoutiao": "回乡头条", + "shangyidengji": "上一等级", + "bodadianhua": "拨打电话", + "genghuantouxiang": "更换头像", + "paizhao": "拍照", + "xiangce": "相册", + "xianxiashiyong": "线下使用", + "duihuanquan": "兑换券", + "quhexiao": "去核销", + "biaojiweiyidu": "标为已读", + "xitongtongzhi": "系统通知", + "dingdanxiaoxi": "订单消息", + "chongzhixiaoxi": "充值消息", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 3d1b41a6..d86e093c 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -392,9 +392,20 @@ "bangong": "办公", "fenxiangdao": "分享到", "jifenbuzu": "您的积分不足", - "haowu": "好物", "huixiangtoutiao": "回乡头条", + "shangyidengji": "上一等级", + "bodadianhua": "拨打电话", + "genghuantouxiang": "更换头像", + "paizhao": "拍照", + "xiangce": "相册", + "xianxiashiyong": "线下使用", + "duihuanquan": "兑换券", + "quhexiao": "去核销", + "biaojiweiyidu": "标为已读", + "xitongtongzhi": "系统通知", + "dingdanxiaoxi": "订单消息", + "chongzhixiaoxi": "充值消息", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index 77394321..fa83fc0a 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -386,6 +386,20 @@ "jifenbuzu": "您的積分不足", "haowu": "好物", "huixiangtoutiao": "回鄉頭條", + "shangyidengji": "上一等級", + "bodadianhua": "撥打電話", + "genghuantouxiang": "更换头像", + "paizhao": "拍照", + "xiangce": "相冊", + "xianxiashiyong": "線下使用", + "duihuanquan": "兌換券", + "quhexiao": "去核銷", + "biaojiweiyidu": "標為已讀", + "xitongtongzhi": "系統通知", + "dingdanxiaoxi": "订单消息", + "chongzhixiaoxi": "充值消息", + "dingdanxiaoxi": "訂單消息", + "chongzhixiaoxi": "充值消息", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index 77394321..92690486 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -386,6 +386,18 @@ "jifenbuzu": "您的積分不足", "haowu": "好物", "huixiangtoutiao": "回鄉頭條", + "shangyidengji": "上一等級", + "bodadianhua": "撥打電話", + "genghuantouxiang": "更換頭像", + "paizhao": "拍照", + "xiangce": "相冊", + "xianxiashiyong": "線下使用", + "duihuanquan": "兌換券", + "quhexiao": "去核銷", + "biaojiweiyidu": "標為已讀", + "xitongtongzhi": "系統通知", + "dingdanxiaoxi": "訂單消息", + "chongzhixiaoxi": "充值消息", diff --git a/lib/main.dart b/lib/main.dart index 7662fd00..2a122316 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -225,7 +225,7 @@ Map routers = { '/router/mine_vip_level_page': (context, {arguments}) => MineVipLevelPage(arguments:arguments), '/router/exchange_history_page': (context, {arguments}) => ExchangeHistoryPage(), - '/router/write_off_page': (context, {arguments}) => WriteOffPage(), + '/router/write_off_page': (context, {arguments}) => WriteOffPage(arguments:arguments), '/router/write_off_success_page': (context, {arguments}) => WriteOffSuccessPage(), '/router/order_history_page': (context, {arguments}) => OrderHistoryPage(), diff --git a/lib/message/main_message_page.dart b/lib/message/main_message_page.dart index e86719df..fc107078 100644 --- a/lib/message/main_message_page.dart +++ b/lib/message/main_message_page.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/message/mine_message.dart'; -import 'package:huixiang/message/real_time_info_page.dart'; -import 'package:huixiang/view_widget/my_tab.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/round_button.dart'; class MainMessagePage extends StatefulWidget { @@ -26,114 +26,123 @@ class _MainMessagePage extends State @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Color(0xFFFFFFFF), - appBar: AppBar( backgroundColor: Color(0xFFFFFFFF), - elevation: 0, - centerTitle: false, - leading: GestureDetector( - onTap: () { - Navigator.of(context).pop(); - }, - child: Container( - alignment: Alignment.centerRight, - margin: EdgeInsets.only(left: 10), - padding: EdgeInsets.all(6), - child: Icon( - Icons.arrow_back_ios, - color: Colors.black, - size: 24, + appBar: AppBar( + backgroundColor: Color(0xFFFFFFFF), + elevation: 0, + centerTitle: false, + leading: GestureDetector( + onTap: () { + Navigator.of(context).pop(); + }, + child: Container( + alignment: Alignment.centerRight, + margin: EdgeInsets.only(left: 10), + padding: EdgeInsets.all(6), + child: Icon( + Icons.arrow_back_ios, + color: Colors.black, + size: 24, + ), ), ), + titleSpacing: 2, + leadingWidth: 56, + automaticallyImplyLeading: true, + actions: [rightAction()], + title: Text( + S.of(context).xiaoxi, + style: TextStyle(color: Colors.black), + ), + // bottom: PreferredSize( + // preferredSize: Size(double.infinity, 38), + // child: TabBar( + // controller: tabcontroller, + // isScrollable: true, + // indicatorWeight: 2, + // indicatorColor: Color(0xFF39B54A), + // labelPadding: EdgeInsets.only(left: 25, right: 25), + // indicatorPadding: EdgeInsets.only(left: 25, right: 25, top: 3), + // unselectedLabelStyle: + // TextStyle(fontSize: 16, fontWeight: FontWeight.normal), + // labelStyle: TextStyle( + // color: Colors.black, + // fontSize: 16, + // fontWeight: FontWeight.bold), + // labelColor: Colors.black, + // tabs: [ + // MyTab(text: S.of(context).huodongzixun), + // MyTab( + // text: S.of(context).wodexiaoxi, + // ), + // ]), + // ), ), - titleSpacing: 2, - leadingWidth: 56, - automaticallyImplyLeading: true, - actions: [rightAction()], - title: Text( - S.of(context).xiaoxi, - style: TextStyle(color: Colors.black), - ), - bottom: PreferredSize( - preferredSize: Size(double.infinity, 38), - child: TabBar( - controller: tabcontroller, - isScrollable: true, - indicatorWeight: 2, - indicatorColor: Color(0xFF39B54A), - labelPadding: EdgeInsets.only(left: 25, right: 25), - indicatorPadding: EdgeInsets.only(left: 25, right: 25, top: 3), - unselectedLabelStyle: - TextStyle(fontSize: 16, fontWeight: FontWeight.normal), - labelStyle: TextStyle( - color: Colors.black, - fontSize: 16, - fontWeight: FontWeight.bold), - labelColor: Colors.black, - tabs: [ - MyTab(text: S.of(context).huodongzixun), - MyTab( - text: S.of(context).wodexiaoxi, - ), - ]), - ), - ), - body: TabBarView( - children: [ - RealTimeInfoPage(), - MineMessagePage(_status, (status) { - setState(() { - _bgStatus = status; - }); - }) - ], - controller: tabcontroller, - ), - ); + body: MineMessagePage(_status), + // TabBarView( + // children: [ + // RealTimeInfoPage(), + // MineMessagePage(_status, (status) { + // setState(() { + // _bgStatus = status; + // }); + // }) + // ], + // controller: tabcontroller, + // ), + ); } var _status = 0; - var _bgStatus = false; Widget rightAction() { - if (_status == 0) { - return Container( - margin: EdgeInsets.only(right: 17), - child: GestureDetector( - onTap: () { - setState(() { - _status = (_status + 1) % 2; - }); - }, - child: Image.asset( - "assets/image/icon_delete.png", - width: 24, - height: 24, - ), - ), - ); - } else { - return GestureDetector( - onTap: () { - setState(() { - _status = (_status + 1) % 2; - }); - }, - child: Container( - margin: EdgeInsets.only(right: 17), - padding: EdgeInsets.only(top: 15, bottom: 15), - alignment: Alignment.center, - child: RoundButton( - text: S.of(context).wancheng, - textColor: _bgStatus ? Colors.white : Color(0xFFA0A0A0), - backgroup: _bgStatus ? Color(0xFF32A060) : Color(0xFFD8D8D8), - fontSize: 14, - fontWeight: FontWeight.bold, - padding: EdgeInsets.only(left: 12, right: 12, top: 2, bottom: 2), - radius: 12, - ), - ), - ); - } + return Text( + S.of(context).biaojiweiyidu, + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF353535), + ), + ); + + // if (_status == 0) { + // return Container( + // margin: EdgeInsets.only(right: 17), + // child: GestureDetector( + // onTap: () { + // setState(() { + // _status = (_status + 1) % 2; + // }); + // }, + // child: Image.asset( + // "assets/image/icon_delete.png", + // width: 24, + // height: 24, + // ), + // ), + // ); + // } else { + // return GestureDetector( + // onTap: () { + // setState(() { + // _status = (_status + 1) % 2; + // }); + // }, + // child: Container( + // margin: EdgeInsets.only(right: 17), + // padding: EdgeInsets.only(top: 15, bottom: 15), + // alignment: Alignment.center, + // child: RoundButton( + // text: S.of(context).wancheng, + // textColor: _bgStatus ? Colors.white : Color(0xFFA0A0A0), + // backgroup: _bgStatus ? Color(0xFF32A060) : Color(0xFFD8D8D8), + // fontSize: 14, + // fontWeight: FontWeight.bold, + // padding: EdgeInsets.only(left: 12, right: 12, top: 2, bottom: 2), + // radius: 12, + // ), + // ), + // ); + // } } } diff --git a/lib/message/mine_message.dart b/lib/message/mine_message.dart index 695d1e7e..7e05ac7d 100644 --- a/lib/message/mine_message.dart +++ b/lib/message/mine_message.dart @@ -2,63 +2,55 @@ import 'dart:collection'; import 'package:flutter/material.dart'; import 'package:huixiang/view_widget/message_item.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; class MineMessagePage extends StatefulWidget { final int status; - final Function(bool) onChanged; - MineMessagePage(this.status, this.onChanged); + + MineMessagePage(this.status); @override State createState() { return _MineMessagePage(); } - } class _MineMessagePage extends State { - Map map; - - @override - void initState() { - super.initState(); - map = HashMap(); - } @override Widget build(BuildContext context) { return SingleChildScrollView( + physics: BouncingScrollPhysics(), child: Container( margin: EdgeInsets.only( - left: 16, - right: 16, - top: 32, + left: 16.w, + right: 16.w, + top: 22.h, ), - padding: EdgeInsets.only(top: 16, bottom: 16), + padding: EdgeInsets.only(top: 16.h, bottom: 16.h), decoration: BoxDecoration( color: Colors.white, boxShadow: [ BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0) + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) ], - borderRadius: BorderRadius.all(Radius.circular(8))), + borderRadius: BorderRadius.circular(8.w)), child: ListView.builder( - itemCount: 12, + itemCount: 1, shrinkWrap: true, physics: new NeverScrollableScrollPhysics(), itemBuilder: (context, position) { return Container( - margin: EdgeInsets.only(top: 12, bottom: 12), + margin: EdgeInsets.only(top: 12.h, bottom: 12.h), child: GestureDetector( onTap: () { Navigator.of(context).pushNamed('/router/system_msg_page'); }, - child: MessageItem(widget.status, (check) { - map[position] = check; - refreshStatus(); - }), + child: MessageItem(widget.status), ), ); }), @@ -66,15 +58,4 @@ class _MineMessagePage extends State { ); } - refreshStatus() { - var isOneCheck = false; - map.forEach((key, value) { - if (value) { - isOneCheck = true; - } - }); - if (widget.onChanged != null) { - widget.onChanged.call(isOneCheck); - } - } } diff --git a/lib/message/real_time_info_page.dart b/lib/message/real_time_info_page.dart index bcacf07f..8cd4b578 100644 --- a/lib/message/real_time_info_page.dart +++ b/lib/message/real_time_info_page.dart @@ -29,7 +29,7 @@ class _RealTimeInfoPage extends State { spreadRadius: 0) ], borderRadius: BorderRadius.all(Radius.circular(8))), - child: MessageItem(0, null), + child: MessageItem(0), ); }), ); diff --git a/lib/message/system_message.dart b/lib/message/system_message.dart index 2aa321fe..98d82217 100644 --- a/lib/message/system_message.dart +++ b/lib/message/system_message.dart @@ -1,5 +1,17 @@ +import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; +import 'package:huixiang/retrofit/data/base_data.dart'; +import 'package:huixiang/retrofit/data/message.dart'; +import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/classic_header.dart'; +import 'package:huixiang/view_widget/my_appbar.dart'; +import 'package:huixiang/view_widget/my_footer.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; class SystemMessagePage extends StatefulWidget { @override @@ -9,65 +21,124 @@ class SystemMessagePage extends StatefulWidget { } class _SystemMessagePage extends State { + ApiService apiService; + + @override + void initState() { + super.initState(); + + SharedPreferences.getInstance().then((value) { + apiService = + ApiService(Dio(), token: value.getString("token"), context: context); + queryMessage(); + }); + } + + int pageNum = 1; + List messages = []; + + _refresh() { + pageNum = 1; + queryMessage(); + } + + queryMessage() async { + BaseData baseData = await apiService.msgList({ + "pageNum": pageNum, + "pageSize": 10, + "searchKey": "", + "state": "", + "typed": "" + }).catchError((onError) { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + }); + + if (baseData != null && baseData.isSuccess) { + PageInfo pageInfo = PageInfo.fromJson(baseData.data); + if (pageNum == 1) { + messages.clear(); + } + messages.addAll(pageInfo.list.map((e) => Message.fromJson(e)).toList()); + _refreshController.loadComplete(); + _refreshController.refreshCompleted(); + if (mounted) + setState(() {}); + if (pageNum * 10 > int.tryParse(pageInfo.total)) { + _refreshController.loadNoData(); + } else { + pageNum += 1; + } + } else { + _refreshController.loadFailed(); + _refreshController.refreshFailed(); + } + } + + RefreshController _refreshController = RefreshController(); + + @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text( - S.of(context).xitongxiaoxi, - style: TextStyle(color: Colors.black), - ), - centerTitle: false, - backgroundColor: Color(0xFFF7F7F7), - elevation: 0, - leading: GestureDetector( - onTap: () { - Navigator.of(context).pop(); + appBar: MyAppBar( + background: Color(0xFFF7F7F7), + leadingColor: Colors.black, + title: S.of(context).xitongxiaoxi, + titleSize: 18.sp, + titleColor: Colors.black, + ), + body: SmartRefresher( + enablePullDown: true, + enablePullUp: true, + header: MyHeader(), + physics: BouncingScrollPhysics(), + footer: CustomFooter( + loadStyle: LoadStyle.ShowWhenLoading, + builder: (BuildContext context, LoadStatus mode) { + return MyFooter(mode); }, - child: Container( - alignment: Alignment.centerRight, - margin: EdgeInsets.only(left: 10), - padding: EdgeInsets.all(6), - child: Icon( - Icons.arrow_back_ios, - color: Colors.black, - size: 24, - ), - ), ), - titleSpacing: 2, - leadingWidth: 56, - ), - body: Container( - margin: EdgeInsets.only(top: 16), + controller: _refreshController, + onRefresh: _refresh, + onLoading: () { + queryMessage(); + }, child: ListView.builder( - itemCount: 3, + padding: EdgeInsets.only(top: 16), + itemCount: messages.length, + physics: NeverScrollableScrollPhysics(), itemBuilder: (context, position) { return GestureDetector( onTap: () { - Navigator.of(context).pushNamed('/router/exchange_order_details'); + if (messages[position].typed == 2) { + Navigator.of(context) + .pushNamed('/router/exchange_order_details'); + } }, - child: buildMessageItem(), + child: buildMessageItem(messages[position]), ); }), ), ); } - Widget buildMessageItem() { + Widget buildMessageItem(Message message) { return Container( - margin: EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 8), - padding: EdgeInsets.all(20), + margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 8.h, bottom: 8.h), + padding: EdgeInsets.all(20.w), decoration: BoxDecoration( - color: Colors.white, - boxShadow: [ - BoxShadow( - color: Colors.black.withAlpha(12), - offset: Offset(0, 3), - blurRadius: 14, - spreadRadius: 0) - ], - borderRadius: BorderRadius.all(Radius.circular(8))), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withAlpha(12), + offset: Offset(0, 3), + blurRadius: 14, + spreadRadius: 0, + ) + ], + borderRadius: BorderRadius.circular(8), + ), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, @@ -79,55 +150,96 @@ class _SystemMessagePage extends State { Row( children: [ Image.asset( - "assets/image/icon_system_notices.png", - width: 24, - height: 24, + (message.typed == 1) + ? "assets/image/icon_system_notices.png" + : (message.typed == 2) + ? "assets/image/icon_system_order.png" + : "assets/image/icon_system_recharge.png", + width: 24.w, + height: 24.h, ), SizedBox( - width: 4, + width: 4.w, ), Text( - S.of(context).xitongtongzhi, + (message.typed == 1) + ? S.of(context).xitongtongzhi + : (message.typed == 2) + ? S.of(context).dingdanxiaoxi + : S.of(context).chongzhixiaoxi, style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.bold, - color: Color(0xFF060606)), + fontSize: 14.sp, + fontWeight: FontWeight.bold, + color: Color(0xFF060606), + ), ) ], ), Text( - "2021.03.08 13:22", - style: TextStyle(fontSize: 10, color: Color(0xFFA29E9E)), + message.updateTime, + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), ), ], ), - Container( - margin: EdgeInsets.only(left: 28, top: 12), - child: Text( - S.of(context).ninyouyigexindedingdan, - style: TextStyle(fontSize: 10, color: Color(0xFF353535)), + if (message.typed != 3) + Container( + margin: EdgeInsets.only(left: 28.w, top: 12.h), + child: Text( + S.of(context).ninyouyigexindedingdan, + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFF353535), + ), + ), + ) + else + Container( + margin: EdgeInsets.only(left: 28.w, top: 18.h), + child: Text( + message.title, + style: TextStyle( + fontSize: 20.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF353535), + ), + ), ), - ), - Container( - margin: EdgeInsets.only(left: 28, top: 22), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - S.of(context).chakangengduo, - style: TextStyle( - fontSize: 12, + if (message.typed != 3) + Container( + margin: EdgeInsets.only(left: 28.w, top: 22.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).chakangengduo, + style: TextStyle( + fontSize: 12.sp, fontWeight: FontWeight.bold, - color: Color(0xFF353535)), + color: Color(0xFF353535), + ), + ), + Icon( + Icons.keyboard_arrow_right, + color: Colors.black, + ) + ], + ), + ) + else + Container( + margin: EdgeInsets.only(left: 28.w, top: 22.h), + child: Text( + message.content, + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFF353535), ), - Icon( - Icons.keyboard_arrow_right, - color: Colors.black, - ) - ], + ), ), - ) ], ), ); diff --git a/lib/mine/coupons_page.dart b/lib/mine/coupons_page.dart index 02a2fd4b..7ce8e6de 100644 --- a/lib/mine/coupons_page.dart +++ b/lib/mine/coupons_page.dart @@ -1,6 +1,7 @@ import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/coupon.dart'; @@ -169,8 +170,13 @@ class _CouponsPage extends State { if (type == 1) { receiveCoupon(coupons[position].id); } else { - //Navigator.of(context).pushNamed('/router/mine_card') - showStoreSelector(coupons[position].storeList); + if (coupons[position].bizType == 5) { + Navigator.of(context).pushNamed('/router/write_off_page',arguments: { + "couponId":coupons[position].id + }); + } else { + showStoreSelector(coupons[position].storeList); + } } }, () { setState(() { diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart index bb50e89a..a8cdb3f7 100644 --- a/lib/mine/mine_wallet_page.dart +++ b/lib/mine/mine_wallet_page.dart @@ -351,6 +351,7 @@ class _MineWalletPage extends State { queryUserBalance(); }, child: RoundButton( + width: 104.w, icons: Icon( Icons.refresh, color: Colors.white, diff --git a/lib/mine/roll_center_page.dart b/lib/mine/roll_center_page.dart index 99ed4c66..feda3be7 100644 --- a/lib/mine/roll_center_page.dart +++ b/lib/mine/roll_center_page.dart @@ -1,6 +1,7 @@ import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/coupon.dart'; @@ -142,8 +143,13 @@ class _RollCenterPage extends State { if (type == 1) { receiveCoupon(coupons[position].id); } else { - //Navigator.of(context).pushNamed('/router/mine_card') - showStoreSelector(coupons[position].storeList); + if (coupons[position].bizType == 5) { + Navigator.of(context).pushNamed('/router/write_off_page',arguments: { + "couponId":coupons[position].id + }); + } else { + showStoreSelector(coupons[position].storeList); + } } }, () { setState(() { diff --git a/lib/mine/user_info_page.dart b/lib/mine/user_info_page.dart index 8e780b9f..5c7e42b9 100644 --- a/lib/mine/user_info_page.dart +++ b/lib/mine/user_info_page.dart @@ -254,10 +254,10 @@ class _UserInfoPage extends State { context: context, builder: (contetx) { return CupertinoActionSheet( - title: Text("更换头像"), + title: Text(S.of(context).genghuantouxiang), actions: [ CupertinoActionSheetAction( - child: Text('拍照'), + child: Text(S.of(context).paizhao), onPressed: () { openCamera(); Navigator.of(context).pop(); @@ -266,7 +266,7 @@ class _UserInfoPage extends State { isDestructiveAction: false, ), CupertinoActionSheetAction( - child: Text('相册'), + child: Text(S.of(context).xiangce), onPressed: () { openStorage(); Navigator.of(context).pop(); @@ -279,7 +279,7 @@ class _UserInfoPage extends State { onPressed: () { Navigator.of(context).pop(); }, - child: Text("取消"), + child: Text(S.of(context).quxiao), isDestructiveAction: true, ), ); diff --git a/lib/mine/vip_detail_page.dart b/lib/mine/vip_detail_page.dart index d3a70abd..c420ee72 100644 --- a/lib/mine/vip_detail_page.dart +++ b/lib/mine/vip_detail_page.dart @@ -501,7 +501,7 @@ class _VipDetailPage extends State { SizedBox( height: 8.h, ), - Column( + Row( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: goodsItem( diff --git a/lib/order/exchange_history_page.dart b/lib/order/exchange_history_page.dart index 444f0623..a16c3727 100644 --- a/lib/order/exchange_history_page.dart +++ b/lib/order/exchange_history_page.dart @@ -298,7 +298,7 @@ class _ExchangeHistoryList extends State { ), Expanded( child: Text( - "武昌区凯德1818蓝调步行街(蔡明纬店旁)", + exchangeOrder.address ?? "", style: TextStyle( color: Colors.black, fontSize: 12.sp, diff --git a/lib/order/write_off_page.dart b/lib/order/write_off_page.dart index 9e8f76ac..89a11f94 100644 --- a/lib/order/write_off_page.dart +++ b/lib/order/write_off_page.dart @@ -4,6 +4,11 @@ import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/separator.dart'; class WriteOffPage extends StatefulWidget { + + final arguments; + + WriteOffPage({this.arguments}); + @override State createState() { return _WriteOffPage(); diff --git a/lib/retrofit/data/exchange_order.dart b/lib/retrofit/data/exchange_order.dart index 81d5a887..cd9fafe4 100644 --- a/lib/retrofit/data/exchange_order.dart +++ b/lib/retrofit/data/exchange_order.dart @@ -12,6 +12,7 @@ class ExchangeOrder { String mid; String orderCode; String amount; + String address; int state; int useTyped; int isDelete; @@ -27,6 +28,7 @@ class ExchangeOrder { ..mid = json['mid'] as String ..orderCode = json['orderCode'] as String ..amount = json['amount'] as String + ..address = json['address'] as String ..state = json['state'] as int ..useTyped = json['useTyped'] as int ..isDelete = json['isDelete'] as int @@ -46,6 +48,7 @@ class ExchangeOrder { 'mid': this.mid, 'orderCode': this.orderCode, 'amount': this.amount, + 'address': this.address, 'state': this.state, 'useTyped': this.useTyped, 'isDelete': this.isDelete, diff --git a/lib/retrofit/data/goods_category.dart b/lib/retrofit/data/goods_category.dart new file mode 100644 index 00000000..019b79b3 --- /dev/null +++ b/lib/retrofit/data/goods_category.dart @@ -0,0 +1,86 @@ +/// id : "1412705737469067264" +/// createTime : "2021-07-07 17:31:09" +/// createUser : "1" +/// updateTime : "2021-07-20 16:50:28" +/// updateUser : "1" +/// parentId : "0" +/// name : "饮食" +/// miniShow : 1 +/// sortOrder : 1 +/// isDelete : 0 + +class GoodsCategory { + String _id; + String _createTime; + String _createUser; + String _updateTime; + String _updateUser; + String _parentId; + String _name; + int _miniShow; + int _sortOrder; + int _isDelete; + + String get id => _id; + String get createTime => _createTime; + String get createUser => _createUser; + String get updateTime => _updateTime; + String get updateUser => _updateUser; + String get parentId => _parentId; + String get name => _name; + int get miniShow => _miniShow; + int get sortOrder => _sortOrder; + int get isDelete => _isDelete; + + GoodsCategory({ + String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String parentId, + String name, + int miniShow, + int sortOrder, + int isDelete}){ + _id = id; + _createTime = createTime; + _createUser = createUser; + _updateTime = updateTime; + _updateUser = updateUser; + _parentId = parentId; + _name = name; + _miniShow = miniShow; + _sortOrder = sortOrder; + _isDelete = isDelete; +} + + GoodsCategory.fromJson(dynamic json) { + _id = json["id"]; + _createTime = json["createTime"]; + _createUser = json["createUser"]; + _updateTime = json["updateTime"]; + _updateUser = json["updateUser"]; + _parentId = json["parentId"]; + _name = json["name"]; + _miniShow = json["miniShow"]; + _sortOrder = json["sortOrder"]; + _isDelete = json["isDelete"]; + } + + Map toJson() { + var map = {}; + map["id"] = _id; + map["createTime"] = _createTime; + map["createUser"] = _createUser; + map["updateTime"] = _updateTime; + map["updateUser"] = _updateUser; + map["parentId"] = _parentId; + map["name"] = _name; + map["miniShow"] = _miniShow; + map["sortOrder"] = _sortOrder; + map["isDelete"] = _isDelete; + return map; + } + +} \ No newline at end of file diff --git a/lib/retrofit/data/message.dart b/lib/retrofit/data/message.dart new file mode 100644 index 00000000..cc9a30d3 --- /dev/null +++ b/lib/retrofit/data/message.dart @@ -0,0 +1,101 @@ +/// id : "1420215467561189376" +/// createTime : "2021-07-28 10:58:26" +/// createUser : "0" +/// updateTime : "2021-07-28 10:58:29" +/// updateUser : "0" +/// mid : "1406879717390286848" +/// title : "充值成功" +/// content : "你于2021-07-28 10:52:02充值0.01元,当前余额:0.08元。" +/// typed : 3 +/// relational : "" +/// state : 1 +/// isDelete : 0 + +class Message { + + String _id; + String _createTime; + String _createUser; + String _updateTime; + String _updateUser; + String _mid; + String _title; + String _content; + int _typed; + String _relational; + int _state; + int _isDelete; + + String get id => _id; + String get createTime => _createTime; + String get createUser => _createUser; + String get updateTime => _updateTime; + String get updateUser => _updateUser; + String get mid => _mid; + String get title => _title; + String get content => _content; + int get typed => _typed; + String get relational => _relational; + int get state => _state; + int get isDelete => _isDelete; + + Message({ + String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String mid, + String title, + String content, + int typed, + String relational, + int state, + int isDelete}){ + _id = id; + _createTime = createTime; + _createUser = createUser; + _updateTime = updateTime; + _updateUser = updateUser; + _mid = mid; + _title = title; + _content = content; + _typed = typed; + _relational = relational; + _state = state; + _isDelete = isDelete; +} + + Message.fromJson(dynamic json) { + _id = json["id"]; + _createTime = json["createTime"]; + _createUser = json["createUser"]; + _updateTime = json["updateTime"]; + _updateUser = json["updateUser"]; + _mid = json["mid"]; + _title = json["title"]; + _content = json["content"]; + _typed = json["typed"]; + _relational = json["relational"]; + _state = json["state"]; + _isDelete = json["isDelete"]; + } + + Map toJson() { + var map = {}; + map["id"] = _id; + map["createTime"] = _createTime; + map["createUser"] = _createUser; + map["updateTime"] = _updateTime; + map["updateUser"] = _updateUser; + map["mid"] = _mid; + map["title"] = _title; + map["content"] = _content; + map["typed"] = _typed; + map["relational"] = _relational; + map["state"] = _state; + map["isDelete"] = _isDelete; + return map; + } + +} \ No newline at end of file diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index fe5c22f1..aa3e4bb5 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -147,6 +147,10 @@ abstract class ApiService { @POST("/creditGoods/list") Future creditGoods(@Body() Map param); + ///积分商城商品分類列表 + @POST("/creditGoodsCategory/page") + Future goodsCategory(@Body() Map param); + ///积分商城商品详情 @GET("/creditGoods/{id}") Future creditGoodsById(@Path("id") String id); @@ -282,4 +286,13 @@ abstract class ApiService { ///会员卡详情 @GET("/member/vipDetail/{id}") Future vipDetail(@Path("id") String id); + + ///分页查询App消息列表 + @POST("/app-msg/list") + Future msgList(@Body() Map param); + + ///App消息详情 + @GET("/app-msg/{id}") + Future queryMsg(@Path("id") String id); + } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart deleted file mode 100644 index 956d602d..00000000 --- a/lib/retrofit/retrofit_api.g.dart +++ /dev/null @@ -1,763 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'retrofit_api.dart'; - -// ************************************************************************** -// RetrofitGenerator -// ************************************************************************** - -class _ApiService implements ApiService { - _ApiService(this._dio, {this.baseUrl}) { - ArgumentError.checkNotNull(_dio, '_dio'); - baseUrl ??= 'http://platform.test.api.lotus-wallet.com/app/'; - } - - final Dio _dio; - - String baseUrl; - - @override - Future upload(data, folderId) async { - ArgumentError.checkNotNull(data, 'data'); - ArgumentError.checkNotNull(folderId, 'folderId'); - const _extra = {}; - final queryParameters = {}; - final _data = FormData(); - _data.files.add(MapEntry( - 'file', - MultipartFile.fromFileSync(data.path, - filename: data.path.split(Platform.pathSeparator).last))); - if (folderId != null) { - _data.fields.add(MapEntry('folderId', folderId.toString())); - } - final _result = await _dio.request>('/file/upload', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future searchPoi(lat, lng, keywords, size, page) async { - ArgumentError.checkNotNull(lat, 'lat'); - ArgumentError.checkNotNull(lng, 'lng'); - ArgumentError.checkNotNull(keywords, 'keywords'); - ArgumentError.checkNotNull(size, 'size'); - ArgumentError.checkNotNull(page, 'page'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request( - 'https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=$lat,$lng&keywords=$keywords&offset={size}&page={page}&extensions=all', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = _result.data; - return value; - } - - @override - Future memberLogin(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/auth/platform/memberLogin', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future sendVerify(mobile) async { - ArgumentError.checkNotNull(mobile, 'mobile'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/sendVerify/$mobile', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future creditGoods(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditGoods/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future creditGoodsById(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/creditGoods/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/info', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future editInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/member/editMemberInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future signInInfo() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/signInInfo', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future signIn() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/signIn', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future recharge(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/wallet/recharge', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future receiveCoupon(couponId) async { - ArgumentError.checkNotNull(couponId, 'couponId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/coupon/receive?couponId=$couponId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future creditOrderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditOrder/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future creditOrder(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/creditOrder/create', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future addAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/add', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future deleteAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/delete', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryAddress(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/address/detail/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryMemberAddress() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/address/queryMemberAddress', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future updateAddress(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/address/update', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryCoupon(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/coupon/centreList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryCard(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/coupon/packageList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryStore(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/store/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future informationList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future informationInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/information/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future creditOrderReceive(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/receive/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryHome() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/home', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryStoreInfo(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/store/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryArticle(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/information/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryBanner(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/banner/page', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryHomeBrand() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/home/brand', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future minLogin(storeId) async { - ArgumentError.checkNotNull(storeId, 'storeId'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/auth/mini/login/$storeId', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future queryBillInfo(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/member/listBill', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future rankList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/rankList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future orderList(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>('/order/list', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future orderDetail(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/order/orderDetail?id=$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future continuePay(param) async { - ArgumentError.checkNotNull(param, 'param'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - _data.addAll(param ?? {}); - final _result = await _dio.request>( - '/order/continuePay', - queryParameters: queryParameters, - options: RequestOptions( - method: 'POST', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future receiveToCard(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/creditOrder/receive/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future vipList() async { - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>('/member/vipList', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } - - @override - Future vipDetail(id) async { - ArgumentError.checkNotNull(id, 'id'); - const _extra = {}; - final queryParameters = {}; - final _data = {}; - final _result = await _dio.request>( - '/member/vipDetail/$id', - queryParameters: queryParameters, - options: RequestOptions( - method: 'GET', - headers: {}, - extra: _extra, - baseUrl: baseUrl), - data: _data); - final value = BaseData.fromJson(_result.data); - return value; - } -} diff --git a/lib/union/union_details_page.dart b/lib/union/union_details_page.dart index 3698e3d7..09cf2c7b 100644 --- a/lib/union/union_details_page.dart +++ b/lib/union/union_details_page.dart @@ -26,6 +26,7 @@ import 'package:path_provider/path_provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:url_launcher/url_launcher.dart'; class UnionDetailsPage extends StatefulWidget { final Map arguments; @@ -218,10 +219,15 @@ class _UnionDetailsPage extends State { SizedBox( width: 16.w, ), - Image.asset( - "assets/image/icon_union_call.png", - width: 24.w, - height: 24.h, + InkWell( + onTap: () { + showCallMobile(); + }, + child: Image.asset( + "assets/image/icon_union_call.png", + width: 24.w, + height: 24.h, + ), ) ], ), @@ -540,7 +546,11 @@ class _UnionDetailsPage extends State { .couponVOList[position].bizType == 1) ? "${double.tryParse(storeInfo.couponVOList[position].discountAmount).toInt()}" - : "${storeInfo.couponVOList[position].discountPercent}折", + : (storeInfo != null && + storeInfo.couponVOList != null && + storeInfo + .couponVOList[position].bizType == + 5) ? S.of(context).duihuanquan : "${storeInfo.couponVOList[position].discountPercent / 10}折", style: TextStyle( fontSize: 36.sp, color: Color(0xFFFF7A1A), @@ -1066,4 +1076,44 @@ class _UnionDetailsPage extends State { )) .toList(); } + + showCallMobile() { + + showCupertinoModalPopup( + context: context, + builder: (contetx) { + return CupertinoActionSheet( + title: Text(S.of(context).bodadianhua), + actions: [ + if (storeInfo != null && storeInfo.mobile != null && storeInfo.mobile != "") + CupertinoActionSheetAction( + child: Text(storeInfo.mobile), + onPressed: () { + callMobile(storeInfo.mobile); + Navigator.of(context).pop(); + }, + isDefaultAction: true, + isDestructiveAction: false, + ), + ], + cancelButton: CupertinoActionSheetAction( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text(S.of(context).quxiao), + isDestructiveAction: true, + ), + ); + }); + } + + callMobile(mobile) async { + String url = "tel:$mobile"; + if (await canLaunch(url)) { + await launch(url); + } else { + throw 'Could not launch $url'; + } + } + } diff --git a/lib/utils/flutter_utils.dart b/lib/utils/flutter_utils.dart index 88e9b215..7aea7957 100644 --- a/lib/utils/flutter_utils.dart +++ b/lib/utils/flutter_utils.dart @@ -10,7 +10,7 @@ class AppUtils { static double textScale(context) { double textScaleFactor = MediaQuery.of(context).textScaleFactor; print("textScaleFactor: $textScaleFactor"); - return textScaleFactor > 1.2 ? 1.2 : textScaleFactor; + return textScaleFactor > 1.15 ? 1.15 : textScaleFactor; } diff --git a/lib/utils/font_weight.dart b/lib/utils/font_weight.dart new file mode 100644 index 00000000..93a14716 --- /dev/null +++ b/lib/utils/font_weight.dart @@ -0,0 +1,17 @@ + + +import 'dart:ui'; + +class MyFontWeight { + + static const FontWeight thin = FontWeight.w100; + static const FontWeight extra_light = FontWeight.w200; + static const FontWeight light = FontWeight.w300; + static const FontWeight regular = FontWeight.w400; + static const FontWeight medium = FontWeight.w500; + static const FontWeight semi_bold = FontWeight.w600; + static const FontWeight bold = FontWeight.w700; + static const FontWeight extra_bold = FontWeight.w800; + static const FontWeight black = FontWeight.w900; + +} \ No newline at end of file diff --git a/lib/view_widget/message_item.dart b/lib/view_widget/message_item.dart index 468f16ae..39f8f82d 100644 --- a/lib/view_widget/message_item.dart +++ b/lib/view_widget/message_item.dart @@ -1,9 +1,11 @@ import 'package:flutter/material.dart'; +import 'package:huixiang/generated/l10n.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; class MessageItem extends StatefulWidget { - final Function(bool) onChanged; - final int stststatus; - MessageItem(this.stststatus, this.onChanged); + final int stStatus; + + MessageItem(this.stStatus); @override _MessageItemState createState() => _MessageItemState(); @@ -14,76 +16,82 @@ class _MessageItemState extends State { Widget build(BuildContext context) { return Row( children: [ - if (widget.stststatus != 0) checkView(), + if (widget.stStatus != 0) checkView(), Container( - margin: EdgeInsets.only(left: widget.stststatus == 0 ? 16 : 0), + margin: EdgeInsets.only(left: widget.stStatus == 0 ? 16 : 0), child: Image.network( "https://t7.baidu.com/it/u=1297102096,3476971300&fm=193&f=GIF", - width: 44, + width: 44.w, fit: BoxFit.cover, - height: 44, + height: 44.h, ), ), Expanded( - flex: 1, - child: Container( - margin: EdgeInsets.only(left: 16, right: 16), - height: 44, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceAround, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text( - "海峡姐妹", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 14, - color: Color(0xFF060606)), - ), - Text( - "2021.03.08 13:22", - style: - TextStyle(fontSize: 10, color: Color(0xFFA29E9E)), + flex: 1, + child: Container( + margin: EdgeInsets.only(left: 16, right: 16), + height: 44.h, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + S.of(context).xitongtongzhi, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 14.sp, + color: Color(0xFF060606)), + ), + Text( + "2021.03.08 13:22", + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - flex: 1, - child: Text( - "2021由她上,三八妇女节感恩回馈!三八妇女节,五一劳动节,六一儿童节", - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 10, color: Color(0xFF353535)), - )), - if (widget.stststatus == 0) - Container( - width: 10, - height: 10, - alignment: Alignment.center, - margin: EdgeInsets.only(left: 17), - decoration: BoxDecoration( - color: Colors.red, - borderRadius: - BorderRadius.all(Radius.circular(5))), - child: Text( - "1", - style: TextStyle( - fontSize: 7, color: Color(0xFFFFFFFF)), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + flex: 1, + child: Text( + "2021由她上,三八妇女节感恩回馈!三八妇女节,五一劳动节,六一儿童节", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFF353535), + ), + )), + if (widget.stStatus == 0) + Container( + width: 10.w, + height: 10.h, + alignment: Alignment.center, + margin: EdgeInsets.only(left: 17), + decoration: BoxDecoration( + color: Colors.red, + borderRadius: BorderRadius.circular(5)), + child: Text( + "1", + style: TextStyle( + fontSize: 7, + color: Color(0xFFFFFFFF), ), - ) - ], - ), - ], - ), - )), + ), + ) + ], + ), + ], + ), + ), + ), ], ); } @@ -96,9 +104,6 @@ class _MessageItemState extends State { setState(() { _isCheck = !_isCheck; }); - if (widget.onChanged != null) { - widget.onChanged.call(_isCheck); - } }, child: Container( padding: EdgeInsets.all(16), diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart index b53c404b..70ad66fc 100644 --- a/lib/view_widget/mine_vip_view.dart +++ b/lib/view_widget/mine_vip_view.dart @@ -34,6 +34,8 @@ class MineVipView extends StatelessWidget { if (curLevel == vipLevel) { topLeft = S.of(context).dangqiandengji; + } else if(vipLevel < curLevel) { + topLeft = S.of(context).shangyidengji; } else { topLeft = S.of(context).xiayidengji; } diff --git a/lib/view_widget/new_coupon_widget.dart b/lib/view_widget/new_coupon_widget.dart index a7745e67..c0c76e09 100644 --- a/lib/view_widget/new_coupon_widget.dart +++ b/lib/view_widget/new_coupon_widget.dart @@ -256,6 +256,36 @@ class NewCouponWidget extends StatelessWidget { ), ], ); + } else if (coupon.bizType == 5) { + return Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + S.of(context).duihuanquan, + style: TextStyle( + fontSize: 25.sp, + fontWeight: FontWeight.bold, + color: Color(0xff32A060), + ), + ), + ], + ), + ), + Text( + S.of(context).xianxiashiyong, + style: TextStyle( + fontSize: 12.sp, + fontWeight: FontWeight.bold, + color: Color(0xff32A060), + ), + ), + ], + ); } else { return Column( mainAxisAlignment: MainAxisAlignment.center, @@ -269,8 +299,8 @@ class NewCouponWidget extends StatelessWidget { children: [ Text( coupon != null - ? double.tryParse("${coupon.discountPercent}" ?? "0") - .toInt() + ? double.tryParse( + "${coupon.discountPercent / 10.0}" ?? "0") .toString() : "", style: TextStyle( @@ -353,33 +383,36 @@ class NewCouponWidget extends StatelessWidget { } else { if (coupon != null && coupon.status == 1) { return Align( - alignment: Alignment.centerRight, - child: InkWell( - onTap: () { - callback(type); - }, - child: Container( - padding: EdgeInsets.fromLTRB(16.w, 2.h, 16.w, 2.h), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(10.5)), - color: Color(0xFF32A060), - ), - child: Text( - S.of(context).qushiyong, - style: TextStyle( - fontSize: 12.sp, - color: Colors.white, - ), + alignment: Alignment.centerRight, + child: InkWell( + onTap: () { + callback(type); + }, + child: Container( + padding: EdgeInsets.fromLTRB(16.w, 2.h, 16.w, 2.h), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.5), + color: Color(0xFF32A060), + ), + child: Text( + (coupon.bizType == 5) + ? S.of(context).quhexiao + : S.of(context).qushiyong, + style: TextStyle( + fontSize: 12.sp, + color: Colors.white, ), ), - )); + ), + ), + ); } else if (coupon != null && coupon.status == 2) { return Align( alignment: Alignment.centerRight, child: Container( padding: EdgeInsets.fromLTRB(16.w, 2.h, 16.w, 2.h), decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(10.5)), + borderRadius: BorderRadius.circular(10.5), // border: Border.all( // width: 1, color: Color(0xFFA0A0A0), style: BorderStyle.solid) color: Color(0xFFA0A0A0), diff --git a/pubspec.lock b/pubspec.lock index 359b99d3..880e797c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,294 +5,294 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "14.0.0" amap_flutter_base: dependency: transitive description: name: amap_flutter_base - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" amap_flutter_location: dependency: "direct main" description: name: amap_flutter_location - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" amap_flutter_map: dependency: "direct main" description: name: amap_flutter_map - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.41.2" android_intent_plus: dependency: "direct main" description: name: android_intent_plus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" args: dependency: transitive description: name: args - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" async: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" barcode: dependency: transitive description: name: barcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" barcode_widget: dependency: "direct main" description: name: barcode_widget - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" bubble_tab_indicator: dependency: "direct main" description: name: bubble_tab_indicator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6" build: dependency: transitive description: name: build - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.6.2" build_config: dependency: transitive description: name: build_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.6" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.10" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.3" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.5" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.1.10" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.3.2" built_value: dependency: transitive description: name: built_value - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "7.1.0" cached_network_image: dependency: "direct main" description: name: cached_network_image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.4" chewie: dependency: "direct main" description: name: chewie - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.2" chewie_audio: dependency: transitive description: name: chewie_audio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.3" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.7.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" convert: dependency: transitive description: name: convert - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.5" css_colors: dependency: transitive description: name: css_colors - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.1" csslib: dependency: transitive description: name: csslib - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.16.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.12" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.10" event_bus: dependency: "direct main" description: name: event_bus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" ffi: dependency: transitive description: name: ffi - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" file: dependency: transitive description: name: file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.1.2" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.10.11" flutter: @@ -304,21 +304,21 @@ packages: dependency: transitive description: name: flutter_cache_manager - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.3" flutter_html: dependency: "direct main" description: name: flutter_html - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" flutter_layout_grid: dependency: transitive description: name: flutter_layout_grid - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.10.5" flutter_localizations: @@ -330,49 +330,49 @@ packages: dependency: transitive description: name: flutter_page_indicator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.0.3" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.11" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.0.0+2" flutter_smart_dialog: dependency: "direct main" description: name: flutter_smart_dialog - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.6" flutter_staggered_grid_view: dependency: "direct main" description: name: flutter_staggered_grid_view - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.0" flutter_svg: dependency: transitive description: name: flutter_svg - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.20.0-nullsafety.3" flutter_swiper: dependency: "direct main" description: name: flutter_swiper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.6" flutter_test: @@ -389,406 +389,406 @@ packages: dependency: "direct main" description: name: fluwx - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.5.0" glob: dependency: transitive description: name: glob - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" graphs: dependency: transitive description: name: graphs - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.0" html: dependency: transitive description: name: html - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.14.0+4" http: dependency: transitive description: name: http - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.2" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.4" image_cropper: dependency: "direct main" description: name: image_cropper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.4.1" image_picker: dependency: transitive description: name: image_picker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.7+22" image_picker_gallery_camera: dependency: "direct main" description: name: image_picker_gallery_camera - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.6" import_js_library: dependency: transitive description: name: import_js_library - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" intl: dependency: "direct main" description: name: intl - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.17.0" io: dependency: transitive description: name: io - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.5" js: dependency: transitive description: name: js - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.3" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.1" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.5.1" keframe: dependency: "direct main" description: name: keframe - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" logger: dependency: "direct main" description: name: logger - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" logging: dependency: transitive description: name: logging - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" mime: dependency: transitive description: name: mime - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" package_config: dependency: transitive description: name: package_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.9.3" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.5.1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.1" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.1" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.0+2" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.0" photo_view: dependency: "direct main" description: name: photo_view - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.11.1" platform: dependency: transitive description: name: platform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" pool: dependency: transitive description: name: pool - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.0" process: dependency: transitive description: name: process - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.2.3" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.8" pull_to_refresh: dependency: "direct main" description: name: pull_to_refresh - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" qr: dependency: transitive description: name: qr - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" quiver: dependency: transitive description: name: quiver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.5" retrofit: dependency: "direct main" description: name: retrofit - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.4+1" retrofit_generator: dependency: "direct dev" description: name: retrofit_generator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.4.1+3" rxdart: dependency: "direct main" description: name: rxdart - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.26.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.6" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" sharesdk_plugin: dependency: "direct main" description: name: sharesdk_plugin - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" shelf: dependency: transitive description: name: shelf - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.9" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.4+1" sky_engine: @@ -800,84 +800,84 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.9.10+3" source_span: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" sqflite: dependency: transitive description: name: sqflite - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.2+4" sqflite_common: dependency: transitive description: name: sqflite_common - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3+3" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0+2" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" timing: dependency: transitive description: name: timing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.1+3" tpns_flutter_plugin: @@ -893,128 +893,170 @@ packages: dependency: transitive description: name: transformer_page_view - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6" tuple: dependency: transitive description: name: tuple - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.5" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" uuid: dependency: transitive description: name: uuid - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" video_player: dependency: "direct main" description: name: video_player - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.4+1" wakelock: dependency: transitive description: name: wakelock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.1+1" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.0+1" wakelock_web: dependency: transitive description: name: wakelock_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.0+3" watcher: dependency: transitive description: name: watcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" webview_flutter: dependency: transitive description: name: webview_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.7" win32: dependency: transitive description: name: win32 - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.2.5" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.0" xml: dependency: transitive description: name: xml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.2" yaml: dependency: transitive description: name: yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.13.0 <3.0.0" flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3940f6ba..fbe0374e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -72,7 +72,7 @@ dependencies: shared_preferences: ^2.0.6 flutter_smart_dialog: ^2.1.6 -# url_launcher: ^6.0.5 + url_launcher: ^6.0.5 # app_links: ^2.1.0 # crop_image: ^1.0.1 From 4bdad87eff2240c82e86b5ea60a67669e0077836 Mon Sep 17 00:00:00 2001 From: fmk Date: Thu, 29 Jul 2021 19:19:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI=EF=BC=8C=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/home/home_page.dart | 4 +- lib/login/login_page.dart | 12 +- lib/main.dart | 2 +- lib/mine/mine_wallet_page.dart | 17 +- lib/mine/recharge_page.dart | 4 +- lib/mine/vip_balance_page.dart | 117 +++++---- lib/mine/vip_detail_page.dart | 2 +- lib/union/union_details_page.dart | 7 +- lib/view_widget/item_input_widget.dart | 151 ++++------- pubspec.lock | 330 ++++++++++++++----------- pubspec.yaml | 2 +- 11 files changed, 324 insertions(+), 324 deletions(-) diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 8e6f58f5..333d3ce3 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -136,9 +136,7 @@ class _HomePage extends State with AutomaticKeepAliveClientMixin { gooods.addAll(page.list.map((e) => Goods.fromJson(e))); setState(() {}); } - Future.delayed(Duration(milliseconds: 800), () { - SmartDialog.dismiss(); - }); + SmartDialog.dismiss(); if (baseData != null && baseData.isSuccess) { refreshController.refreshCompleted(); if (mounted) setState(() {}); diff --git a/lib/login/login_page.dart b/lib/login/login_page.dart index b1c5a8ea..7c1a490c 100644 --- a/lib/login/login_page.dart +++ b/lib/login/login_page.dart @@ -16,7 +16,7 @@ import 'package:flutter/services.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:dio/dio.dart'; -// import 'package:photo_view/photo_view.dart'; +import 'package:photo_view/photo_view.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart'; @@ -393,11 +393,11 @@ class _MyLoginPageState extends State with TickerProviderStateMixin { child: Stack( alignment: Alignment.center, children: [ - // PhotoView( - // imageProvider: AssetImage("assets/image/laoban.png"), - // initialScale: Platform.isAndroid ? 1.02 : 1.2, - // basePosition: alignmentProgress, - // ), + PhotoView( + imageProvider: AssetImage("assets/image/laoban.png"), + initialScale: Platform.isAndroid ? 1.02 : 1.2, + basePosition: alignmentProgress, + ), Positioned( top: 54.h, left: 28.w, diff --git a/lib/main.dart b/lib/main.dart index 2a122316..24698b57 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -196,7 +196,7 @@ Map routers = { '/router/mine_card_invalid': (context, {arguments}) => MineCardInvalidPage(), '/router/vip_card_page': (context, {arguments}) => VipCardPage(), '/router/vip_details_page': (context, {arguments}) => VipDetailPage(arguments: arguments), - '/router/vip_balance': (context, {arguments}) => VipBalancePage(), + '/router/vip_balance': (context, {arguments}) => VipBalancePage(arguments:arguments), '/router/coupons_page': (context, {arguments}) => CouponsPage(), '/router/permission_setting': (context, {arguments}) => PermissionSettingPage(), diff --git a/lib/mine/mine_wallet_page.dart b/lib/mine/mine_wallet_page.dart index 9a77f317..b2442388 100644 --- a/lib/mine/mine_wallet_page.dart +++ b/lib/mine/mine_wallet_page.dart @@ -8,6 +8,7 @@ import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/user_bill.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/round_button.dart'; @@ -168,7 +169,7 @@ class _MineWalletPage extends State { borderRadius: BorderRadius.all(Radius.circular(8)), boxShadow: [ BoxShadow( - color: Colors.black.withAlpha(12), + color: Colors.black.withAlpha(25), offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, @@ -305,7 +306,7 @@ class _MineWalletPage extends State { borderRadius: BorderRadius.all(Radius.circular(8)), boxShadow: [ BoxShadow( - color: Colors.black.withAlpha(12), + color: Colors.black.withAlpha(25), offset: Offset(0, 3), blurRadius: 14, spreadRadius: 0, @@ -322,7 +323,7 @@ class _MineWalletPage extends State { child: Text( S.of(context).zhanghuyue, style: TextStyle( - fontWeight: FontWeight.bold, + fontWeight: MyFontWeight.medium, color: Color(0xFF353535), fontSize: 16.sp, ), @@ -358,7 +359,7 @@ class _MineWalletPage extends State { Text( "$mBalance", style: TextStyle( - fontWeight: FontWeight.w500, + fontWeight: MyFontWeight.medium, color: Color(0xFF353535), fontSize: 50.sp, ), @@ -371,6 +372,7 @@ class _MineWalletPage extends State { style: TextStyle( color: Color(0xFF20662A), fontSize: 16.sp, + fontWeight: MyFontWeight.regular ), ), SizedBox( @@ -381,15 +383,14 @@ class _MineWalletPage extends State { toRecharge(); }, child: RoundButton( - width: 103.w, - height: 30.h, + width: 104.w, text: S.of(context).lijichongzhi, textColor: Colors.white, - fontWeight: FontWeight.bold, + fontWeight: MyFontWeight.semi_bold, radius: 15, backgroup: Color(0xFF32A060), fontSize: 14.sp, - padding: EdgeInsets.fromLTRB(24.w, 5.h, 24.w, 5.h), + padding: EdgeInsets.symmetric(vertical: 5.h), ), ), ], diff --git a/lib/mine/recharge_page.dart b/lib/mine/recharge_page.dart index a905346b..02554486 100644 --- a/lib/mine/recharge_page.dart +++ b/lib/mine/recharge_page.dart @@ -79,16 +79,14 @@ class _RechargePage extends State { S.of(context).qingshuruchongzhijine, hintText: "", controller: controller, - inputType: 1, padding: EdgeInsets.all(20), - heightPercentage: 0.16.sh, errorText: S.of(context).chongzhizuixiaojine(10), titleColor: Color(0xFF727272), errorTextColor: Color(0xFF32A060), radius: 8, style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 30.sp, + fontSize: 27.sp, color: color, ), inputLimit: 12, diff --git a/lib/mine/vip_balance_page.dart b/lib/mine/vip_balance_page.dart index 1dc53fb7..0cc528e7 100644 --- a/lib/mine/vip_balance_page.dart +++ b/lib/mine/vip_balance_page.dart @@ -3,13 +3,19 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/base_data.dart'; -import 'package:huixiang/retrofit/data/coupon.dart'; import 'package:huixiang/retrofit/data/page.dart'; +import 'package:huixiang/retrofit/data/user_bill.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + class VipBalancePage extends StatefulWidget { + final arguments; + + VipBalancePage({this.arguments}); + @override State createState() { return _VipBalancePage(); @@ -26,45 +32,46 @@ class _VipBalancePage extends State { super.initState(); SharedPreferences.getInstance().then((value) => { - apiService = ApiService(Dio(), context: context, token: value.getString('token')), - queryCard(), - }); + apiService = ApiService(Dio(), + context: context, token: value.getString('token')), + queryBillInfo(), + }); _refreshController = RefreshController(initialRefresh: false); } - int pageNum = 1; - List coupons = []; - - // void _onRefresh() async { - // pageNum = 1; - // queryCard(); - // } + int current = 1; + List userBills = []; - queryCard() async { - BaseData baseData = await apiService.queryCard({ - "centre": true, - "pageNum": pageNum, - "pageSize": 10, - "searchKey": "", - "state": 3 + queryBillInfo() async { + BaseData baseData = await apiService.queryBillInfo({ + "current": current, + "model": { + "category": "", + "mid": widget.arguments["storeId"], + "title": "bill_tenant_balance", + "type": "" + }, + "order": "descending", + "size": 10, + "sort": "id" }).catchError((error) { _refreshController.loadFailed(); _refreshController.refreshFailed(); }); if (baseData != null && baseData.isSuccess) { PageInfo pageInfo = PageInfo.fromJson(baseData.data); - if (pageNum == 1) { - coupons.clear(); + if (current == 1) { + userBills.clear(); } - coupons.addAll(pageInfo.list.map((e) => Coupon.fromJson(e))); + userBills.addAll(pageInfo.records.map((e) => UserBill.fromJson(e))); setState(() { _refreshController.refreshCompleted(); _refreshController.loadComplete(); if (pageInfo.pageNum == pageInfo.pages) { _refreshController.loadNoData(); } else { - pageNum += 1; + current += 1; } }); } else { @@ -93,7 +100,7 @@ class _VipBalancePage extends State { }, child: Container( alignment: Alignment.centerRight, - margin: EdgeInsets.only(left: 10), + margin: EdgeInsets.only(left: 10.w), padding: EdgeInsets.all(6), child: Icon( Icons.arrow_back_ios, @@ -103,49 +110,47 @@ class _VipBalancePage extends State { ), ), titleSpacing: 2, - leadingWidth: 56, + leadingWidth: 56.w, ), body: Container( child: ListView.builder( itemBuilder: (context, position) { - return balanceItem(); + return balanceItem(userBills[position]); }, - itemCount: coupons.length, + itemCount: userBills.length, ), ), ); } - Widget balanceItem(){ + + Widget balanceItem(UserBill userBill) { return Container( - margin: EdgeInsets.only(left: 16,right: 16), + margin: EdgeInsets.only(left: 16.w, right: 16.w), child: Column( - // mainAxisAlignment: MainAxisAlignment.spaceAround, - // crossAxisAlignment: CrossAxisAlignment.start, children: [ - Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width: 19, - height: 19, - margin: EdgeInsets.only(left: 12, top: 12), + width: 19.w, + height: 19.h, + margin: EdgeInsets.only(left: 12.w, top: 12.h), alignment: Alignment.center, child: Image.asset( - "assets/image/icon_store_c.png", - ), + userBill.pm == 0 ? "assets/image/icon_store_c.png" : "assets/image/icon_wallet_recharge.png", + ), ), Expanded( child: Container( width: double.infinity, - margin: EdgeInsets.only(left: 6, top: 12), + margin: EdgeInsets.only(left: 6.w, top: 12.h), alignment: Alignment.centerLeft, child: Text( - "门店消费", + userBill.name, style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 16, + fontSize: 16.sp, color: Color(0xFF353535), ), ), @@ -153,41 +158,45 @@ class _VipBalancePage extends State { flex: 1, ), Padding( - padding: EdgeInsets.only(top: 12), - child: Text("-200", - style: TextStyle( - fontSize: 16, - color: Color(0xffF68034))), + padding: EdgeInsets.only(top: 12.h), + child: Text("${userBill.pm == 0 ? "-" : "+"}${userBill.number}", + style: TextStyle(fontSize: 16, color: Color(0xffF68034))), ), ], ), - SizedBox(height: 8,), + SizedBox( + height: 8.h, + ), Container( - margin: EdgeInsets.only(left: 35), - child:Row( + margin: EdgeInsets.only(left: 35.w), + child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text.rich( TextSpan(children: [ TextSpan( - text: "2021-06-19 13:03", - style: TextStyle(fontSize: 14, color: Color(0xff727272)), + text: userBill.createTime, + style: TextStyle(fontSize: 14.sp, color: Color(0xff727272),), ), ]), ), Text.rich( TextSpan(children: [ TextSpan( - text: "余额:200.00", - style: TextStyle(fontSize: 14,fontWeight: FontWeight.bold, color: Color(0xff727272)), + text: S.of(context).yue_(userBill.balance), + style: TextStyle( + fontSize: 14.sp, + fontWeight: FontWeight.bold, + color: Color(0xff727272),), ), ]), ), ], - ),), + ), + ), Container( - margin: EdgeInsets.only(left: 35,top: 12,bottom: 12), + margin: EdgeInsets.only(left: 35.w, top: 12.h, bottom: 12.h), height: 1, color: Color(0xFFF1F1F1), ), diff --git a/lib/mine/vip_detail_page.dart b/lib/mine/vip_detail_page.dart index c420ee72..cbc94084 100644 --- a/lib/mine/vip_detail_page.dart +++ b/lib/mine/vip_detail_page.dart @@ -296,7 +296,7 @@ class _VipDetailPage extends State { GestureDetector( onTap: () { Navigator.of(context) - .pushNamed('/router/vip_balance'); + .pushNamed('/router/vip_balance', arguments: {"storeId":vipCard.id}); }, child: Row( children: [ diff --git a/lib/union/union_details_page.dart b/lib/union/union_details_page.dart index 09cf2c7b..5bdf5334 100644 --- a/lib/union/union_details_page.dart +++ b/lib/union/union_details_page.dart @@ -1078,18 +1078,17 @@ class _UnionDetailsPage extends State { } showCallMobile() { - showCupertinoModalPopup( context: context, builder: (contetx) { return CupertinoActionSheet( title: Text(S.of(context).bodadianhua), actions: [ - if (storeInfo != null && storeInfo.mobile != null && storeInfo.mobile != "") + if (storeInfo != null && storeInfo.headMobile != null && storeInfo.headMobile != "") CupertinoActionSheetAction( - child: Text(storeInfo.mobile), + child: Text(storeInfo.headMobile), onPressed: () { - callMobile(storeInfo.mobile); + callMobile(storeInfo.headMobile); Navigator.of(context).pop(); }, isDefaultAction: true, diff --git a/lib/view_widget/item_input_widget.dart b/lib/view_widget/item_input_widget.dart index ec554d5e..6673b6b4 100644 --- a/lib/view_widget/item_input_widget.dart +++ b/lib/view_widget/item_input_widget.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/border_text.dart'; class ItemInputWidget extends StatelessWidget { @@ -25,8 +26,6 @@ class ItemInputWidget extends StatelessWidget { final String errorText; final Color errorTextColor; final Color titleColor; - final int inputType; - final double heightPercentage; final double radius; final EdgeInsets padding; final TextInputType textInputType; @@ -47,20 +46,18 @@ class ItemInputWidget extends StatelessWidget { this.errorText = "", this.errorTextColor = const Color(0xFFFF441A), this.titleColor = Colors.black, - this.heightPercentage, this.padding = const EdgeInsets.only(left: 20, right: 21, top: 16, bottom: 4), this.btnText, - this.inputType = 0, this.textInputFormatter, this.isShowBtn = false, }); @override Widget build(BuildContext context) { - var color = Color(0xFFA29E9E); + var color = Color(0xFFF7F7F7); if (inputState == 0) { - color = Color(0xFFA29E9E); + color = Color(0xFFF7F7F7); } else if (inputState == 1) { color = Color(0xFF37A546); } else { @@ -72,8 +69,7 @@ class ItemInputWidget extends StatelessWidget { ); return Container( - height: heightPercentage, - margin: EdgeInsets.only(left: 20, right: 20, top: 12, bottom: 4), + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 12.h, bottom: 4.h), padding: padding, decoration: BoxDecoration( boxShadow: [ @@ -98,102 +94,59 @@ class ItemInputWidget extends StatelessWidget { color: titleColor, ), ), - if (inputType == 1) - SizedBox( - height: 5, - ), + SizedBox( + height: 5.h, + ), Container( - height: inputType == 1 ? 30 : 0.03.sh, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisSize: MainAxisSize.max, + alignment: Alignment.centerLeft, + child: Stack( + alignment: Alignment.centerLeft, children: [ - Expanded( - child: Container( - alignment: Alignment.centerLeft, - child: Stack( - alignment: Alignment.centerLeft, - children: [ - if (inputType == 1) - Container( - alignment: Alignment.centerLeft, - child: Text( - "¥", - style: TextStyle( - fontWeight: FontWeight.bold, - color: style.color, - fontSize: 26.sp, - ), - ), - margin: EdgeInsets.only(left: 5), - ), - Container( - child: TextField( - controller: controller, - style: style, - onChanged: onChanged, - keyboardType: textInputType, - decoration: InputDecoration( - errorBorder: inputBorder, - focusedBorder: inputBorder, - enabledBorder: inputBorder, - hintText: hintText, - contentPadding: EdgeInsets.only( - top: 12, - bottom: 12, - left: inputType == 1 ? 22 : 0, - ), - hintStyle: TextStyle( - fontSize: 10, - color: Color(0xFFA29E9E), - ), - ), - textInputAction: TextInputAction.next, - inputFormatters: [ - LengthLimitingTextInputFormatter(inputLimit), - textInputFormatter - ], - cursorColor: Colors.grey, - maxLines: 1, - minLines: 1, - ), - ), - ], + Container( + width: 20.w, + alignment: Alignment.centerLeft, + child: Text( + "¥", + style: TextStyle( + fontWeight: MyFontWeight.medium, + color: style.color, + fontSize: 26.sp, ), ), - flex: 5, + margin: EdgeInsets.only(left: 5, bottom: 12.h), ), - if (isShowBtn ?? false) - Expanded( - flex: 3, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - InkWell( - onTap: onTap, - child: Container( - margin: EdgeInsets.only(left: 20), - child: BorderText( - text: btnText, - borderColor: btnState == 0 - ? Color(0xFF32A060) - : Color(0xFFFE951E), - borderWidth: 1, - radius: 2, - padding: EdgeInsets.only( - left: 8, right: 8, top: 4, bottom: 4), - fontSize: 10, - textColor: btnState == 0 - ? Color(0xFF32A060) - : Color(0xFFFE951E), - ), - ), - ), - ], + Container( + height: 0.035.sh, + child: TextField( + controller: controller, + style: style, + onChanged: onChanged, + keyboardType: textInputType, + decoration: InputDecoration( + errorBorder: inputBorder, + focusedBorder: inputBorder, + enabledBorder: inputBorder, + hintText: hintText, + contentPadding: EdgeInsets.only( + top: 12.h, + bottom: 12.h, + left: 24.w, + ), + hintStyle: TextStyle( + fontSize: 10.sp, + color: Color(0xFFA29E9E), + ), ), - ) + textInputAction: TextInputAction.next, + inputFormatters: [ + LengthLimitingTextInputFormatter(inputLimit), + textInputFormatter + ], + cursorColor: Colors.grey, + maxLines: 1, + minLines: 1, + ), + ), ], ), ), @@ -203,7 +156,7 @@ class ItemInputWidget extends StatelessWidget { errorText ?? "", style: TextStyle( color: errorTextColor, - fontSize: 12, + fontSize: 12.sp, ), ), ) diff --git a/pubspec.lock b/pubspec.lock index 359b99d3..880e797c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,294 +5,294 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "14.0.0" amap_flutter_base: dependency: transitive description: name: amap_flutter_base - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" amap_flutter_location: dependency: "direct main" description: name: amap_flutter_location - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" amap_flutter_map: dependency: "direct main" description: name: amap_flutter_map - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.41.2" android_intent_plus: dependency: "direct main" description: name: android_intent_plus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" args: dependency: transitive description: name: args - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" async: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.6.1" barcode: dependency: transitive description: name: barcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" barcode_widget: dependency: "direct main" description: name: barcode_widget - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" bubble_tab_indicator: dependency: "direct main" description: name: bubble_tab_indicator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6" build: dependency: transitive description: name: build - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.6.2" build_config: dependency: transitive description: name: build_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.6" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.10" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.3" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.5" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.1.10" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.3.2" built_value: dependency: transitive description: name: built_value - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "7.1.0" cached_network_image: dependency: "direct main" description: name: cached_network_image - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.4" chewie: dependency: "direct main" description: name: chewie - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.2" chewie_audio: dependency: transitive description: name: chewie_audio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.3" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.7.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" convert: dependency: transitive description: name: convert - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.1" crypto: dependency: transitive description: name: crypto - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.5" css_colors: dependency: transitive description: name: css_colors - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.1" csslib: dependency: transitive description: name: csslib - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.16.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.12" dio: dependency: "direct main" description: name: dio - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.10" event_bus: dependency: "direct main" description: name: event_bus - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" ffi: dependency: transitive description: name: ffi - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.2" file: dependency: transitive description: name: file - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "6.1.2" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.10.11" flutter: @@ -304,21 +304,21 @@ packages: dependency: transitive description: name: flutter_cache_manager - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.3" flutter_html: dependency: "direct main" description: name: flutter_html - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" flutter_layout_grid: dependency: transitive description: name: flutter_layout_grid - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.10.5" flutter_localizations: @@ -330,49 +330,49 @@ packages: dependency: transitive description: name: flutter_page_indicator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.0.3" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.11" flutter_screenutil: dependency: "direct main" description: name: flutter_screenutil - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.0.0+2" flutter_smart_dialog: dependency: "direct main" description: name: flutter_smart_dialog - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.6" flutter_staggered_grid_view: dependency: "direct main" description: name: flutter_staggered_grid_view - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.4.0" flutter_svg: dependency: transitive description: name: flutter_svg - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.20.0-nullsafety.3" flutter_swiper: dependency: "direct main" description: name: flutter_swiper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.6" flutter_test: @@ -389,406 +389,406 @@ packages: dependency: "direct main" description: name: fluwx - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.5.0" glob: dependency: transitive description: name: glob - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" graphs: dependency: transitive description: name: graphs - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.0" html: dependency: transitive description: name: html - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.14.0+4" http: dependency: transitive description: name: http - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.2" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.4" image_cropper: dependency: "direct main" description: name: image_cropper - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.4.1" image_picker: dependency: transitive description: name: image_picker - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.7+22" image_picker_gallery_camera: dependency: "direct main" description: name: image_picker_gallery_camera - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.6" import_js_library: dependency: transitive description: name: import_js_library - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.2" intl: dependency: "direct main" description: name: intl - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.17.0" io: dependency: transitive description: name: io - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.5" js: dependency: transitive description: name: js - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.6.3" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.1" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.5.1" keframe: dependency: "direct main" description: name: keframe - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" logger: dependency: "direct main" description: name: logger - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" logging: dependency: transitive description: name: logging - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" mime: dependency: transitive description: name: mime - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" package_config: dependency: transitive description: name: package_config - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.9.3" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.5.1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.1" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.3" pedantic: dependency: transitive description: name: pedantic - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.11.1" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.0+2" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.1.0" photo_view: dependency: "direct main" description: name: photo_view - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.11.1" platform: dependency: transitive description: name: platform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.0.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" pool: dependency: transitive description: name: pool - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.5.0" process: dependency: transitive description: name: process - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "4.2.3" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.8" pull_to_refresh: dependency: "direct main" description: name: pull_to_refresh - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" qr: dependency: transitive description: name: qr - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" quiver: dependency: transitive description: name: quiver - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.5" retrofit: dependency: "direct main" description: name: retrofit - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.4+1" retrofit_generator: dependency: "direct dev" description: name: retrofit_generator - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.4.1+3" rxdart: dependency: "direct main" description: name: rxdart - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.26.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.6" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.1" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.0.2" sharesdk_plugin: dependency: "direct main" description: name: sharesdk_plugin - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" shelf: dependency: transitive description: name: shelf - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.7.9" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.4+1" sky_engine: @@ -800,84 +800,84 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.9.10+3" source_span: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" sqflite: dependency: transitive description: name: sqflite - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.2+4" sqflite_common: dependency: transitive description: name: sqflite_common - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3+3" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0+2" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.3.0" timing: dependency: transitive description: name: timing - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.1+3" tpns_flutter_plugin: @@ -893,128 +893,170 @@ packages: dependency: transitive description: name: transformer_page_view - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.6" tuple: dependency: transitive description: name: tuple - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.3" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.5" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" uuid: dependency: transitive description: name: uuid - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.2" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" video_player: dependency: "direct main" description: name: video_player - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.1" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.2.0" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.4+1" wakelock: dependency: transitive description: name: wakelock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.1+1" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.0+1" wakelock_web: dependency: transitive description: name: wakelock_web - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.0+3" watcher: dependency: transitive description: name: watcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.0" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" webview_flutter: dependency: transitive description: name: webview_flutter - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.0.7" win32: dependency: transitive description: name: win32 - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.2.5" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.2.0" xml: dependency: transitive description: name: xml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "5.1.2" yaml: dependency: transitive description: name: yaml - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "3.1.0" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.13.0 <3.0.0" flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index fd1ff7c3..fbe0374e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -85,7 +85,7 @@ dependencies: cached_network_image: ^2.0.0 flutter_html: ^1.3.0 #2.1.0 -# photo_view: ^0.11.1 + photo_view: ^0.11.1 chewie: ^0.12.2 video_player: ^1.0.1 From 84dd7b07f9dbf7a7649dbc13bf3a385cc5de579d Mon Sep 17 00:00:00 2001 From: fmk Date: Thu, 29 Jul 2021 19:30:06 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI=EF=BC=8C=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/generated/intl/messages_en.dart | 2 + lib/generated/intl/messages_zh_CN.dart | 2 + lib/generated/intl/messages_zh_Hans_CN.dart | 2 + lib/generated/intl/messages_zh_Hant_CN.dart | 2 + lib/generated/intl/messages_zh_TW.dart | 2 + lib/generated/l10n.dart | 20 +++++++++ lib/l10n/intl_en.arb | 3 ++ lib/l10n/intl_zh_CN.arb | 2 + lib/l10n/intl_zh_Hans_CN.arb | 2 + lib/l10n/intl_zh_Hant_CN.arb | 2 + lib/l10n/intl_zh_TW.arb | 2 + lib/message/system_message.dart | 46 ++++++++++++--------- lib/mine/vip_balance_page.dart | 37 +++++++++++------ 13 files changed, 92 insertions(+), 32 deletions(-) diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index a12b4a35..0a965b55 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -171,6 +171,7 @@ class MessageLookup extends MessageLookupByLibrary { "guanyu" : MessageLookupByLibrary.simpleMessage("关于"), "guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("关于创始人"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"), @@ -256,6 +257,7 @@ class MessageLookup extends MessageLookupByLibrary { "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), + "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 1eb6d25c..96ecd626 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/lib/generated/intl/messages_zh_CN.dart @@ -170,6 +170,7 @@ class MessageLookup extends MessageLookupByLibrary { "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), "guanyu" : MessageLookupByLibrary.simpleMessage("关于"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"), @@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary { "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), + "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index 2288484d..a13fb449 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/lib/generated/intl/messages_zh_Hans_CN.dart @@ -170,6 +170,7 @@ class MessageLookup extends MessageLookupByLibrary { "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), "guanyu" : MessageLookupByLibrary.simpleMessage("关于"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), + "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"), @@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary { "mingxi" : MessageLookupByLibrary.simpleMessage("明细"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默认排序"), "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暂无星店活动"), + "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在这儿还没有消费或充值记录哦~"), "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能开关未开启,请点击去打開定位"), "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登录,请点击去登录"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 739460c0..084bbef3 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/lib/generated/intl/messages_zh_Hant_CN.dart @@ -170,6 +170,7 @@ class MessageLookup extends MessageLookupByLibrary { "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), "guanyu" : MessageLookupByLibrary.simpleMessage("關於"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), + "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), "heji" : MessageLookupByLibrary.simpleMessage("合計:"), @@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary { "mingxi" : MessageLookupByLibrary.simpleMessage("明細"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"), "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暫無星店活動"), + "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在這兒還沒有消費或充值紀錄喔~"), "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"), "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登錄,請點擊去登錄"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index e8152370..2b088491 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/lib/generated/intl/messages_zh_TW.dart @@ -170,6 +170,7 @@ class MessageLookup extends MessageLookupByLibrary { "guanlidizhi" : MessageLookupByLibrary.simpleMessage("管理地址"), "guanyu" : MessageLookupByLibrary.simpleMessage("關於"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), + "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"), "heji" : MessageLookupByLibrary.simpleMessage("合計:"), @@ -255,6 +256,7 @@ class MessageLookup extends MessageLookupByLibrary { "mingxi" : MessageLookupByLibrary.simpleMessage("明細"), "morenpaixu" : MessageLookupByLibrary.simpleMessage("默認排序"), "muqianzanwuxingdianhuodong" : MessageLookupByLibrary.simpleMessage("目前暫無星店活動"), + "nihaimeiyouchongzhihuoxiaofeijilu" : MessageLookupByLibrary.simpleMessage("你在這兒還沒有消費或充值紀錄喔~"), "nindingweigongnengweikaiqi" : MessageLookupByLibrary.simpleMessage("您定位功能開關未開啟,請點擊去開啟定位"), "nindingweiquanxianweiyunxu" : MessageLookupByLibrary.simpleMessage("您未开启位置权限,请点击确定申请权限"), "ninweidenglu" : MessageLookupByLibrary.simpleMessage("您未登錄,請點擊去登錄"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 3bb84be3..7740e4cf 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -3925,6 +3925,26 @@ class S { ); } + /// `你在这儿还没有消费或充值记录哦~` + String get nihaimeiyouchongzhihuoxiaofeijilu { + return Intl.message( + '你在这儿还没有消费或充值记录哦~', + name: 'nihaimeiyouchongzhihuoxiaofeijilu', + desc: '', + args: [], + ); + } + + /// `还没有消息~` + String get haimeiyouxiaoxi { + return Intl.message( + '还没有消息~', + name: 'haimeiyouxiaoxi', + desc: '', + args: [], + ); + } + /// `并使用本机号码登录` String get privacy_policy4 { return Intl.message( diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 2ef9e670..03179852 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -407,6 +407,9 @@ "chongzhixiaoxi": "充值消息", "shuaxin": "刷新", "lijichongzhi": "立即充值", + "nihaimeiyouchongzhihuoxiaofeijilu": "你在这儿还没有消费或充值记录哦~", + "haimeiyouxiaoxi": "还没有消息~", + diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index fadf6952..4fd47281 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/lib/l10n/intl_zh_CN.arb @@ -408,6 +408,8 @@ "chongzhixiaoxi": "充值消息", "shuaxin": "刷新", "lijichongzhi": "立即充值", + "nihaimeiyouchongzhihuoxiaofeijilu": "你在这儿还没有消费或充值记录哦~", + "haimeiyouxiaoxi": "还没有消息~", diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 415dafd6..71e188f3 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/lib/l10n/intl_zh_Hans_CN.arb @@ -408,6 +408,8 @@ "chongzhixiaoxi": "充值消息", "shuaxin": "刷新", "lijichongzhi": "立即充值", + "nihaimeiyouchongzhihuoxiaofeijilu": "你在这儿还没有消费或充值记录哦~", + "haimeiyouxiaoxi": "还没有消息~", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index 084f2b0b..a61408b8 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/lib/l10n/intl_zh_Hant_CN.arb @@ -402,6 +402,8 @@ "chongzhixiaoxi": "充值消息", "shuaxin": "刷新", "lijichongzhi": "立即充值", + "nihaimeiyouchongzhihuoxiaofeijilu": "你在這兒還沒有消費或充值紀錄喔~", + "haimeiyouxiaoxi": "還沒有消息~", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index c656b7a0..179f88e1 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/lib/l10n/intl_zh_TW.arb @@ -400,6 +400,8 @@ "chongzhixiaoxi": "充值消息", "shuaxin": "刷新", "lijichongzhi": "立即充值", + "nihaimeiyouchongzhihuoxiaofeijilu": "你在這兒還沒有消費或充值紀錄喔~", + "haimeiyouxiaoxi": "還沒有消息~", diff --git a/lib/message/system_message.dart b/lib/message/system_message.dart index 98d82217..f1aa7042 100644 --- a/lib/message/system_message.dart +++ b/lib/message/system_message.dart @@ -9,6 +9,7 @@ import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_footer.dart'; +import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -62,8 +63,7 @@ class _SystemMessagePage extends State { messages.addAll(pageInfo.list.map((e) => Message.fromJson(e)).toList()); _refreshController.loadComplete(); _refreshController.refreshCompleted(); - if (mounted) - setState(() {}); + if (mounted) setState(() {}); if (pageNum * 10 > int.tryParse(pageInfo.total)) { _refreshController.loadNoData(); } else { @@ -77,7 +77,6 @@ class _SystemMessagePage extends State { RefreshController _refreshController = RefreshController(); - @override Widget build(BuildContext context) { return Scaffold( @@ -104,21 +103,28 @@ class _SystemMessagePage extends State { onLoading: () { queryMessage(); }, - child: ListView.builder( - padding: EdgeInsets.only(top: 16), - itemCount: messages.length, - physics: NeverScrollableScrollPhysics(), - itemBuilder: (context, position) { - return GestureDetector( - onTap: () { - if (messages[position].typed == 2) { - Navigator.of(context) - .pushNamed('/router/exchange_order_details'); - } - }, - child: buildMessageItem(messages[position]), - ); - }), + child: (messages == null || messages.length == 0) + ? NoDataView( + isShowBtn: false, + text: S.of(context).haimeiyouxiaoxi, + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : ListView.builder( + padding: EdgeInsets.only(top: 16), + itemCount: messages.length, + physics: NeverScrollableScrollPhysics(), + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + if (messages[position].typed == 2) { + Navigator.of(context) + .pushNamed('/router/exchange_order_details'); + } + }, + child: buildMessageItem(messages[position]), + ); + }), ), ); } @@ -153,8 +159,8 @@ class _SystemMessagePage extends State { (message.typed == 1) ? "assets/image/icon_system_notices.png" : (message.typed == 2) - ? "assets/image/icon_system_order.png" - : "assets/image/icon_system_recharge.png", + ? "assets/image/icon_system_order.png" + : "assets/image/icon_system_recharge.png", width: 24.w, height: 24.h, ), diff --git a/lib/mine/vip_balance_page.dart b/lib/mine/vip_balance_page.dart index 0cc528e7..6ee87302 100644 --- a/lib/mine/vip_balance_page.dart +++ b/lib/mine/vip_balance_page.dart @@ -6,11 +6,11 @@ import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/user_bill.dart'; import 'package:huixiang/retrofit/retrofit_api.dart'; +import 'package:huixiang/view_widget/no_data_view.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; - class VipBalancePage extends StatefulWidget { final arguments; @@ -113,12 +113,19 @@ class _VipBalancePage extends State { leadingWidth: 56.w, ), body: Container( - child: ListView.builder( - itemBuilder: (context, position) { - return balanceItem(userBills[position]); - }, - itemCount: userBills.length, - ), + child: (userBills == null || userBills.length == 0) + ? NoDataView( + isShowBtn: false, + text: S.of(context).nihaimeiyouchongzhihuoxiaofeijilu, + fontSize: 16.sp, + margin: EdgeInsets.only(top: 120.h), + ) + : ListView.builder( + itemBuilder: (context, position) { + return balanceItem(userBills[position]); + }, + itemCount: userBills.length, + ), ), ); } @@ -138,7 +145,9 @@ class _VipBalancePage extends State { margin: EdgeInsets.only(left: 12.w, top: 12.h), alignment: Alignment.center, child: Image.asset( - userBill.pm == 0 ? "assets/image/icon_store_c.png" : "assets/image/icon_wallet_recharge.png", + userBill.pm == 0 + ? "assets/image/icon_store_c.png" + : "assets/image/icon_wallet_recharge.png", ), ), Expanded( @@ -177,7 +186,10 @@ class _VipBalancePage extends State { TextSpan(children: [ TextSpan( text: userBill.createTime, - style: TextStyle(fontSize: 14.sp, color: Color(0xff727272),), + style: TextStyle( + fontSize: 14.sp, + color: Color(0xff727272), + ), ), ]), ), @@ -186,9 +198,10 @@ class _VipBalancePage extends State { TextSpan( text: S.of(context).yue_(userBill.balance), style: TextStyle( - fontSize: 14.sp, - fontWeight: FontWeight.bold, - color: Color(0xff727272),), + fontSize: 14.sp, + fontWeight: FontWeight.bold, + color: Color(0xff727272), + ), ), ]), ),