Browse Source

safety

master
fmk 3 years ago
parent
commit
c618294d3d
  1. 13
      assets/svg/jingbi.svg
  2. 11
      assets/svg/kuaijiexiadan_bg.svg
  3. 20
      assets/svg/lianmeng.svg
  4. 15
      assets/svg/saoyisao.svg
  5. 13
      assets/svg/shequn.svg
  6. 17
      assets/svg/tixing.svg
  7. 15
      assets/svg/wode.svg
  8. 20
      assets/svg/youhuiquan_bg.svg
  9. 23
      lib/community/community_page.dart
  10. 4
      lib/generated/intl/messages_en.dart
  11. 4
      lib/generated/intl/messages_zh_CN.dart
  12. 4
      lib/generated/intl/messages_zh_Hans_CN.dart
  13. 4
      lib/generated/intl/messages_zh_Hant_CN.dart
  14. 4
      lib/generated/intl/messages_zh_TW.dart
  15. 24
      lib/generated/l10n.dart
  16. 174
      lib/home/home_page.dart
  17. 217
      lib/home/home_view/coupon.dart
  18. 168
      lib/home/home_view/featured_acticvity.dart
  19. 106
      lib/home/home_view/home_integral_store.dart
  20. 131
      lib/home/home_view/quick_order.dart
  21. 3
      lib/home/home_view/sign_view.dart
  22. 103
      lib/home/points_mall_view/points_goods_title.dart
  23. 3
      lib/integral/intergra_view/integral_task.dart
  24. 1
      lib/integral/intergra_view/integral_vip.dart
  25. 4
      lib/l10n/intl_en.arb
  26. 4
      lib/l10n/intl_zh_CN.arb
  27. 4
      lib/l10n/intl_zh_Hans_CN.arb
  28. 4
      lib/l10n/intl_zh_Hant_CN.arb
  29. 4
      lib/l10n/intl_zh_TW.arb
  30. 1
      lib/login/login_page.dart
  31. 217
      lib/main_page.dart
  32. 2
      lib/retrofit/data/findMiNiGroupList.dart
  33. 2
      lib/retrofit/data/logistics.dart
  34. 12
      lib/retrofit/data/settleOrderInfo.dart
  35. 2
      lib/retrofit/data/shoppingCart.dart
  36. 2
      lib/retrofit/data/vip_card.dart
  37. 88
      lib/retrofit/min_api.g.dart
  38. 1
      lib/store/store_order.dart
  39. 1
      lib/store/store_view/product_sku.dart
  40. 1
      lib/store/store_view/settlement.dart
  41. 1
      lib/store/store_view/shop_goods.dart
  42. 12
      lib/store/store_view/store_activity.dart
  43. 6
      lib/store/store_view/store_order_list.dart
  44. 1
      lib/union/union_view/store_activity.dart
  45. 3
      lib/view_widget/classic_header.dart
  46. 1
      lib/view_widget/comment_menu.dart
  47. 32
      lib/view_widget/item_title.dart
  48. 35
      lib/view_widget/my_appbar.dart
  49. 2
      lib/view_widget/store_title_tab.dart
  50. 1
      lib/web/web_view/comment_list.dart
  51. 1
      lib/web/web_view/web_content.dart

13
assets/svg/jingbi.svg

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 8</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-32.000000, -1973.000000)">
<g id="编组-8" transform="translate(32.000000, 1973.000000)">
<rect id="矩形" x="0" y="0" width="30" height="30"></rect>
<rect id="矩形" x="2.04545455" y="2.04545455" width="25.9090909" height="25.9090909"></rect>
<path d="M15,4.09090909 C21.0249245,4.09090909 25.9090909,8.97507546 25.9090909,15 C25.9090909,21.0249245 21.0249245,25.9090909 15,25.9090909 C8.97507546,25.9090909 4.09090909,21.0249245 4.09090909,15 C4.09090909,8.97507546 8.97507546,4.09090909 15,4.09090909 Z M15.7071068,10.0502525 C15.3165825,9.65972824 14.6834175,9.65972824 14.2928932,10.0502525 L14.2928932,10.0502525 L10.0502525,14.2928932 C9.65972824,14.6834175 9.65972824,15.3165825 10.0502525,15.7071068 L10.0502525,15.7071068 L14.2928932,19.9497475 C14.6834175,20.3402718 15.3165825,20.3402718 15.7071068,19.9497475 L15.7071068,19.9497475 L19.9497475,15.7071068 C20.3402718,15.3165825 20.3402718,14.6834175 19.9497475,14.2928932 L19.9497475,14.2928932 Z" id="形状结合" fill="#32A060"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

11
assets/svg/kuaijiexiadan_bg.svg

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="160px" height="90px" viewBox="0 0 160 90" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>路径</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-16.000000, -526.000000)" fill="#FFFFFF">
<g id="编组-25" transform="translate(16.000000, 526.000000)">
<path d="M80,0 C89.1435153,0 96.9221771,5.84363228 99.8050444,13.9999558 L99.8318293,13.9994092 C101.247808,17.2408123 104.332396,19.5864455 107.999899,19.9506147 L108,20 L160,20 L160,86 C160,88.209139 158.209139,90 156,90 L4,90 C1.790861,90 3.82325518e-15,88.209139 0,86 L0,20 L0,20 L52,20 L52.0010997,19.9505155 C55.6681639,19.5860196 58.7523203,17.2405181 60.1681707,13.9994092 L60.1949556,13.9999558 C63.0778229,5.84363228 70.8564847,0 80,0 Z" id="路径"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 988 B

20
assets/svg/lianmeng.svg

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 12</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-126.000000, -1973.000000)">
<g id="编组-12" transform="translate(126.000000, 1973.000000)">
<g id="编组-13备份">
<rect id="矩形" x="0" y="0" width="30" height="30"></rect>
<rect id="矩形" x="2.04545455" y="2.04545455" width="25.9090909" height="25.9090909"></rect>
</g>
<g id="Icon-header-19" transform="translate(5.666886, 3.770117)" fill-rule="nonzero" stroke="#E6E6E6" stroke-width="2">
<g id="编组">
<path d="M9.52674312,-1.15463402 L12.7967233,0.732737101 L6.37583452,11.8528979 L8.21019266,12.9447516 L4.10111532,20.063104 L-1,17.0736711 L-1,4.92196234 L9.52674312,-1.15463402 Z" id="路径"></path>
<path d="M15.067945,1.88132528 L20.0509931,4.93979948 L20.0509931,17.0780377 L9.52425002,23.154634 L6.25426983,21.2672629 L12.6956418,10.1116279 L10.9689717,8.98217392 L15.067945,1.88132528 Z" id="路径"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

15
assets/svg/saoyisao.svg

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>扫一扫icon</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-335.000000, -57.000000)">
<g id="扫一扫icon" transform="translate(335.000000, 57.000000)">
<rect id="矩形" x="0" y="0" width="24" height="24"></rect>
<rect id="矩形" x="3.6" y="3.6" width="16.8" height="16.8"></rect>
<path d="M19.2,9 C19.2,9.33137085 18.9313708,9.6 18.6,9.6 C18.2686292,9.6 18,9.33137085 18,9 L18,6 L6,6 L6,9 C6,9.33137085 5.73137085,9.6 5.4,9.6 C5.06862915,9.6 4.8,9.33137085 4.8,9 L4.8,6 C4.8,5.3372583 5.3372583,4.8 6,4.8 L18,4.8 C18.6213203,4.8 19.1323525,5.27219968 19.1938045,5.87730697 L19.2,6 L19.2,9 Z" id="形状结合" fill="#000000"></path>
<path d="M18,18 L18,15 C18,14.6686292 18.2686292,14.4 18.6,14.4 C18.9313708,14.4 19.2,14.6686292 19.2,15 L19.2,15 L19.2,18 C19.2,18.6627417 18.6627417,19.2 18,19.2 L6,19.2 C5.3372583,19.2 4.8,18.6627417 4.8,18 L4.8,15 C4.8,14.6686292 5.06862915,14.4 5.4,14.4 C5.73137085,14.4 6,14.6686292 6,15 L6,15 L6,18 L18,18 Z" id="形状结合" fill="#000000"></path>
<rect id="矩形" fill="#000000" x="7.2" y="12" width="9.6" height="1.2" rx="0.5"></rect>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

