From 1273e233c3fa9a6a10662262ec6de7111462e8b2 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Sun, 23 Apr 2023 16:17:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8E=A8=E8=8D=90=E9=97=A8=E5=BA=97=E6=B3=A8=E5=86=8C=E6=9D=A5?= =?UTF-8?q?=E6=BA=90=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/login_channel.webp | Bin 0 -> 996 bytes assets/image/2x/login_store.webp | Bin 0 -> 1218 bytes assets/image/3x/login_channel.webp | Bin 0 -> 1384 bytes assets/image/3x/login_store.webp | Bin 0 -> 2768 bytes assets/image/login_channel.webp | Bin 0 -> 686 bytes assets/image/login_store.webp | Bin 0 -> 752 bytes lib/login/login_store_select.dart | 174 +++++++++++++++++++++++++++ lib/login/new_login_page.dart | 46 ++++++- lib/main.dart | 3 + lib/retrofit/data/channels_list.dart | 155 ++++++++++++++++++++++++ lib/retrofit/retrofit_api.dart | 5 + lib/retrofit/retrofit_api.g.dart | 21 ++++ 12 files changed, 402 insertions(+), 2 deletions(-) create mode 100644 assets/image/2x/login_channel.webp create mode 100644 assets/image/2x/login_store.webp create mode 100644 assets/image/3x/login_channel.webp create mode 100644 assets/image/3x/login_store.webp create mode 100644 assets/image/login_channel.webp create mode 100644 assets/image/login_store.webp create mode 100644 lib/login/login_store_select.dart create mode 100644 lib/retrofit/data/channels_list.dart diff --git a/assets/image/2x/login_channel.webp b/assets/image/2x/login_channel.webp new file mode 100644 index 0000000000000000000000000000000000000000..0bfda89da51b951588fc84179af9d9f9adfba40d GIT binary patch literal 996 zcmWIYbaT7I%)k)t>J$(bU=hK^z`$St#Oh$=>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|AfzZ zZ((5Ab{-*y2$O=uqC~K9EI^VeEscTU({cs|-be-p;R_55T+v`TAc4be3P33tpu6&c zFr6WXA(cUa!IL46A(=rB$T9*(sv(0JFou2JF)}dds~_MLnEp^kMP50I5gmS~*jOSvr|5cg@U-WuXkM~0Ha0GPI{(i7d*{yOvIzc7f3Pig zj>5sJ@V$HNJHWtW;eMN#xDQtHVt@C51z3W5uktc5JlK|XBWUYceh2?QW~R~({m!uM$hsA7FFDHWr)?<_ni=C+wN+BkB z!&Ps?cfOewVR=r!L893X7^G03a7{hxSz(}J*TLgc6*PVMv|O}P-m-W~W-N5_aW?av zFy-^x)dI`s$nBimb>-yiSwX5 Z*Z&*-XMWoI^WfeW&wm=cXZh#O1OUFxM5q7& literal 0 HcmV?d00001 diff --git a/assets/image/2x/login_store.webp b/assets/image/2x/login_store.webp new file mode 100644 index 0000000000000000000000000000000000000000..e9e2b7da75183fc325322e076ea5cabaf4434d8f GIT binary patch literal 1218 zcmWIYbaUIq!oU#j>J$(bU=hK^z`$St#L{5o>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|AfzZ zZ((5Ab{-*y2$O=uqC~K9z}R45N=sv4__UmXfj5$YLHGg#16MRy4oKi|n*vZu2I#JQ zAWUb-VMt|AVDMzfV@PJu1G0>Ok!r|b28>~!GfWH&`qBs31irIaZpyuSD(d^b|Alh} znLQ_|7#fsJ-+ie-#&gn@5dQ0v)!QEIk2Jp|a>ZkkOmyh-hspi*^Y{H{t66dMp4j1S zxrdKAsorIhI3T;@`BmNgyl>_F*SlYTKYa83%a7k*ru_c+$yVln-JkvL*A3pko^QPE z`_<|1|8MxZ;p@xnS=BtBALr_|-%p-#`t9|X6SDth-+7by_0qg#yFXG z{q1eJKs5XQ|C`$itJZygS8LGH@z1#6wnyOif{fkF^I`FHU~kU9m+?CkJv|N|6Zc&A z`jw7QRawis8k6^LeWR16+ZCy)?B3fccH+Ubwj*0Jp7lNXo|e4gNOJ4eO-Hs@{ha&c zv(rxXgoj)TQ9Dc71g?IIR;)Ch`CjD*>-v3cjKXi4liyFYxOFmN*3_Jcp9hvZRP5dR zJ89CB`QIW+J^rVD3TL@+QuD#T&2|o_cYf*1Uwf_Lu;81i#n zprOakhYxvnPS?p*fBO5F=UK%!GyceJ2!E^jG+H}#p1IG(1jVP(n?EgQF}ZX*_uO{5 zB8xoT!h#(}Pou?G#>W&1%4oUnE3Mxo|MNQkh8yNjZ!=tQop)5}@|=9;j+#f3?>C2? z{dukZuh{atVIFbTk_QC(V-l>F*@(Z|_J{NJlzx?i2afyJ`=oi89X^rcsZ+m?C;HWI FCIBjuuXO+b literal 0 HcmV?d00001 diff --git a/assets/image/3x/login_channel.webp b/assets/image/3x/login_channel.webp new file mode 100644 index 0000000000000000000000000000000000000000..0b6639023d9f6120c5a302b2f18a9f038b373325 GIT binary patch literal 1384 zcmWIYbaP8!Wnc(*bqWXzu!!JdU|=u+Vrww+baoCn!3g9sFrEOBEI_H;ypp0IcPE92 z$S4K&2Mmlr2nLDC#RU)+RuZV{+ck*V%eq)q;1}dfNi9wWD)|7!Dn&rcfo>83vPIG% zYz+`Q3BtAkvCB&eN`PttK=2?(*InG6iuTNxN6ZXv`}7BDdI zw=ghlJC6`Ugh@eSQ6ktl79h!#md3#FX*mM}ZzKbQ@C612u4u3vkig+K1)!7+&|UdJ zn9h*HkjkLI;K`83kj$V5WElY?)sVpq7{fkA%nS_r)(7|mzCY5Mq;hoCyvOIa7V7yM z+SGaH9xhb&>=J3-ec$=~xxd9tJ7wG_J#o3(+$JvfSf%WPt>x1VxytT+Gk2Z;$;@L= zw&Tt6+m&|S{l|Y-OwliXY548Vo-5BI4&B?|f9Kxvx5m#V703O5mLK|WGw3RZ{; z&g?L{{{Phhd(p0*UMMR~3+TW+!~$Q0APnB>nW{d{A>S=)tYor2F78m1Rb-6^9cbl5xa zWXaDttevyg8_C(<_I%E*vb}ze_w@7GlWU5D-j@Um{f~NijIqD}O7qz&;r5_BZ^enx z88793)qH#Wvs$yaa{g(@^Z%XapO0PlG53es|NN_x|Gt|XOi!EqU*7jao&U+rz)%+Q>*rmyH8b=;!E~eMM(swcCl8w(kDlk-z~^|?={1iQt6mpR(`#cM ztysNZOpdL(S0r}rev#Pr+|}{8sM(M7-&uOwGvzLAXR>d7`~Rnm>GXb0{@0dY7e3oA z{`s7d(W2El>^HS1&OLOU(=IIYrFP<1(YV4&=AHeeHP-6;*0oK&-llD*U9(#t*y6d@ zHRZVzV}Cwj`9IHknxWPDWtZfpPnoyt*Fytqt`kWb$@6a?^}F}}e7RV@{S3n^d2hDO zFt!O(S!QY2Kk>>5@t)@%X2qNTPPsehLYiKdA^Sc3&qeQ9lXse5p6ko= literal 0 HcmV?d00001 diff --git a/assets/image/3x/login_store.webp b/assets/image/3x/login_store.webp new file mode 100644 index 0000000000000000000000000000000000000000..9ac6d0ec4787878f87a3dd49a68f8646727a4080 GIT binary patch literal 2768 zcmaJ>cUV)|5@DAQC`8 zq$wB>B1MozsY(^8A(GHrNb+v<5BGcDzBlL0+~1k`efP}VIpd=t5a*=7UpRL!u5hc{?Gb>rft~`8N`g>e4UB<4w|;01NnkDj znyUcpxc9^7N(7)L1^|h{A3nLi01&weKy}v--;Zw+Cv~=pY;d@7YfOoG)m>|?hl+bE#sh7r{y|f21IQ&^)4TMU7WRFYw-f< z6leSlQ$v_VjncAkG>GgzO7Xu5)C6x zM$|~aiY((0`MCW;0WpG=&5Xuhi;Ud*Seyft{&-l4X$b7A;3$4Fh@B-%EfUm@3-L|4 z^wJ4!uU;%}UM%~{QDv?jH3eVG{M4HS-9y%%)RO}his^;;j4}l@zY(KTu5)jX-dSa# zWD8tJWo5Cqa4Ef(nR~mUM&0l}ABg!lJcx31jPpWg-l-S%Uny0zFVu9^(bt2Ip7l^} ziFn?2Cw(igc_vkUVpr?O0~9gKROY@vZ4rTEQA_oVcYPfDm{A4H+04fLm4M9KJ~#LD z;d|ldJm*N%g`&vuY|h<_TBv zt0%ML@wu9$B1}znkmgfFfJh#%p4Zpgj|FcPAyHmN$96ocs$He^-m?#bI`yFUi8N}{ zYKwj?v+;t4U6<2lXBcOyhMlNfvqz$C?8D1Rxo-ix? zH8vblq5HWV>maE_j%S(Sw^{5Z^03ce@!BC*SymzNA;DRf zow=r>EwshAQNWWiTr63naI5HRPgWmzC$*V#zL2xe>(N00c~C^yZZ#_rUTrn4(;egV z`Sg*e-YVyMpmdWI&syoT&Jsh*S2s&&L&)Uo325|j3A0`+kJ29X(uP-CyYw&#Z;xve z4o#h|b~g;~X`bBKQ@kF$3E{}jhv6j@rAmX7&;g zxEbUID{0(A%rIv-OaR)RNVq@pKOd8!t2uc-ZeRX^Cg$t{vF+R#;@xE)U>aoT)7Iq2 zaN3cl!Jf*`mwjU%qCG)hnXnb!1q0T`SU$b@%1-NDB4Z7K%#CD9Q#Gx4wPa*5#|GE@ zo^*!~Fi2J5zeJ{ZUS%KGiYF(EikLEx$T_0QuY?!RQrB94@6NI#Kkm* zlW%!rOM!^wF$pEpXYRvMW);yh4js}FYuh@uD+CE_xEkgDNOEg(N(z0LhcUeR!iHK0 z7x)uA&zFnH?ycJxNaPP3?(nYY|J-eWq&8My_@Fg!iVqnox`n@6Wnmj{9JBNSt|J5 ziACiLvQk!6Kk)!7ma&5GM8w!JPIqI?6*Q}1)ln~Li%42P)>cAyujh6{2W8I} zLDb8|ZM?2y##3<&wwW``#!B9Pj?tz>O-;Qa`4 zMR~~*^Fv>Wkx#rRvLG%34%6$)+|`w)aKs?9d;oTMZze5#wtqf73$L@VQs4DUfVhTi z)+^kYY~D^kSr7Zc?7M7MpzCdSn-O;dq{QN)&q^$XoTo=PdgotF*5^i^zydK5aF3 zeO3@R^ExVxnK z#NVU4ndDl;^c#fE7(CN-Ri3E%E2x4A(k540>ll;f!Shj@rMQ<1oKlh?%!;+%H?0_n z=%jDMC}aI!7IOxEi&0lB+E%m5iLbpjNmarkrY=VL_2D zNwIOhiyNP8u;B=v8Ht%0vU@A{V4w#NxdYE5Z1t+F%F$;r@#Iv8EM2V|FIY6CXsBAv zI;uw}dPXF!_&O?BB|JJF_6hYfffQjs_{xuarWIP|U6P*IAsmMC=c?p*2qgBzVgJbq ja;!8+V|Q&dk;ioIR>BI=*h0DZ2#XASFsEPq5&-`JT>R<6 literal 0 HcmV?d00001 diff --git a/assets/image/login_channel.webp b/assets/image/login_channel.webp new file mode 100644 index 0000000000000000000000000000000000000000..745dd82b9aa3eb69c30a14600a6ae60798ce9bc5 GIT binary patch literal 686 zcmWIYbaPwA#J~{l>J$(bU=hK^z`$St#KK_Y>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|AfzZ zZ((5Ab{-*y2$O=uqC~K9EI^VeEscTU({cs|-bi3XTwq|}iU!L82^?-y07}UK-IWi7 z=?pmxsSFAXo(y>m$qafxmJu*g4H?XUG3>J)s8C<{0E#~ey??oGZA-l4C|l3r?|a)L=Yw|V?7BA|b`3?nyB>NxJo?st$-IYgE#hqla&vC4 zD%$rrfJt@2i&t{%HT6VDh_<$2}G0$o%fJ%hPXz9mTdlX}P!rnYbkmbLaFwc)#_ SpSQj5VJp9B-qz-MDhvQ+E1pXL literal 0 HcmV?d00001 diff --git a/assets/image/login_store.webp b/assets/image/login_store.webp new file mode 100644 index 0000000000000000000000000000000000000000..aba2ba5e22eb0c407cb0ff1fa8f90fe93737aa41 GIT binary patch literal 752 zcmWIYbaQ*b#J~{l>J$(bU=hK^z`$St#JphS>FgYEf)U7NU_1dLS%6Zxc_l?b?oJ93 zkx>fl4;UDM5DXHNiwhtutRzs?w`&l!mvynKz%R&|l3JV$RPq6cRf>R?1KlJ7WQ(Lj z*cu>q5`=97VwaZ`lmOKPfY?PLLC!#S3XrXlj>JwvVkZ|AfzZ zZ((5Ab{-*y2$O=uqC~K9EI^VeEscTU({f-WL^3c4UtnP1iU!L82^?-y07}UK-IWi7 z=?pmxsSFAXo(y>m$qafxmJu*g4H?XUG3@gbs8FBRfmvYs!47+EN;ZP$qDWD%U^qQWR(_;B)^ zTTWi5HB}lGNX@(;cq zJn2}Y&yvrVc5{CT?^zNpZLwbPmbh9(rdzG6^I>+?51kJ;FTBFkv2WR createState() { + return _LoginStoreSelect(); + } +} + +class _LoginStoreSelect extends State { + ApiService apiService; + ChannelsList channelsList; + int channelIndex = 0; + + @override + void initState() { + super.initState(); + EasyLoading.show(status: S.current.zhengzaijiazai); + queryChannels(); + } + + queryChannels() async{ + apiService = ApiService(Dio(), context: context); + BaseData baseData = await apiService.appChannels().catchError((error) { + print(error.message); + SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type), + alignment: Alignment.center); + }); + if (baseData != null && baseData.isSuccess) { + channelsList = baseData.data; + setState((){}); + EasyLoading.dismiss(); + } else { + if (baseData?.msg != null) + SmartDialog.showToast(baseData.msg, alignment: Alignment.center); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + appBar: MyAppBar( + title: "渠道来源", + titleColor: Colors.black, + titleSize: 18.sp, + background: Color(0xFFFFFFFF), + leadingColor: Colors.black, + ), + body: Container( + color: Color(0xFFFFFFFF), + height: double.infinity, + child: Column( + children: [ + Padding(padding:EdgeInsets.only(top:18.h,bottom:20.h,left:18.w), + child: Row( + children: [ + Image.asset( + "assets/image/login_channel.webp", + fit: BoxFit.fill, + width:24, + height:24, + ), + SizedBox(width:12.w), + Text( + "Hi,您是通过什么途径了解到这款APP的?", + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 15.sp, + color: Color(0xFF181818), + ), + ), + ], + )), + Expanded(child: ListView.builder( + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, position) { + return GestureDetector( + onTap: () { + setState(() { + channelIndex = position; + }); + }, + child: channelItem(position), + ); + }, + itemCount:(channelsList != null && (channelsList?.channels?.length ?? 0) > 0) ? channelsList.channels.length : 0, + )), + if(channelsList != null && (channelsList.channels.length) > 0) + GestureDetector( + onTap: () { + Navigator.pop(context,channelsList.channels[channelIndex]); + }, + child: Container( + width: double.infinity, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(27), + ), + margin: EdgeInsets.only( + left: 16, right: 16, bottom: 21), + padding: EdgeInsets.symmetric(vertical:18.h), + child: Text( + S.of(context).queren, + style: TextStyle( + fontSize: 16.sp, + fontWeight: MyFontWeight.medium, + color: Colors.white, + ), + ), + ), + ) + ], + ), + ), + ); + } + + Widget channelItem(index){ + return Container( + height:52 , + margin: EdgeInsets.only(bottom: 12,left: 14,right: 14), + child: Stack( + alignment: Alignment.bottomRight, + children: [ + Container( + height: 52.h, + width: double.infinity, + decoration: BoxDecoration( + borderRadius: new BorderRadius.circular(6), + border: Border.all( + color: channelIndex == index ? Color(0xFF32A060) : Color(0xFFF7F7F7), + width: channelIndex == index ? 1 : 0, + ), + color:channelIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7), + ), + alignment: Alignment.centerLeft, + padding: EdgeInsets.only(left: 12,), + child: Text( + channelsList.channels[index], + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 14.sp, + color: channelIndex == index ? Color(0xFF32A060) : Colors.black, + ), + ), + ), + if (index == channelIndex) + Image.asset( + "assets/image/recharge.webp", + width: 20, + height: 20, + fit: BoxFit.fill, + ), + ], + ), + ); + } +} diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index a584b3eb..ad4eef5b 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -53,6 +53,7 @@ class _NewLoginPage extends State { Timer _timer; bool isShowLogin = false; String area = "+86"; + String channelName; @override void initState() { @@ -211,7 +212,8 @@ class _NewLoginPage extends State { "capcha": code, "mobile": mobile, "invite": invite, - "areaCode": area + "areaCode": area, + "regChannel":channelName ?? "" }; EasyLoading.show(status: S.of(context).zhengzaijiazai); BaseData value = await apiService.memberLogin(param).catchError((error) { @@ -592,7 +594,47 @@ class _NewLoginPage extends State { ), ), SizedBox( - height: 51.h, + height: 30.h, + ), + GestureDetector( + onTap: (){ + Navigator.of(context).pushNamed('/router/login_store_select').then((value) => { + setState(() { + if (value != null) channelName = value; + }) + }); + }, + child:Container( + padding: EdgeInsets.only(left:12.w,right:12.w,top:16.h,bottom:16.h), + margin: EdgeInsets.only(bottom:30.h), + decoration: BoxDecoration( + color: Color(0xFFF1F1F1), + borderRadius: BorderRadius.circular(4), + ), + child: Row( + children: [ + Image.asset( + "assets/image/login_store.webp", + fit: BoxFit.fill, + width:14, + height:14, + ), + SizedBox(width: 3.w,), + Expanded(child:Text( + channelName ?? "邀请来源(选填)", + style: TextStyle( + fontWeight: MyFontWeight.regular, + fontSize: 12.sp, + color: Color(0xFF868686), + ), + )), + Icon( + Icons.arrow_forward_ios, + size: 16, + ), + ], + ), + ), ), Row( mainAxisAlignment: MainAxisAlignment.start, diff --git a/lib/main.dart b/lib/main.dart index 7412841c..74f6fd54 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -95,6 +95,7 @@ import 'home/help_farmers/help_farmers_page.dart'; import 'home/home_view/activity_list.dart'; import 'home/welfare_exchange.dart'; import 'home/welfare_page.dart'; +import 'login/login_store_select.dart'; import 'login/new_login_page.dart'; import 'login/phone_address_page.dart'; import 'main_page.dart'; @@ -429,4 +430,6 @@ Map routers = { SystemNotice(), '/router/store_html': (context, {arguments}) => StoreHtml(arguments:arguments), + '/router/login_store_select': (context, {arguments}) => + LoginStoreSelect(), }; diff --git a/lib/retrofit/data/channels_list.dart b/lib/retrofit/data/channels_list.dart new file mode 100644 index 00000000..bf58e35b --- /dev/null +++ b/lib/retrofit/data/channels_list.dart @@ -0,0 +1,155 @@ +/// channels : ["海峡","回乡","boom"] +/// isOpen : true +/// preferentialList : [{"createTime":"2023-04-21 16:15:42","giftdMoney":"0.00","gitfdCouponId":null,"id":"1506553893994102784","isDeleted":0,"rechargeMoney":"0.01","rechargeType":0,"remark":"

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。
储值活动不与其他活动同享

","sortValue":1,"tenantCode":"admin"}] + +class ChannelsList { + ChannelsList({ + List channels, + bool isOpen, + List preferentialList,}){ + _channels = channels; + _isOpen = isOpen; + _preferentialList = preferentialList; +} + + ChannelsList.fromJson(dynamic json) { + _channels = json['channels'] != null ? json['channels'].cast() : []; + _isOpen = json['isOpen']; + if (json['preferentialList'] != null) { + _preferentialList = []; + json['preferentialList'].forEach((v) { + _preferentialList.add(PreferentialList.fromJson(v)); + }); + } + } + List _channels; + bool _isOpen; + List _preferentialList; +ChannelsList copyWith({ List channels, + bool isOpen, + List preferentialList, +}) => ChannelsList( channels: channels ?? _channels, + isOpen: isOpen ?? _isOpen, + preferentialList: preferentialList ?? _preferentialList, +); + List get channels => _channels; + bool get isOpen => _isOpen; + List get preferentialList => _preferentialList; + + Map toJson() { + final map = {}; + map['channels'] = _channels; + map['isOpen'] = _isOpen; + if (_preferentialList != null) { + map['preferentialList'] = _preferentialList.map((v) => v.toJson()).toList(); + } + return map; + } + +} + +/// createTime : "2023-04-21 16:15:42" +/// giftdMoney : "0.00" +/// gitfdCouponId : null +/// id : "1506553893994102784" +/// isDeleted : 0 +/// rechargeMoney : "0.01" +/// rechargeType : 0 +/// remark : "

充值说明:
平台充值根据用户在平台的会员等级享有不同的充值权益。
银卡用户享1.1倍充值会员权益,即充值100元账户110元。
金卡用户享1.2倍充值会员权益,即充值100元账户120元。
共创用户享1.3倍充值会员权益,即充值100元账户130元。
平台充值金可在平台上所有品牌和门店使用,包含:农场火锅、海峡姐妹、前进麦味、百年川椒、农场煮意、一心回乡生态农场等。
储值活动不与其他活动同享

" +/// sortValue : 1 +/// tenantCode : "admin" + +class PreferentialList { + PreferentialList({ + String createTime, + String giftdMoney, + dynamic gitfdCouponId, + String id, + num isDeleted, + String rechargeMoney, + num rechargeType, + String remark, + num sortValue, + String tenantCode,}){ + _createTime = createTime; + _giftdMoney = giftdMoney; + _gitfdCouponId = gitfdCouponId; + _id = id; + _isDeleted = isDeleted; + _rechargeMoney = rechargeMoney; + _rechargeType = rechargeType; + _remark = remark; + _sortValue = sortValue; + _tenantCode = tenantCode; +} + + PreferentialList.fromJson(dynamic json) { + _createTime = json['createTime']; + _giftdMoney = json['giftdMoney']; + _gitfdCouponId = json['gitfdCouponId']; + _id = json['id']; + _isDeleted = json['isDeleted']; + _rechargeMoney = json['rechargeMoney']; + _rechargeType = json['rechargeType']; + _remark = json['remark']; + _sortValue = json['sortValue']; + _tenantCode = json['tenantCode']; + } + String _createTime; + String _giftdMoney; + dynamic _gitfdCouponId; + String _id; + num _isDeleted; + String _rechargeMoney; + num _rechargeType; + String _remark; + num _sortValue; + String _tenantCode; +PreferentialList copyWith({ String createTime, + String giftdMoney, + dynamic gitfdCouponId, + String id, + num isDeleted, + String rechargeMoney, + num rechargeType, + String remark, + num sortValue, + String tenantCode, +}) => PreferentialList( createTime: createTime ?? _createTime, + giftdMoney: giftdMoney ?? _giftdMoney, + gitfdCouponId: gitfdCouponId ?? _gitfdCouponId, + id: id ?? _id, + isDeleted: isDeleted ?? _isDeleted, + rechargeMoney: rechargeMoney ?? _rechargeMoney, + rechargeType: rechargeType ?? _rechargeType, + remark: remark ?? _remark, + sortValue: sortValue ?? _sortValue, + tenantCode: tenantCode ?? _tenantCode, +); + String get createTime => _createTime; + String get giftdMoney => _giftdMoney; + dynamic get gitfdCouponId => _gitfdCouponId; + String get id => _id; + num get isDeleted => _isDeleted; + String get rechargeMoney => _rechargeMoney; + num get rechargeType => _rechargeType; + String get remark => _remark; + num get sortValue => _sortValue; + String get tenantCode => _tenantCode; + + Map toJson() { + final map = {}; + map['createTime'] = _createTime; + map['giftdMoney'] = _giftdMoney; + map['gitfdCouponId'] = _gitfdCouponId; + map['id'] = _id; + map['isDeleted'] = _isDeleted; + map['rechargeMoney'] = _rechargeMoney; + map['rechargeType'] = _rechargeType; + map['remark'] = _remark; + map['sortValue'] = _sortValue; + map['tenantCode'] = _tenantCode; + return map; + } + +} \ No newline at end of file diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index eaf2e48d..f03753ed 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -27,6 +27,7 @@ import 'data/app_update.dart'; import 'data/banner.dart'; import 'data/brand_data.dart'; import 'data/category_select_list.dart'; +import 'data/channels_list.dart'; import 'data/chapter.dart'; import 'data/collect_class_list.dart'; import 'data/coupon_detail.dart'; @@ -177,6 +178,10 @@ abstract class ApiService { @POST("/auth/platform/memberLogin") Future memberLogin(@Body() Map param); + ///获取APP门店推广渠道 + @GET("/auth/appChannels") + Future> appChannels(); + ///发送验证码 @GET("/auth/sendVerify/{areaCode}/{mobile}") Future sendVerify(@Path("areaCode") String areaCode, @Path("mobile") String mobile); diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index c9699f94..19fb1bdf 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -98,6 +98,27 @@ class _ApiService implements ApiService { return value; } + @override + Future> appChannels() async { + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>( + '/auth/appChannels', + queryParameters: queryParameters, + options: RequestOptions( + method: 'GET', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => ChannelsList.fromJson(json), + ); + return value; + } + @override Future> sendVerify(areaCode,mobile) async { ArgumentError.checkNotNull(mobile, 'mobile');