13
assets/svg/shequn.svg

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 13备份</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-219.000000, -1973.000000)">
<g id="编组-13备份" transform="translate(219.000000, 1973.000000)">
<rect id="矩形" x="0" y="0" width="30" height="30"></rect>
<rect id="矩形" x="2.04545455" y="2.04545455" width="25.9090909" height="25.9090909"></rect>
<path d="M24,4 C25.1045695,4 26,4.8954305 26,6 L26,20 C26,21.1045695 25.1045695,22 24,22 L8,22 L4.99044723,25.0095528 C4.88440486,25.1155951 4.73636429,25.1684402 4.58714198,25.153518 C4.31237005,25.1260408 4.11189806,24.8810194 4.13937525,24.6062475 L4.13937525,24.6062475 L4.47138513,21.2897716 C4.17728107,20.9415593 4,20.4914828 4,20 L4,6 C4,4.8954305 4.8954305,4 6,4 L24,4 Z M8,11 C6.8954305,11 6,11.8954305 6,13 C6,14.1045695 6.8954305,15 8,15 C9.1045695,15 10,14.1045695 10,13 C10,11.8954305 9.1045695,11 8,11 Z M22,11 C20.8954305,11 20,11.8954305 20,13 C20,14.1045695 20.8954305,15 22,15 C23.1045695,15 24,14.1045695 24,13 C24,11.8954305 23.1045695,11 22,11 Z M15,11 C13.8954305,11 13,11.8954305 13,13 C13,14.1045695 13.8954305,15 15,15 C16.1045695,15 17,14.1045695 17,13 C17,11.8954305 16.1045695,11 15,11 Z" id="形状结合" stroke="#E6E6E6" stroke-width="2"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

17
assets/svg/tixing.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.8 KiB

15
assets/svg/wode.svg

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="30px" height="30px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 32备份</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-313.000000, -1973.000000)">
<g id="编组-32备份" transform="translate(313.000000, 1973.000000)">
<rect id="矩形" x="0" y="0" width="30" height="30"></rect>
<rect id="矩形" x="2.04545455" y="2.04545455" width="25.9090909" height="25.9090909"></rect>
<rect id="矩形" fill="#000000" fill-rule="nonzero" opacity="0" x="2" y="3" width="25" height="25"></rect>
<circle id="椭圆形" stroke="#E6E6E6" stroke-width="2" cx="15" cy="10" r="5"></circle>
<path d="M20.7149057,15.5992029 C23.0441653,17.0182332 24.8045748,19.2785874 25.5740039,21.958135 C25.8514072,22.9241961 26,23.9447452 26,25 L26,25 L4,25 C4,24.005236 4.13204538,23.0413129 4.37956453,22.1248022 C5.12294706,19.3722152 6.90790434,17.0472889 9.28551031,15.5989495 C10.7375158,17.0805099 12.7613787,18 15,18 C17.1674571,18 19.1335928,17.1380406 20.5743206,15.7382083 Z" id="形状结合" stroke="#E6E6E6" stroke-width="2"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

20
assets/svg/youhuiquan_bg.svg

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="338px" height="122px" viewBox="0 0 338 122" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>形状结合</title>
<defs>
<path d="M326,7 C328.209139,7 330,8.790861 330,11 L330,109 C330,111.209139 328.209139,113 326,113 L136,113 L136,113 C136,106.924868 131.075132,102 125,102 C118.924868,102 114,106.924868 114,113 L12,113 C9.790861,113 8,111.209139 8,109 L8,11 C8,8.790861 9.790861,7 12,7 L114,7 L114,7 C114,13.0751322 118.924868,18 125,18 C131.075132,18 136,13.0751322 136,7 L326,7 Z" id="path-1"></path>
<filter x="-3.9%" y="-10.8%" width="107.8%" height="123.6%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="首页" transform="translate(-9.000000, -677.000000)">
<g id="形状结合" transform="translate(9.000000, 677.000000)">
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
<use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

23
lib/community/community_page.dart

@ -0,0 +1,23 @@
import 'package:flutter/material.dart';
class CommunityPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _CommunityPage();
}
}
class _CommunityPage extends State<CommunityPage> {
@override
Widget build(BuildContext context) {
return Scaffold();
}
}

4
lib/generated/intl/messages_en.dart

@ -125,6 +125,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"), "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"),
"changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"), "changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"),
"changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"), "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"),
"chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"),
"chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"), "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"),
"chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"),
"chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"), "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"),
@ -305,7 +306,8 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"), "login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"), "main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"), "main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("我的"), "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"),
"main_menu4" : MessageLookupByLibrary.simpleMessage("我的"),
"manlijiandaijinquan" : m17, "manlijiandaijinquan" : m17,
"manyuankeyong" : m18, "manyuankeyong" : m18,
"meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"),

4
lib/generated/intl/messages_zh_CN.dart

@ -125,6 +125,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"), "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"),
"changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"), "changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"),
"changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"), "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"),
"chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"),
"chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"), "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"),
"chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"),
"chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"), "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"),
@ -304,7 +305,8 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"), "login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"), "main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"), "main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("我的"), "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"),
"main_menu4" : MessageLookupByLibrary.simpleMessage("我的"),
"manlijiandaijinquan" : m17, "manlijiandaijinquan" : m17,
"manyuankeyong" : m18, "manyuankeyong" : m18,
"meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"),

4
lib/generated/intl/messages_zh_Hans_CN.dart

@ -125,6 +125,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"), "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看详情"),
"changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"), "changjianwenti" : MessageLookupByLibrary.simpleMessage("常见问题"),
"changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"), "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("长期有效"),
"chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"),
"chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"), "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("创始人故事"),
"chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"),
"chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"), "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市选择"),
@ -304,7 +305,8 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"), "login_splash" : MessageLookupByLibrary.simpleMessage("欢迎来到一心回乡"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"), "main_menu1" : MessageLookupByLibrary.simpleMessage("净弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"), "main_menu2" : MessageLookupByLibrary.simpleMessage("联盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("我的"), "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"),
"main_menu4" : MessageLookupByLibrary.simpleMessage("我的"),
"manlijiandaijinquan" : m17, "manlijiandaijinquan" : m17,
"manyuankeyong" : m18, "manyuankeyong" : m18,
"meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"), "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日签到"),

4
lib/generated/intl/messages_zh_Hant_CN.dart

@ -125,6 +125,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看詳情"), "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看詳情"),
"changjianwenti" : MessageLookupByLibrary.simpleMessage("常見問題"), "changjianwenti" : MessageLookupByLibrary.simpleMessage("常見問題"),
"changqiyouxiao" : MessageLookupByLibrary.simpleMessage("長期有效"), "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("長期有效"),
"chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"),
"chaungshirengushi" : MessageLookupByLibrary.simpleMessage("創始人故事"), "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("創始人故事"),
"chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"),
"chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市選擇"), "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市選擇"),
@ -304,7 +305,8 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"), "login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("淨弼"), "main_menu1" : MessageLookupByLibrary.simpleMessage("淨弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("聯盟"), "main_menu2" : MessageLookupByLibrary.simpleMessage("聯盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("我的"), "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"),
"main_menu4" : MessageLookupByLibrary.simpleMessage("我的"),
"manlijiandaijinquan" : m17, "manlijiandaijinquan" : m17,
"manyuankeyong" : m18, "manyuankeyong" : m18,
"meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日簽到"), "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日簽到"),

4
lib/generated/intl/messages_zh_TW.dart

@ -125,6 +125,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看詳情"), "chakanxiangqing" : MessageLookupByLibrary.simpleMessage("查看詳情"),
"changjianwenti" : MessageLookupByLibrary.simpleMessage("常見問題"), "changjianwenti" : MessageLookupByLibrary.simpleMessage("常見問題"),
"changqiyouxiao" : MessageLookupByLibrary.simpleMessage("長期有效"), "changqiyouxiao" : MessageLookupByLibrary.simpleMessage("長期有效"),
"chaojiyouhuiquan" : MessageLookupByLibrary.simpleMessage("超值优惠券"),
"chaungshirengushi" : MessageLookupByLibrary.simpleMessage("創始人故事"), "chaungshirengushi" : MessageLookupByLibrary.simpleMessage("創始人故事"),
"chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"), "chenggongdengluzhuce" : MessageLookupByLibrary.simpleMessage("成功登录注册,并绑定相关信息即可成为会员。"),
"chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市選擇"), "chengshixuanze" : MessageLookupByLibrary.simpleMessage("城市選擇"),
@ -304,7 +305,8 @@ class MessageLookup extends MessageLookupByLibrary {
"login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"), "login_splash" : MessageLookupByLibrary.simpleMessage("歡迎來到一心回鄉"),
"main_menu1" : MessageLookupByLibrary.simpleMessage("淨弼"), "main_menu1" : MessageLookupByLibrary.simpleMessage("淨弼"),
"main_menu2" : MessageLookupByLibrary.simpleMessage("聯盟"), "main_menu2" : MessageLookupByLibrary.simpleMessage("聯盟"),
"main_menu3" : MessageLookupByLibrary.simpleMessage("我的"), "main_menu3" : MessageLookupByLibrary.simpleMessage("社群"),
"main_menu4" : MessageLookupByLibrary.simpleMessage("我的"),
"manlijiandaijinquan" : m17, "manlijiandaijinquan" : m17,
"manyuankeyong" : m18, "manyuankeyong" : m18,
"meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日簽到"), "meiriqiandao" : MessageLookupByLibrary.simpleMessage("每日簽到"),

24
lib/generated/l10n.dart

@ -185,16 +185,26 @@ class S {
); );
} }
/// `` /// ``
String get main_menu3 { String get main_menu3 {
return Intl.message( return Intl.message(
'我的', '社群',
name: 'main_menu3', name: 'main_menu3',
desc: '', desc: '',
args: [], args: [],
); );
} }
/// ``
String get main_menu4 {
return Intl.message(
'我的',
name: 'main_menu4',
desc: '',
args: [],
);
}
/// `` /// ``
String get shouye { String get shouye {
return Intl.message( return Intl.message(
@ -5125,6 +5135,16 @@ class S {
); );
} }
/// ``
String get chaojiyouhuiquan {
return Intl.message(
'超值优惠券',
name: 'chaojiyouhuiquan',
desc: '',
args: [],
);
}
/// `使` /// `使`
String get privacy_policy4 { String get privacy_policy4 {
return Intl.message( return Intl.message(

174
lib/home/home_page.dart

@ -2,11 +2,17 @@ import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/home/home_view/coupon.dart';
import 'package:huixiang/home/home_view/featured_acticvity.dart';
import 'package:huixiang/home/home_view/home_banner.dart'; import 'package:huixiang/home/home_view/home_banner.dart';
import 'package:huixiang/home/home_view/home_integral_store.dart'; import 'package:huixiang/home/home_view/home_integral_store.dart';
import 'package:huixiang/home/home_view/quick_order.dart';
import 'package:huixiang/home/home_view/sign_view.dart'; import 'package:huixiang/home/home_view/sign_view.dart';
import 'package:huixiang/home/points_mall_view/points_goods_title.dart';
import 'package:huixiang/home/points_mall_view/points_goods_view.dart';
import 'package:huixiang/main.dart'; import 'package:huixiang/main.dart';
import 'package:huixiang/retrofit/data/article.dart'; import 'package:huixiang/retrofit/data/article.dart';
import 'package:huixiang/retrofit/data/banner.dart'; import 'package:huixiang/retrofit/data/banner.dart';
@ -14,16 +20,15 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/brand.dart'; import 'package:huixiang/retrofit/data/brand.dart';
import 'package:huixiang/retrofit/data/founder.dart'; import 'package:huixiang/retrofit/data/founder.dart';
import 'package:huixiang/retrofit/data/goods.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/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'home_view/brand_view.dart';
import 'home_view/founder_store.dart';
import 'home_view/hot_article.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
final GestureTapCallback callback; final GestureTapCallback callback;
@ -55,6 +60,17 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
final SwiperController controller = SwiperController(); final SwiperController controller = SwiperController();
String categoryId;
int pageNum = 1;
//1-2-3-
int orderType = 1;
//
bool orderDesc = true;
List<Goods> goods = [];
List<GoodsCategory> gooodsCategorys = [];
List<BannerData> bannerData = []; List<BannerData> bannerData = [];
List<Brand> brandData = []; List<Brand> brandData = [];
List<Article> articles = []; List<Article> articles = [];
@ -65,7 +81,8 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
EasyLoading.show(status: S.of(context).zhengzaijiazai); EasyLoading.show(status: S.of(context).zhengzaijiazai);
final SharedPreferences value = await SharedPreferences.getInstance(); final SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(Dio(), context: context, token: value.getString('token'), showLoading: false); apiService = ApiService(Dio(),
context: context, token: value.getString('token'), showLoading: false);
final BaseData brand = final BaseData brand =
await apiService.queryHomeBrand().catchError((onError) { await apiService.queryHomeBrand().catchError((onError) {
@ -107,6 +124,60 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
gooods.addAll(goodsData.data.list); gooods.addAll(goodsData.data.list);
} }
BaseData<PageInfo<GoodsCategory>> dataCategory =
await apiService.goodsCategory({
"current": 1,
"map": {},
"model": {"pageNum": 1, "pageSize": 20, "searchKey": ""},
"order": "descending",
"size": 20,
"sort": "sortOrder"
}).catchError((onError) {
refreshController.loadFailed();
refreshController.refreshFailed();
});
if (dataCategory != null &&
dataCategory.isSuccess &&
dataCategory.data != null &&
dataCategory.data.records != null &&
dataCategory.data.records.length > 0) {
gooodsCategorys.clear();
gooodsCategorys.add(GoodsCategory(name: S.of(context).quanbu));
gooodsCategorys.addAll(dataCategory.data.records);
}
var param = {
"categoryId": categoryId ?? "",
"orderDesc": orderDesc,
"orderType": orderType,
"pageNum": pageNum,
"pageSize": 10,
"state": 1
};
BaseData<PageInfo<Goods>> pageGoods =
await apiService.creditGoods(param).catchError((onError) {
refreshController.loadFailed();
refreshController.refreshFailed();
});
EasyLoading.dismiss();
if (pageGoods != null && pageGoods.isSuccess) {
if (pageNum == 1) {
goods.clear();
}
goods.addAll(pageGoods.data.list);
refreshController.refreshCompleted();
refreshController.loadComplete();
if (pageGoods.data.pageNum == pageGoods.data.pages) {
refreshController.loadNoData();
} else {
pageNum += 1;
}
} else {
refreshController.loadFailed();
refreshController.refreshFailed();
}
final BaseData<PageInfo<BannerData>> baseData = final BaseData<PageInfo<BannerData>> baseData =
await apiService.queryBanner({ await apiService.queryBanner({
"model": {"type": "HOME_PAGE"}, "model": {"type": "HOME_PAGE"},
@ -127,8 +198,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
if (refreshController != null) if (refreshController != null) refreshController.dispose();
refreshController.dispose();
} }
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
@ -136,7 +206,42 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return Container( return Column(
children: [
MyAppBar(
title: "首页",
leading: false,
actions: [
Container(
margin: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
// Navigator.of(context).pushNamed('/router/system_msg_page');
},
child: SvgPicture.asset(
"assets/svg/tixing.svg",
width: 24,
height: 24,
),
),
),
Container(
margin: EdgeInsets.only(right: 16.w),
child: GestureDetector(
onTap: () {
// Navigator.of(context).pushNamed('/router/system_msg_page');
},
child: SvgPicture.asset(
"assets/svg/saoyisao.svg",
width: 24,
height: 24,
),
),
),
],
),
Expanded(
child: Container(
child: SmartRefresher( child: SmartRefresher(
controller: refreshController, controller: refreshController,
enablePullDown: true, enablePullDown: true,
@ -159,23 +264,64 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
/// ///
SignView(), SignView(),
/// // ///
HotArticle(articles), // HotArticle(articles),
// ///
// FounderStore(founder),
// ///
// BrandView(brandData),
/// ///
FounderStore(founder), QuickOrder(),
/// CouponView(),
BrandView(brandData),
/// ///
HomeIntegralStore(gooods, callback), HomeIntegralStore(gooods, callback),
FeaturedActivity(),
///Tab
PointsGoodsTitle(
gooodsCategorys,
(orderType, orderDesc) {
this.orderType = orderType;
this.orderDesc = orderDesc;
setState(() {});
},
(index) {
categoryId = gooodsCategorys[index].id;
pageNum = 1;
setState(() {});
},
),
///
PointGoods(
goods,
(index) {
_toDetails(index);
},
),
], ],
); );
}, },
), ),
), ),
), ),
),
),
SizedBox(
height: 76.h,
),
],
);
}
_toDetails(index) async {
Navigator.of(context).pushNamed(
'/router/integral_store_page',
arguments: {"goodsId": goods[index].id},
); );
} }

217
lib/home/home_view/coupon.dart

@ -0,0 +1,217 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:huixiang/view_widget/separator.dart';
class CouponView extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _CouponView();
}
}
class _CouponView extends State<CouponView> {
@override
Widget build(BuildContext context) {
return Column(
children: [
SizedBox(
height: 20.h,
),
ItemTitle(
text: S.of(context).chaojiyouhuiquan,
imgPath: "assets/image/icon_points_mall.png",
),
Container(
height: 132,
margin: EdgeInsets.only(top: 10),
child: ListView.builder(
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
padding: EdgeInsets.symmetric(horizontal: 10),
itemBuilder: (context, position) {
return couponItem();
},
itemCount: 10,
),
),
],
);
}
Widget couponItem() {
return Container(
width: 0.9.sw,
height: 122.h,
child: Stack(
children: [
Container(
width: 0.9.sw,
height: 122.h,
child: SvgPicture.asset(
"assets/svg/youhuiquan_bg.svg",
width: double.infinity,
height: 122.h,
fit: BoxFit.fill,
),
),
Container(
width: 0.9.sw,
height: 122.h,
child: Row(
children: [
Expanded(
child: Container(
alignment: Alignment.center,
child: Container(
width: 74,
height: 74,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFACDD60),
Color(0xFF32A060),
],
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "¥",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.regular,
color: Colors.white,
),
),
TextSpan(
text: "20",
style: TextStyle(
fontSize: 25.sp,
fontWeight: MyFontWeight.regular,
color: Colors.white,
),
),
],
),
),
Text(
"抵扣劵",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Colors.white,
),
),
],
),
),
),
flex: 37,
),
Container(
margin: EdgeInsets.only(
top: 24.h,
bottom: 24.h,
),
child: MySeparator(
height: 5.h,
width: 1,
color: Color(0xFFD8D8D8),
),
),
Expanded(
child: Container(
margin:
EdgeInsets.symmetric(vertical: 10.h, horizontal: 15.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"海峡姐妹(楚河汉街店)",
style: TextStyle(
color: Color(0xFF181818),
fontWeight: MyFontWeight.medium,
fontSize: 14.sp,
),
),
Row(
children: [
Text(
"1张",
style: TextStyle(
color: Color(0xFF868686),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
SizedBox(
width: 4.w,
),
Text(
"20元无门槛抵扣 ",
style: TextStyle(
color: Color(0xFF868686),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
),
],
),
SizedBox(
width: 12.w,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
"2021/10/11到期",
style: TextStyle(
color: Color(0xFF868686),
fontWeight: MyFontWeight.semi_bold,
fontSize: 10.sp,
),
),
Expanded(
child: Container(),
flex: 1,
),
RoundButton(
text: "领取",
textColor: Colors.white,
backgroup: Color(0xFF32A060),
radius: 100,
padding: EdgeInsets.symmetric(vertical: 3.h, horizontal: 14.w),
),
SizedBox(
width: 10.w,
),
],
),
],
),
),
flex: 63,
),
],
),
),
],
),
);
}
}

168
lib/home/home_view/featured_acticvity.dart

@ -0,0 +1,168 @@
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/round_button.dart';
class FeaturedActivity extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _FeaturedActivity();
}
}
class _FeaturedActivity extends State<FeaturedActivity> {
@override
Widget build(BuildContext context) {
return Column(
children: [
ItemTitle(
text: S.of(context).jifenshangcheng,
imgPath: "assets/image/icon_points_mall.png",
moreText: S.of(context).chakangengduo,
onTap: () {},
),
SizedBox(
height: 10.h,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 11.w),
child: Row(
children: [
Container(
child: stackItem(18.sp),
margin: EdgeInsets.symmetric(horizontal: 5.w),
width: (MediaQuery.of(context).size.width - 42) / 2,
height: 180.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Colors.red,
image: DecorationImage(
image: AssetImage(
"assets/image/share_image_bg.png",
),
fit: BoxFit.cover,
),
),
),
Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
child: stackItem(14.sp),
margin: EdgeInsets.symmetric(horizontal: 5.w),
width: (MediaQuery.of(context).size.width - 42) / 2,
height: 170.h / 2,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Colors.green,
image: DecorationImage(
image: AssetImage(
"assets/image/share_image_bg.png",
),
fit: BoxFit.cover,
),
),
),
SizedBox(
height: 10.h,
),
Container(
child: stackItem(14.sp),
margin: EdgeInsets.symmetric(horizontal: 5.w),
width: (MediaQuery.of(context).size.width - 42) / 2,
height: 170.h / 2,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Colors.blue,
image: DecorationImage(
image: AssetImage(
"assets/image/share_image_bg.png",
),
fit: BoxFit.cover,
),
),
),
],
),
),
],
),
),
SizedBox(
height: 28.h,
),
],
);
}
Widget stackItem(double textSize) {
return Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(left: 8, top: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"第二件半价!",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: textSize,
color: Colors.white,
),
),
SizedBox(
height: 2,
),
Text(
"仅限指定饮品",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 12.sp,
color: Colors.white,
),
),
],
),
),
Container(
width: 58.w,
margin: EdgeInsets.only(left: 8, bottom: 8),
padding: EdgeInsets.symmetric(
vertical: 4.h,
horizontal: 8.w,
),
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(20),
),
alignment: Alignment.center,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"了解",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
Icon(
Icons.keyboard_arrow_right,
color: Colors.white,
size: 12,
),
],
),
),
],
);
}
}

106
lib/home/home_view/home_integral_store.dart

@ -1,4 +1,3 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/goods.dart'; import 'package:huixiang/retrofit/data/goods.dart';
@ -10,7 +9,6 @@ import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class HomeIntegralStore extends StatefulWidget { class HomeIntegralStore extends StatefulWidget {
final GestureTapCallback callback; final GestureTapCallback callback;
final List<Goods> gooods; final List<Goods> gooods;
@ -20,7 +18,6 @@ class HomeIntegralStore extends StatefulWidget {
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
return _HomeIntegralStore(); return _HomeIntegralStore();
} }
} }
class _HomeIntegralStore extends State<HomeIntegralStore> { class _HomeIntegralStore extends State<HomeIntegralStore> {
@ -28,8 +25,12 @@ class _HomeIntegralStore extends State<HomeIntegralStore> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 16.5.w, right: 16.5.w, bottom: 40.h, top: 10.h), left: 16.5.w,
padding: EdgeInsets.only(bottom: 10.h, top: 16.h), right: 16.5.w,
bottom: 20.h,
top: 10.h,
),
padding: EdgeInsets.only(bottom: 3.h, top: 16.h),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4), borderRadius: BorderRadius.circular(4),
boxShadow: [ boxShadow: [
@ -38,59 +39,64 @@ class _HomeIntegralStore extends State<HomeIntegralStore> {
offset: Offset(0, 3), offset: Offset(0, 3),
blurRadius: 14, blurRadius: 14,
spreadRadius: 0, spreadRadius: 0,
) ),
], ],
color: Colors.white, color: Colors.white,
), ),
child: Column( child: Column(
children: [ children: [
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ // children: [
Expanded( // Expanded(
flex: 1, // flex: 1,
child: ItemTitle( // child: ItemTitle(
text: S.of(context).jifenshangcheng, // text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.png",
// ),
// ),
// GestureDetector(
// onTap: widget.callback,
// child: Container(
// padding: EdgeInsets.symmetric(
// vertical: 3.h,
// horizontal: 8.w,
// ),
// margin: EdgeInsets.only(right: 16.w),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(11.5),
// color: Color(0xFF32A060),
// ),
// child: Row(
// children: [
// Text(
// "GO",
// style: TextStyle(
// fontSize: 14.sp,
// fontWeight: FontWeight.bold,
// color: Colors.white,
// ),
// ),
// Icon(
// Icons.chevron_right,
// color: Colors.white,
// size: 18,
// ),
// ],
// ),
// ),
// ),
// ],
// ),
ItemTitle(
text: "大家都在兑换",
imgPath: "assets/image/icon_points_mall.png", imgPath: "assets/image/icon_points_mall.png",
), ),
),
GestureDetector(
onTap: widget.callback,
child: Container(
padding: EdgeInsets.symmetric(
vertical: 3.h, horizontal: 8.w,),
margin: EdgeInsets.only(right: 16.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(11.5),
color: Color(0xFF32A060),
),
child: Row(
children: [
Text(
"GO",
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
Icon(
Icons.chevron_right,
color: Colors.white,
size: 18,
),
],
),
),
),
],
),
SizedBox( SizedBox(
height: 14.h, height: 14.h,
), ),
Divider( Divider(
// indent: 0.0,
thickness: 1, thickness: 1,
color: Color(0xffF2F2F2), color: Color(0xffF2F2F2),
), ),
@ -102,7 +108,9 @@ class _HomeIntegralStore extends State<HomeIntegralStore> {
Widget integralStore() { Widget integralStore() {
return GridView.builder( return GridView.builder(
itemCount: (widget.gooods != null && widget.gooods.length > 0) ? (widget.gooods.length > 2 ? 2 : widget.gooods.length) : 0, itemCount: (widget.gooods != null && widget.gooods.length > 0)
? (widget.gooods.length > 2 ? 2 : widget.gooods.length)
: 0,
padding: EdgeInsets.all(13.w), padding: EdgeInsets.all(13.w),
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -130,7 +138,6 @@ class _HomeIntegralStore extends State<HomeIntegralStore> {
); );
} }
Widget buildItem(Goods goods) { Widget buildItem(Goods goods) {
return Container( return Container(
alignment: Alignment.center, alignment: Alignment.center,
@ -201,5 +208,4 @@ class _HomeIntegralStore extends State<HomeIntegralStore> {
), ),
); );
} }
} }

131
lib/home/home_view/quick_order.dart

@ -0,0 +1,131 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class QuickOrder extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _QuickOrder();
}
}
class _QuickOrder extends State<QuickOrder> {
@override
Widget build(BuildContext context) {
return Column(
children: [
ItemTitle(
text: S.of(context).jifenshangcheng,
imgPath: "assets/image/icon_points_mall.png",
),
Container(
height: 170,
margin: EdgeInsets.only(top: 10),
child: ListView.builder(
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
padding: EdgeInsets.symmetric(horizontal: 10),
itemBuilder: (context, position) {
return storeItem();
},
itemCount: 10,
),
),
],
);
}
Widget storeItem() {
return Container(
width: 160,
height: 160,
margin: EdgeInsets.symmetric(
horizontal: 6.w,
vertical: 3,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.w),
boxShadow: [
BoxShadow(
color: Color(0x08000000),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Stack(
children: [
Positioned(
top: 0,
left: 0,
right: 0,
child: ClipRRect(
child: Image.asset(
"assets/image/share_image_bg.png",
width: double.infinity,
height: 95,
fit: BoxFit.cover,
),
borderRadius: BorderRadius.vertical(
top: Radius.circular(4),
),
),
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: SvgPicture.asset(
"assets/svg/kuaijiexiadan_bg.svg",
width: double.infinity,
height: 95,
fit: BoxFit.fill,
),
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Container(
height: 95,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/image/default_user.png",
width: 32,
height: 32,
),
Text(
"百年川椒",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.black,
),
),
Text(
"正宗重庆老味道",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF868686),
),
),
SizedBox(
height: 5,
),
],
),
),
),
],
),
);
}
}

3
lib/home/home_view/sign_view.dart

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/item_title.dart'; import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart';
@ -14,7 +13,7 @@ class SignView extends StatelessWidget {
return Column( return Column(
children: [ children: [
SizedBox( SizedBox(
height: 20.h, height: 10.h,
), ),
ItemTitle( ItemTitle(
text: S.of(context).jinrihuiyuanrenwu, text: S.of(context).jinrihuiyuanrenwu,

103
lib/home/points_mall_view/points_goods_title.dart

@ -2,15 +2,19 @@ import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/goods_category.dart'; import 'package:huixiang/retrofit/data/goods_category.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_tab.dart';
class PointsGoodsTitle extends StatefulWidget { class PointsGoodsTitle extends StatefulWidget {
final ValueChanged<int> onTap; final ValueChanged<int> onTap;
final Function(int orderType, bool orderDesc) sortChange; final Function(int orderType, bool orderDesc) sortChange;
final List<GoodsCategory> gooodsCategorys; final List<GoodsCategory> gooodsCategorys;
PointsGoodsTitle(this.gooodsCategorys, this.sortChange, this.onTap); PointsGoodsTitle(
this.gooodsCategorys,
this.sortChange,
this.onTap,
);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -19,7 +23,6 @@ class PointsGoodsTitle extends StatefulWidget {
} }
class _PointsGoodsTitle extends State<PointsGoodsTitle> { class _PointsGoodsTitle extends State<PointsGoodsTitle> {
var _itemText = S.current.morenpaixu; var _itemText = S.current.morenpaixu;
List<String> sortString = [ List<String> sortString = [
S.current.morenpaixu, S.current.morenpaixu,
@ -27,32 +30,39 @@ class _PointsGoodsTitle extends State<PointsGoodsTitle> {
S.current.jifendidaogao, S.current.jifendidaogao,
]; ];
@override
void initState() {
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
ItemTitle( // ItemTitle(
text: S.of(context).jifenshangcheng, // text: S.of(context).jifenshangcheng,
imgPath: "assets/image/icon_points_mall.png", // imgPath: "assets/image/icon_points_mall.png",
moreText: _itemText, // moreText: _itemText,
moreType: 1, // moreType: 1,
items: sortString // items: sortString
.map( // .map(
(e) => DropdownMenuItem( // (e) => DropdownMenuItem(
value: e, // value: e,
child: Text( // child: Text(
e, // e,
style: TextStyle( // style: TextStyle(
fontSize: 12.sp, // fontSize: 12.sp,
fontWeight: MyFontWeight.medium, // fontWeight: MyFontWeight.medium,
color: Color(0xff353535), // color: Color(0xff353535),
), // ),
), // ),
), // ),
) // )
.toList(), // .toList(),
onChanged: _sortChange, // onChanged: _sortChange,
), // ),
Container( Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: DefaultTabController( child: DefaultTabController(
@ -80,12 +90,52 @@ class _PointsGoodsTitle extends State<PointsGoodsTitle> {
tabs: widget.gooodsCategorys == null tabs: widget.gooodsCategorys == null
? [] ? []
: widget.gooodsCategorys : widget.gooodsCategorys
.map((e) => Tab(text: e.name)) .map((e) => MyTab(text: e.name))
.toList(), .toList(),
onTap: widget.onTap, onTap: widget.onTap,
), ),
), ),
), ),
Container(
width: 124.w,
height: 32.h,
margin: EdgeInsets.only(left: 20.w, top: 10),
color: Colors.white,
child: Stack(
alignment: Alignment.center,
children: [
Container(
width: 104.w,
height: 32.h,
color: Colors.white,
),
Container(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: DropdownButton(
items: sortString
.map(
(e) => DropdownMenuItem(
value: e,
child: Text(
e,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xff353535),
),
),
),
)
.toList(),
value: _itemText,
itemHeight: 50,
onChanged: _sortChange,
style: TextStyle(),
),
),
],
),
),
], ],
); );
} }
@ -107,5 +157,4 @@ class _PointsGoodsTitle extends State<PointsGoodsTitle> {
_itemText = item; _itemText = item;
}); });
} }
} }

3
lib/integral/intergra_view/integral_task.dart

@ -1,12 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/sign_info.dart'; import 'package:huixiang/retrofit/data/sign_info.dart';
import 'package:huixiang/retrofit/data/task.dart'; import 'package:huixiang/retrofit/data/task.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
class IntegralTask extends StatefulWidget { class IntegralTask extends StatefulWidget {

1
lib/integral/intergra_view/integral_vip.dart

@ -3,7 +3,6 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/sign_info.dart'; import 'package:huixiang/retrofit/data/sign_info.dart';
import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class IntegralVip extends StatefulWidget { class IntegralVip extends StatefulWidget {

4
lib/l10n/intl_en.arb

@ -14,7 +14,8 @@
"privacy_policy3": "《隐私服务》", "privacy_policy3": "《隐私服务》",
"main_menu1": "净弼", "main_menu1": "净弼",
"main_menu2": "联盟", "main_menu2": "联盟",
"main_menu3": "我的", "main_menu3": "社群",
"main_menu4": "我的",
"shouye": "首页", "shouye": "首页",
"huodongliebiao": "活动列表", "huodongliebiao": "活动列表",
"jifenshangcheng": "积分商城", "jifenshangcheng": "积分商城",
@ -532,6 +533,7 @@
"huiyuanjia": "会员价", "huiyuanjia": "会员价",
"yuanjia": "原价", "yuanjia": "原价",
"xuanguige": "选规格", "xuanguige": "选规格",
"chaojiyouhuiquan": "超值优惠券",

4
lib/l10n/intl_zh_CN.arb

@ -14,7 +14,8 @@
"privacy_policy3": "《隐私服务》", "privacy_policy3": "《隐私服务》",
"main_menu1": "净弼", "main_menu1": "净弼",
"main_menu2": "联盟", "main_menu2": "联盟",
"main_menu3": "我的", "main_menu3": "社群",
"main_menu4": "我的",
"shouye": "首页", "shouye": "首页",
"huodongliebiao": "活动列表", "huodongliebiao": "活动列表",
"jifenshangcheng": "积分商城", "jifenshangcheng": "积分商城",
@ -532,6 +533,7 @@
"huiyuanjia": "会员价", "huiyuanjia": "会员价",
"yuanjia": "原价", "yuanjia": "原价",
"xuanguige": "选规格", "xuanguige": "选规格",
"chaojiyouhuiquan": "超值优惠券",

4
lib/l10n/intl_zh_Hans_CN.arb

@ -14,7 +14,8 @@
"privacy_policy3": "《隐私服务》", "privacy_policy3": "《隐私服务》",
"main_menu1": "净弼", "main_menu1": "净弼",
"main_menu2": "联盟", "main_menu2": "联盟",
"main_menu3": "我的", "main_menu3": "社群",
"main_menu4": "我的",
"shouye": "首页", "shouye": "首页",
"huodongliebiao": "活动列表", "huodongliebiao": "活动列表",
"jifenshangcheng": "积分商城", "jifenshangcheng": "积分商城",
@ -532,6 +533,7 @@
"huiyuanjia": "会员价", "huiyuanjia": "会员价",
"yuanjia": "原价", "yuanjia": "原价",
"xuanguige": "选规格", "xuanguige": "选规格",
"chaojiyouhuiquan": "超值优惠券",

4
lib/l10n/intl_zh_Hant_CN.arb

@ -14,7 +14,8 @@
"privacy_policy3": "《隱私服務》", "privacy_policy3": "《隱私服務》",
"main_menu1": "淨弼", "main_menu1": "淨弼",
"main_menu2": "聯盟", "main_menu2": "聯盟",
"main_menu3": "我的", "main_menu3": "社群",
"main_menu4": "我的",
"shouye": "首頁", "shouye": "首頁",
"huodongliebiao": "活動列表", "huodongliebiao": "活動列表",
"jifenshangcheng": "積分商城", "jifenshangcheng": "積分商城",
@ -527,6 +528,7 @@
"huiyuanjia": "會員價", "huiyuanjia": "會員價",
"yuanjia": "原價", "yuanjia": "原價",
"xuanguige": "選規格", "xuanguige": "選規格",
"chaojiyouhuiquan": "超值优惠券",

4
lib/l10n/intl_zh_TW.arb

@ -14,7 +14,8 @@
"privacy_policy3": "《隱私服務》", "privacy_policy3": "《隱私服務》",
"main_menu1": "淨弼", "main_menu1": "淨弼",
"main_menu2": "聯盟", "main_menu2": "聯盟",
"main_menu3": "我的", "main_menu3": "社群",
"main_menu4": "我的",
"shouye": "首頁", "shouye": "首頁",
"huodongliebiao": "活動列表", "huodongliebiao": "活動列表",
"jifenshangcheng": "積分商城", "jifenshangcheng": "積分商城",
@ -526,6 +527,7 @@
"huiyuanjia": "會員價", "huiyuanjia": "會員價",
"yuanjia": "原價", "yuanjia": "原價",
"xuanguige": "選規格", "xuanguige": "選規格",
"chaojiyouhuiquan": "超值优惠券",

1
lib/login/login_page.dart

@ -22,7 +22,6 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:photo_view/photo_view.dart'; import 'package:photo_view/photo_view.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart'; import 'package:sharesdk_plugin/sharesdk_interface.dart';
import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
class LoginPage extends StatefulWidget { class LoginPage extends StatefulWidget {
final Map<String, dynamic> arguments; final Map<String, dynamic> arguments;

217
lib/main_page.dart

@ -3,9 +3,10 @@ import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:huixiang/community/community_page.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/home/huixiang_brand_page.dart'; import 'package:huixiang/home/home_page.dart';
import 'package:huixiang/home/main_home_page.dart';
import 'package:huixiang/main.dart'; import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_page.dart'; import 'package:huixiang/mine/mine_page.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
@ -32,7 +33,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
List<Widget> _widgetOptions; List<Widget> _widgetOptions;
List<String> icons; List<String> icons;
List<String> iconn; // List<String> iconn;
@override @override
void dispose() { void dispose() {
@ -76,24 +77,26 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
pushRoute(); pushRoute();
_widgetOptions = <Widget>[ _widgetOptions = <Widget>[
BrandPage(), // BrandPage(),
MainHomePage(), HomePage(() {}),
// MainHomePage(),
UnionPage(), UnionPage(),
CommunityPage(),
MinePage(), MinePage(),
]; ];
icons = [ icons = [
"assets/image/icon_brand_s.png", "assets/svg/jingbi.svg",
"assets/image/icon_bi_s.png", "assets/svg/lianmeng.svg",
"assets/image/icon_meng_s.png", "assets/svg/shequn.svg",
"assets/image/icon_wo_s.png", "assets/svg/wode.svg",
];
iconn = [
"assets/image/icon_brand_n.png",
"assets/image/icon_bi_n.png",
"assets/image/icon_meng_n.png",
"assets/image/icon_wo_n.png",
]; ];
// iconn = [
// "assets/image/icon_brand_n.png",
// "assets/image/icon_bi_n.png",
// "assets/image/icon_meng_n.png",
// "assets/image/icon_wo_n.png",
// ];
eventBus.on<EventType>().listen((event) { eventBus.on<EventType>().listen((event) {
if (event.type < 3) { if (event.type < 3) {
@ -265,10 +268,11 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
bottomNavigationBigItem(S.of(context).pinpai, 0), // bottomNavigationBigItem(S.of(context).pinpai, 0),
bottomNavigationItem(S.of(context).main_menu1, 1), bottomNavigationItem(S.of(context).main_menu1, 0),
bottomNavigationItem(S.of(context).main_menu2, 2), bottomNavigationItem(S.of(context).main_menu2, 1),
bottomNavigationItem(S.of(context).main_menu3, 3), bottomNavigationItem(S.of(context).main_menu3, 2),
bottomNavigationItem(S.of(context).main_menu4, 3),
], ],
), ),
), ),
@ -302,24 +306,37 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
SizedBox( SizedBox(
height: 4.h, height: 4.h,
), ),
AnimatedCrossFade( // AnimatedCrossFade(
firstChild: Image.asset( // firstChild: SvgPicture.asset(
// icons[index],
// width: 30,
// height: 30,
// fit: BoxFit.contain,
// ),
// // Image.asset(
// // icons[index],
// // width: 30,
// // height: 30,
// // fit: BoxFit.contain,
// // ),
// secondChild: Image.asset(
// iconn[index],
// width: 30,
// height: 30,
// fit: BoxFit.contain,
// ),
// crossFadeState: isSelected
// ? CrossFadeState.showFirst
// : CrossFadeState.showSecond,
// duration: Duration(milliseconds: 200),
// ),
SvgPicture.asset(
icons[index], icons[index],
width: 30, width: 30,
height: 30, height: 30,
color: isSelected ? Color(0xFF32A060) : Color(0xFFE6E6E6),
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
secondChild: Image.asset(
iconn[index],
width: 30,
height: 30,
fit: BoxFit.contain,
),
crossFadeState: isSelected
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
duration: Duration(milliseconds: 200),
),
Text( Text(
text, text,
style: TextStyle( style: TextStyle(
@ -336,72 +353,72 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
); );
} }
Widget bottomNavigationBigItem(text, index) { // Widget bottomNavigationBigItem(text, index) {
var isSelected = index == clickIndex; // var isSelected = index == clickIndex;
return Expanded( // return Expanded(
child: InkWell( // child: InkWell(
onTap: () { // onTap: () {
setState(() { // setState(() {
clickIndex = index; // clickIndex = index;
pageController.jumpToPage(clickIndex); // pageController.jumpToPage(clickIndex);
}); // });
}, // },
child: Container( // child: Container(
width: 45.w, // width: 45.w,
alignment: Alignment.center, // alignment: Alignment.center,
child: AnimatedCrossFade( // child: AnimatedCrossFade(
firstCurve: Curves.easeIn, // firstCurve: Curves.easeIn,
secondCurve: Curves.ease, // secondCurve: Curves.ease,
sizeCurve: Curves.easeInOut, // sizeCurve: Curves.easeInOut,
duration: Duration(milliseconds: 50), // duration: Duration(milliseconds: 50),
firstChild: Container( // firstChild: Container(
padding: EdgeInsets.all(4), // padding: EdgeInsets.all(4),
height: 82.h, // height: 82.h,
alignment: // alignment:
Platform.isAndroid ? Alignment.center : Alignment.topCenter, // Platform.isAndroid ? Alignment.center : Alignment.topCenter,
child: Image.asset( // child: Image.asset(
icons[index], // icons[index],
width: 45, // width: 45,
height: 45, // height: 45,
fit: BoxFit.contain, // fit: BoxFit.contain,
), // ),
), // ),
secondChild: Column( // secondChild: Column(
mainAxisAlignment: Platform.isAndroid // mainAxisAlignment: Platform.isAndroid
? MainAxisAlignment.center // ? MainAxisAlignment.center
: MainAxisAlignment.start, // : MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ // children: [
if (Platform.isIOS) // if (Platform.isIOS)
SizedBox( // SizedBox(
height: 4.h, // height: 4.h,
), // ),
Image.asset( // Image.asset(
iconn[index], // iconn[index],
width: 30, // width: 30,
height: 30, // height: 30,
fit: BoxFit.contain, // fit: BoxFit.contain,
), // ),
SizedBox( // SizedBox(
height: 1.h, // height: 1.h,
), // ),
Text( // Text(
text, // text,
style: TextStyle( // style: TextStyle(
fontSize: 10.sp, // fontSize: 10.sp,
fontWeight: MyFontWeight.semi_bold, // fontWeight: MyFontWeight.semi_bold,
color: Color(isSelected ? 0xFF4C4C4C : 0xFFA29E9E), // color: Color(isSelected ? 0xFF4C4C4C : 0xFFA29E9E),
), // ),
), // ),
], // ],
), // ),
crossFadeState: isSelected // crossFadeState: isSelected
? CrossFadeState.showFirst // ? CrossFadeState.showFirst
: CrossFadeState.showSecond, // : CrossFadeState.showSecond,
), // ),
), // ),
), // ),
flex: 1, // flex: 1,
); // );
} // }
} }

2
lib/retrofit/data/findMiNiGroupList.dart

@ -23,7 +23,7 @@ class FindMiNiGroupList {
findMiNiGroupListBean.groupName = map['groupName']; findMiNiGroupListBean.groupName = map['groupName'];
findMiNiGroupListBean.groupImg = map['groupImg']; findMiNiGroupListBean.groupImg = map['groupImg'];
findMiNiGroupListBean.sort = map['sort']; findMiNiGroupListBean.sort = map['sort'];
findMiNiGroupListBean.productList = List()..addAll( findMiNiGroupListBean.productList = []..addAll(
(map['productList'] as List ?? []).map((o) => ProductListBean.fromJson(o)) (map['productList'] as List ?? []).map((o) => ProductListBean.fromJson(o))
); );
findMiNiGroupListBean.productPageVO = map['productPageVO']; findMiNiGroupListBean.productPageVO = map['productPageVO'];

2
lib/retrofit/data/logistics.dart

@ -18,7 +18,7 @@ class Logistics {
logisticsBean.shipperCode = map['shipperCode']; logisticsBean.shipperCode = map['shipperCode'];
logisticsBean.state = map['state']; logisticsBean.state = map['state'];
logisticsBean.success = map['success']; logisticsBean.success = map['success'];
logisticsBean.traces = List()..addAll( logisticsBean.traces = []..addAll(
(map['traces'] as List ?? []).map((o) => TracesBean.fromMap(o)) (map['traces'] as List ?? []).map((o) => TracesBean.fromMap(o))
); );
return logisticsBean; return logisticsBean;

12
lib/retrofit/data/settleOrderInfo.dart

@ -30,7 +30,7 @@ class SettleOrderInfo {
static SettleOrderInfo fromJson(Map<String, dynamic> map) { static SettleOrderInfo fromJson(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
SettleOrderInfo settleOrderInfoBean = SettleOrderInfo(); SettleOrderInfo settleOrderInfoBean = SettleOrderInfo();
settleOrderInfoBean.couponList = List()..addAll( settleOrderInfoBean.couponList = []..addAll(
(map['couponList'] as List ?? []).map((o) => CouponListBean.fromJson(o)) (map['couponList'] as List ?? []).map((o) => CouponListBean.fromJson(o))
); );
settleOrderInfoBean.discountAmount = map['discountAmount']; settleOrderInfoBean.discountAmount = map['discountAmount'];
@ -38,14 +38,14 @@ class SettleOrderInfo {
settleOrderInfoBean.memberVO = MemberVOBean.fromJson(map['memberVO']); settleOrderInfoBean.memberVO = MemberVOBean.fromJson(map['memberVO']);
settleOrderInfoBean.mins = map['mins']; settleOrderInfoBean.mins = map['mins'];
settleOrderInfoBean.orderNum = map['orderNum']; settleOrderInfoBean.orderNum = map['orderNum'];
settleOrderInfoBean.orderProductList = List()..addAll( settleOrderInfoBean.orderProductList = []..addAll(
(map['orderProductList'] as List ?? []).map((o) => OrderProductListBean.fromJson(o)) (map['orderProductList'] as List ?? []).map((o) => OrderProductListBean.fromJson(o))
); );
settleOrderInfoBean.orderSum = map['orderSum']; settleOrderInfoBean.orderSum = map['orderSum'];
settleOrderInfoBean.postAge = map['postAge']; settleOrderInfoBean.postAge = map['postAge'];
settleOrderInfoBean.price = map['price']; settleOrderInfoBean.price = map['price'];
settleOrderInfoBean.productNum = map['productNum']; settleOrderInfoBean.productNum = map['productNum'];
settleOrderInfoBean.promotionInfoList = List()..addAll( settleOrderInfoBean.promotionInfoList = []..addAll(
(map['promotionInfoList'] as List ?? []).map((o) => PromotionInfoListBean.fromJson(o)) (map['promotionInfoList'] as List ?? []).map((o) => PromotionInfoListBean.fromJson(o))
); );
settleOrderInfoBean.threshold = map['threshold']; settleOrderInfoBean.threshold = map['threshold'];
@ -136,11 +136,11 @@ class PromotionInfoListBean {
promotionInfoListBean.isNeedSecurityDeposit = map['isNeedSecurityDeposit']; promotionInfoListBean.isNeedSecurityDeposit = map['isNeedSecurityDeposit'];
promotionInfoListBean.isVip = map['isVip']; promotionInfoListBean.isVip = map['isVip'];
promotionInfoListBean.name = map['name']; promotionInfoListBean.name = map['name'];
promotionInfoListBean.promotionDetail = List()..addAll( promotionInfoListBean.promotionDetail = []..addAll(
(map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o)) (map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o))
); );
promotionInfoListBean.promotionPlan = map['promotionPlan']; promotionInfoListBean.promotionPlan = map['promotionPlan'];
promotionInfoListBean.promotionProuctList = List()..addAll( promotionInfoListBean.promotionProuctList = []..addAll(
(map['promotionProuctList'] as List ?? []).map((o) => PromotionProuctListBean.fromJson(o)) (map['promotionProuctList'] as List ?? []).map((o) => PromotionProuctListBean.fromJson(o))
); );
promotionInfoListBean.promotionType = map['promotionType']; promotionInfoListBean.promotionType = map['promotionType'];
@ -626,7 +626,7 @@ class CouponListBean {
couponListBean.fullNumber = map['fullNumber']; couponListBean.fullNumber = map['fullNumber'];
couponListBean.id = map['id']; couponListBean.id = map['id'];
couponListBean.mid = map['mid']; couponListBean.mid = map['mid'];
couponListBean.productList = List()..addAll( couponListBean.productList = []..addAll(
(map['productList'] as List ?? []).map((o) => ProductListBean.fromJson(o)) (map['productList'] as List ?? []).map((o) => ProductListBean.fromJson(o))
); );
couponListBean.promotionId = map['promotionId']; couponListBean.promotionId = map['promotionId'];

2
lib/retrofit/data/shoppingCart.dart

@ -79,7 +79,7 @@ class ShoppingCartSkuItemListBean {
shoppingCartSkuItemListBean.createTime = map['createTime']; shoppingCartSkuItemListBean.createTime = map['createTime'];
shoppingCartSkuItemListBean.groupId = map['groupId']; shoppingCartSkuItemListBean.groupId = map['groupId'];
shoppingCartSkuItemListBean.id = map['id']; shoppingCartSkuItemListBean.id = map['id'];
shoppingCartSkuItemListBean.platterList = List()..addAll( shoppingCartSkuItemListBean.platterList = []..addAll(
(map['platterList'] as List ?? []).map((o) => PlatterListBean.fromJson(o)) (map['platterList'] as List ?? []).map((o) => PlatterListBean.fromJson(o))
); );
shoppingCartSkuItemListBean.productId = map['productId']; shoppingCartSkuItemListBean.productId = map['productId'];

2
lib/retrofit/data/vip_card.dart

@ -91,7 +91,7 @@ class VipCard {
vipCardBean.vipRegStore = map['vipRegStore']; vipCardBean.vipRegStore = map['vipRegStore'];
vipCardBean.tenantName = map['tenantName']; vipCardBean.tenantName = map['tenantName'];
vipCardBean.tenantLogo = map['tenantLogo']; vipCardBean.tenantLogo = map['tenantLogo'];
vipCardBean.storeList = List()..addAll( vipCardBean.storeList = []..addAll(
(map['storeList'] as List ?? []).map((o) => StoreListBean.fromMap(o)) (map['storeList'] as List ?? []).map((o) => StoreListBean.fromMap(o))
); );
return vipCardBean; return vipCardBean;

88
lib/retrofit/min_api.g.dart

@ -0,0 +1,88 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'min_api.dart';
// **************************************************************************
// RetrofitGenerator
// **************************************************************************
class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/';
}
final Dio _dio;
String baseUrl;
@override
Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'product/findMiNiGroupList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<FindMiNiGroupList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<FindMiNiGroupList>(
(i) => FindMiNiGroupList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<MiNiDetail>> miNiDetail(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/product/queryMiNiProductDetail?id=$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<MiNiDetail>.fromJson(
_result.data,
(json) => MiNiDetail.fromJson(json),
);
return value;
}
@override
Future<BaseData<ShoppingCart>> shoppingCart(param, header) async {
ArgumentError.checkNotNull(param, 'param');
ArgumentError.checkNotNull(header, 'header');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('shoppingcart',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ShoppingCart>.fromJson(
_result.data,
(json) => ShoppingCart.fromJson(json),
);
return value;
}
}

1
lib/store/store_order.dart

@ -10,7 +10,6 @@ import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart'; import 'package:huixiang/retrofit/data/miNiDetail.dart';
import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';

1
lib/store/store_view/product_sku.dart

@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart'; import 'package:huixiang/retrofit/data/miNiDetail.dart';

1
lib/store/store_view/settlement.dart

@ -6,7 +6,6 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/order/order_view/order_commodity.dart'; import 'package:huixiang/order/order_view/order_commodity.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';

1
lib/store/store_view/shop_goods.dart

@ -40,6 +40,7 @@ class _ShopGoods extends State<ShopGoods> {
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [ children: [
SizedBox(width: 12.w), SizedBox(width: 12.w),
MImage( MImage(

12
lib/store/store_view/store_activity.dart

@ -30,7 +30,11 @@ class _StoreActivity extends State<StoreActivity> {
) )
: Container( : Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height -
(kToolbarHeight + 38 + 54.h),
margin: EdgeInsets.only(
top: (MediaQuery.of(context).padding.top + 38 + kToolbarHeight),
),
color: Colors.white, color: Colors.white,
child: Swiper( child: Swiper(
viewportFraction: 0.95, viewportFraction: 0.95,
@ -43,11 +47,13 @@ class _StoreActivity extends State<StoreActivity> {
widget.activitys[position].id) { widget.activitys[position].id) {
Navigator.of(context).pop(); Navigator.of(context).pop();
} else { } else {
Navigator.of(context).pushNamed('/router/web_page', Navigator.of(context).pushNamed(
'/router/web_page',
arguments: { arguments: {
"activityId": widget.activitys[position].id, "activityId": widget.activitys[position].id,
"source": widget.arguments["id"] "source": widget.arguments["id"]
}); },
);
} }
}, },
child: Container( child: Container(

6
lib/store/store_view/store_order_list.dart

@ -87,8 +87,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: height: MediaQuery.of(context).size.height - (kToolbarHeight + 38 + 54.h),
MediaQuery.of(context).size.height - (kToolbarHeight + 38 + 54.h),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: (MediaQuery.of(context).padding.top + 38 + kToolbarHeight), top: (MediaQuery.of(context).padding.top + 38 + kToolbarHeight),
), ),
@ -113,8 +112,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
width: MediaQuery.of(context).size.width - 100.w, width: MediaQuery.of(context).size.width - 100.w,
child: ListView.builder( child: ListView.builder(
itemCount: productListBeans == null itemCount: productListBeans == null
? 0 ? 0 : productListBeans.length,
: productListBeans.length,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemBuilder: (context, position) { itemBuilder: (context, position) {

1
lib/union/union_view/store_activity.dart

@ -7,7 +7,6 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/item_title.dart'; import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/round_button.dart';
class StoreActivity extends StatefulWidget { class StoreActivity extends StatefulWidget {

3
lib/view_widget/classic_header.dart

@ -1,7 +1,4 @@
import 'package:flare_flutter/flare_actor.dart';
import 'package:flare_flutter/flare_controller.dart';
import 'package:flare_flutter/flare_controls.dart'; import 'package:flare_flutter/flare_controls.dart';
import 'package:flare_flutter/provider/asset_flare.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart' import 'package:flutter/material.dart'

1
lib/view_widget/comment_menu.dart

@ -2,7 +2,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/separator.dart';
class CommentMenu extends StatefulWidget { class CommentMenu extends StatefulWidget {
final bool isSelf; final bool isSelf;

32
lib/view_widget/item_title.dart

@ -13,19 +13,23 @@ class ItemTitle extends StatelessWidget {
final String moreText; final String moreText;
final List<DropdownMenuItem<String>> items; final List<DropdownMenuItem<String>> items;
ItemTitle( ItemTitle({
{this.text, this.text,
this.imgPath, this.imgPath,
this.moreText = "", this.moreText = "",
this.moreType = 0, this.moreType = 0,
this.items, this.items,
this.onChanged, this.onChanged,
this.onTap}); this.onTap,
});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.only(left: 16.w, right: 17.w,), margin: EdgeInsets.only(
left: 16.w,
right: 17.w,
),
alignment: Alignment.center, alignment: Alignment.center,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -69,8 +73,12 @@ class ItemTitle extends StatelessWidget {
? GestureDetector( ? GestureDetector(
onTap: onTap, onTap: onTap,
child: Container( child: Container(
padding: padding: EdgeInsets.only(
EdgeInsets.only(left: 8.w, right: 8.w, top: 2.h, bottom: 2.h), left: 8.w,
right: 8.w,
top: 2.h,
bottom: 2.h,
),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
boxShadow: [ boxShadow: [
@ -78,24 +86,26 @@ class ItemTitle extends StatelessWidget {
color: Colors.black.withAlpha(25), color: Colors.black.withAlpha(25),
offset: Offset(0, 1), offset: Offset(0, 1),
blurRadius: 12, blurRadius: 12,
spreadRadius: 0) spreadRadius: 0,
),
], ],
borderRadius: BorderRadius.all(Radius.circular(2))), borderRadius: BorderRadius.circular(2),
),
child: Row( child: Row(
children: [ children: [
Text( Text(
moreText, moreText,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: FontWeight.w400 fontWeight: FontWeight.w400,
), ),
), ),
Icon( Icon(
moreType == 0 moreType == 0
? Icons.keyboard_arrow_right ? Icons.keyboard_arrow_right
: (Icons.keyboard_arrow_down), : Icons.keyboard_arrow_down,
size: 16, size: 16,
) ),
], ],
), ),
), ),

35
lib/view_widget/my_appbar.dart

@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class MyAppBar extends StatelessWidget implements PreferredSizeWidget { class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final Function onTap; final Function onTap;
final Widget action; final Widget action;
List<Widget> actions;
final Widget bottom; final Widget bottom;
final Widget titleChild; final Widget titleChild;
final String title; final String title;
@ -20,6 +21,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
Key key, Key key,
this.onTap, this.onTap,
this.action, this.action,
this.actions,
this.bottom, this.bottom,
this.titleChild, this.titleChild,
this.title, this.title,
@ -31,7 +33,21 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
this.brightness = Brightness.light, this.brightness = Brightness.light,
this.leading = true, this.leading = true,
}) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight), }) : preferredSize = Size.fromHeight(toolbarHeight ?? kToolbarHeight),
super(key: key); super(key: key) {
if (actions == null)
actions = [];
if (action != null) {
actions.add(
Container(
margin: EdgeInsets.only(right: 15),
child: GestureDetector(
onTap: onTap,
child: action,
),
),
);
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -39,7 +55,8 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
backgroundColor: background, backgroundColor: background,
elevation: 0, elevation: 0,
brightness: brightness, brightness: brightness,
leading: leading ? GestureDetector( leading: leading
? GestureDetector(
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
@ -53,7 +70,8 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
size: 24, size: 24,
), ),
), ),
) : Container(), )
: Container(),
titleSpacing: 2, titleSpacing: 2,
centerTitle: false, centerTitle: false,
leadingWidth: leading ? 56 : 10.w, leadingWidth: leading ? 56 : 10.w,
@ -67,16 +85,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
fontSize: titleSize, fontSize: titleSize,
), ),
), ),
actions: [ actions: actions,
if (action != null)
Container(
margin: EdgeInsets.only(right: 15),
child: GestureDetector(
onTap: onTap,
child: action,
),
)
],
bottom: bottom, bottom: bottom,
); );
} }

2
lib/view_widget/store_title_tab.dart

@ -1,5 +1,3 @@
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';

1
lib/web/web_view/comment_list.dart

@ -9,7 +9,6 @@ import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/member_comment_list.dart'; import 'package:huixiang/retrofit/data/member_comment_list.dart';
import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/comment_menu.dart'; import 'package:huixiang/view_widget/comment_menu.dart';
import 'package:huixiang/view_widget/custom_image.dart'; import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart';

1
lib/web/web_view/web_content.dart

@ -1,7 +1,6 @@
import 'package:chewie/chewie.dart'; import 'package:chewie/chewie.dart';
import 'package:flutter/services.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html/image_render.dart'; import 'package:flutter_html/image_render.dart';
import 'package:chewie/src/chewie_progress_colors.dart' as chewie; import 'package:chewie/src/chewie_progress_colors.dart' as chewie;

Loading…
Cancel
Save